Commit f1804a7c by 王军业

[筛选合同接口]

1 parent 2c9ab75d
...@@ -81,6 +81,17 @@ ...@@ -81,6 +81,17 @@
<artifactId>spring-boot-starter-test</artifactId> <artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.1.2</version>
</dependency>
<dependency>
<groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId>
<version>2.4</version>
<classifier>jdk15</classifier>
</dependency>
</dependencies> </dependencies>
<build> <build>
......
...@@ -9,7 +9,7 @@ import org.springframework.context.annotation.ComponentScan; ...@@ -9,7 +9,7 @@ import org.springframework.context.annotation.ComponentScan;
@SpringBootApplication @SpringBootApplication
@MapperScan(basePackages="com.vion.financial.mapper") @MapperScan(basePackages="com.vion.financial.mapper")
@ComponentScan(basePackages="com.vion.financial") @ComponentScan(basePackages="com.vion.financial.*")
public class FinancialSystemApplication extends SpringBootServletInitializer { public class FinancialSystemApplication extends SpringBootServletInitializer {
public static void main(String[] args) { public static void main(String[] args) {
......
...@@ -52,7 +52,7 @@ public class ContractController extends BaseController { ...@@ -52,7 +52,7 @@ public class ContractController extends BaseController {
return contractService.queryList(); return contractService.queryList();
} }
@GetMapping @GetMapping()
@ResponseBody @ResponseBody
public Object queryByCondition(SelectVo selectVo) { public Object queryByCondition(SelectVo selectVo) {
return contractService.selectByCondition(selectVo); return contractService.selectByCondition(selectVo);
......
...@@ -4,6 +4,7 @@ import java.util.List; ...@@ -4,6 +4,7 @@ import java.util.List;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import com.vion.financial.vo.ContractVo; import com.vion.financial.vo.ContractVo;
import com.vion.financial.vo.SelectVo; import com.vion.financial.vo.SelectVo;
...@@ -19,5 +20,5 @@ public interface ContractMapper { ...@@ -19,5 +20,5 @@ public interface ContractMapper {
public List<ContractVo> selectByCondition(SelectVo selectVo); public List<ContractVo> selectByCondition(SelectVo selectVo);
public boolean isDelete(String contract_unid); public boolean isDelete(String contract_unid);
public int countNumber();
} }
...@@ -16,10 +16,10 @@ ...@@ -16,10 +16,10 @@
<if test="county != null and county != ''"> <if test="county != null and county != ''">
,county ,county
</if> </if>
<if test="guarantee_period != null and guarantee_period != ''"> <if test="guarantee_period != null">
,guarantee_period ,guarantee_period
</if> </if>
<if test="sign_date != null and sign_date != ''"> <if test="sign_date != null">
,sign_date ,sign_date
</if> </if>
<if test="product_line_type != null and product_line_type != ''"> <if test="product_line_type != null and product_line_type != ''">
...@@ -274,31 +274,37 @@ ...@@ -274,31 +274,37 @@
</delete> </delete>
<select id="selectByCondition" parameterType="com.vion.financial.vo.SelectVo" resultType="com.vion.financial.vo.ContractVo"> <select id="selectByCondition" parameterType="com.vion.financial.vo.SelectVo" resultType="com.vion.financial.vo.ContractVo">
select contract_unid, salesperson_unid, province, city, county, select
contract_unid, salesperson_unid, province, city, county,
guarantee_period, sign_date, product_line_type, contract_state, guarantee_period, sign_date, product_line_type, contract_state,
contract_type, contract_amount, deduct_amount, contract_amount_note, contract_type, cast(contract_amount as decimal(18,2)), cast(deduct_amount as decimal(18,2)), contract_amount_note,
stop_amount, reback_note, exemptions_amount, contract_remain_note, cast(stop_amount as decimal(18,2)), reback_note, cast(exemptions_amount as decimal(18,2)), contract_remain_note,
is_archive, bad_amount, bad_amount_note, confirm_income_amount, is_archive, cast(bad_amount as decimal(18,2)), bad_amount_note, cast(confirm_income_amount as decimal(18,2)),
amount_state_unid, start_guarantee_date, end_guarantee_date, amount_state_unid, start_guarantee_date, end_guarantee_date,
mainten_start_point, contract_note, is_delete, project_unid, mainten_start_point, contract_note, is_delete, project_unid,
customer_unid, customer_unid,
(select total_reback_view.sum from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid) as total_reback_amount, (cast(contract_amount as decimal(18,2))-(select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid)-cast(deduct_amount as decimal(18,2))-cast(stop_amount as decimal(18,2))-cast(exemptions_amount as decimal(18,2))-cast(bad_amount as decimal(18,2))) as contract_remain,
(contract_amount-(select total_reback_view.sum from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid)-deduct_amount-stop_amount-exemptions_amount-bad_amount) as contract_remain, (select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid) as total_reback_amount,
(select total_recv_amount_view.total_recv_amount from total_recv_amount_view where tb_contract.contract_unid=total_recv_amount_view.contract_unid) as total_receive_amount , (select cast(total_recv_amount_view.total_recv_amount as decimal(18,2)) from total_recv_amount_view where tb_contract.contract_unid=total_recv_amount_view.contract_unid) as total_receive_amount ,
((select total_recv_amount_view.total_recv_amount from total_recv_amount_view where tb_contract.contract_unid=total_recv_amount_view.contract_unid)-(select total_reback_view.sum from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid)-deduct_amount-stop_amount-exemptions_amount-bad_amount) as total_amount_remain , ((select cast(total_recv_amount_view.total_recv_amount as decimal(18,2)) from total_recv_amount_view where tb_contract.contract_unid=total_recv_amount_view.contract_unid)-(select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid)-(cast(deduct_amount as decimal(18,2)))-(cast(stop_amount as decimal(18,2)))-(cast(exemptions_amount as decimal(18,2)))-(cast(bad_amount as decimal(18,2)))) as total_amount_remain ,
(select over_days_view.over_days from over_days_view where over_days_view.contract_unid=tb_contract.contract_unid) as over_days (select over_days_view.over_days from over_days_view where over_days_view.contract_unid=tb_contract.contract_unid) as over_days,
(select tb_project.project_name from tb_project where tb_project.project_unid=tb_contract.project_unid) as project_name,
(select tb_customer.customer_name from tb_customer where tb_customer.customer_unid=tb_contract.customer_unid) as customer_name
from tb_contract where 1=1 from tb_contract where 1=1
<if test="salesperson_name__like !=null and salesperson_name__like !=''"> <if test="salesperson_unids !=null">
and and
salesperson_unid like #{salesperson_name__like} salesperson_unid in
<foreach collection="salesperson_unids" index="index" item="salesperson_unid" open="(" close=")" separator=",">
#{salesperson_unid}
</foreach>
</if> </if>
<if test="project_name__like !=null and project_name__like !=''"> <if test="project_name__like !=null and project_name__like !=''">
and and
project_unid like #{project_name__like} tb_contract.project_unid in (select tb_project.project_unid from tb_project where project_name like '%'||#{project_name__like}||'%')
</if> </if>
<if test="customer_name__like !=null and customer_name__like !=''"> <if test="customer_name__like !=null and customer_name__like !=''">
and and
customer_unid like #{customer_name__like} tb_contract.customer_unid in (select tb_customer.customer_unid from tb_customer where customer_name like '%'||#{customer_name__like}||'%')
</if> </if>
<if test="province !=null and province !=''"> <if test="province !=null and province !=''">
and and
...@@ -312,17 +318,17 @@ ...@@ -312,17 +318,17 @@
and and
county=#{county} county=#{county}
</if> </if>
<if test="guarantee_period !=null"> <if test="guarantee_period !=null and guarantee_period !=0">
and and
guarantee_period=#{guarantee_period} guarantee_period=#{guarantee_period}
</if> </if>
<if test="year !=null and year !=''"> <if test="year !=null and year !=''">
and and
to_char(sign_date,"yyyy")=#{year} to_char(sign_date,'yyyy')=#{year}
</if> </if>
<if test="month !=null and month!=''"> <if test="month !=null and month!=''">
and and
to_char(sign_date,"MM")=#{month} to_char(sign_date,'MM')=#{month}
</if> </if>
<if test="product_line_type !=null and product_line_type !=''"> <if test="product_line_type !=null and product_line_type !=''">
and and
...@@ -348,7 +354,7 @@ ...@@ -348,7 +354,7 @@
and and
confirm_income_amount=#{confirm_income_amount} confirm_income_amount=#{confirm_income_amount}
</if> </if>
<if test="amount_state_unid !=null"> <if test="amount_state_unid !=null and amount_state_unid !=''">
and and
amount_state_unid=#{amount_state_unid} amount_state_unid=#{amount_state_unid}
</if> </if>
...@@ -356,18 +362,19 @@ ...@@ -356,18 +362,19 @@
and and
#{start_date} <![CDATA[<=]]> sign_date and sign_date <![CDATA[<=]]> #{end_date} #{start_date} <![CDATA[<=]]> sign_date and sign_date <![CDATA[<=]]> #{end_date}
</if> </if>
<if test="amount_point !=null"> <if test="amount_point !=null and amount_point !=0.0">
and and
contract_amount <![CDATA[>=]]> #{amount_point} contract_amount <![CDATA[>=]]> #{amount_point}
</if> </if>
<if test="overdays_point !=null"> <if test="overdays_point !=null and overdays_point !=0">
and and
<!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_point}) <!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_point})
</if> </if>
<if test="leave_amount_point !=null"> <if test="leave_amount_point !=null and leave_amount_point !=0.0">
<!--应收款余额-->and <!--应收款余额-->and
contract_unid in (select receive_amount_view.contract_unid from receive_amount_view where receive_amount_view.leave_amount_point <![CDATA[>=]]> #{leave_amount_point}) contract_unid in (select receive_amount_view.contract_unid from receive_amount_view where receive_amount_view.leave_amount_point <![CDATA[>=]]> #{leave_amount_point})
</if> </if>
and is_delete=false
<if test="limit !=null and offset !=null"> <if test="limit !=null and offset !=null">
limit #{limit} offset #{offset} limit #{limit} offset #{offset}
</if> </if>
...@@ -378,4 +385,7 @@ ...@@ -378,4 +385,7 @@
<select id="queryList" resultType="String"> <select id="queryList" resultType="String">
select contract_unid from tb_contract select contract_unid from tb_contract
</select> </select>
<select id="countNumber" resultType="int">
select count(contract_unid) from tb_contract where is_delete=false
</select>
</mapper> </mapper>
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
where payment_unid = #{payment_unid} where payment_unid = #{payment_unid}
</update> </update>
<select id="queryPaymentAgree" parameterType="String" resultType="com.vion.financial.entity.PaymentAgree"> <select id="queryPaymentAgree" parameterType="String" resultType="com.vion.financial.entity.PaymentAgree">
select * from tb_payment_agree where contract_unid = #{contract_unid} select payment_unid,contract_unid,payment_type,payment_progress,days,cast(payment_propority as decimal(18,2)),payment_requirement from tb_payment_agree where contract_unid = #{contract_unid}
</select> </select>
<delete id="deletePaymentAgree" parameterType="int"> <delete id="deletePaymentAgree" parameterType="int">
delete from tb_payment_agree where payment_unid = #{payment_unid} delete from tb_payment_agree where payment_unid = #{payment_unid}
......
...@@ -2,22 +2,30 @@ package com.vion.financial.service.imp; ...@@ -2,22 +2,30 @@ package com.vion.financial.service.imp;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.vion.financial.config.FinanceConfig;
import com.vion.financial.entity.Appendix; import com.vion.financial.entity.Appendix;
import com.vion.financial.mapper.AppendixMapper; import com.vion.financial.mapper.AppendixMapper;
import com.vion.financial.mapper.ContractMapper; import com.vion.financial.mapper.ContractMapper;
import com.vion.financial.mapper.PaymentAgreeMapper; import com.vion.financial.mapper.PaymentAgreeMapper;
import com.vion.financial.service.ContractService; import com.vion.financial.service.ContractService;
import com.vion.financial.utils.HttpNetClient;
import com.vion.financial.utils.JavaBean2Json;
import com.vion.financial.vo.ContractVo; import com.vion.financial.vo.ContractVo;
import com.vion.financial.vo.FailCode; import com.vion.financial.vo.FailCode;
import com.vion.financial.vo.ResultVo;
import com.vion.financial.vo.SelectVo; import com.vion.financial.vo.SelectVo;
import com.vion.financial.vo.SuccessCode; import com.vion.financial.vo.SuccessCode;
import net.sf.json.JSONObject;
@Service @Service
public class ContractServiceImpl implements ContractService { public class ContractServiceImpl implements ContractService {
Logger logger = LoggerFactory.getLogger(ContractServiceImpl.class); Logger logger = LoggerFactory.getLogger(ContractServiceImpl.class);
...@@ -34,32 +42,36 @@ public class ContractServiceImpl implements ContractService { ...@@ -34,32 +42,36 @@ public class ContractServiceImpl implements ContractService {
@Autowired @Autowired
FailCode failCode; FailCode failCode;
@Autowired
FinanceConfig financeConfig;
/*** /***
* 新增合同信息 * 新增合同信息
*/ */
@Override @Override
public Object addOne(ContractVo contractVo) { public Object addOne(ContractVo contractVo) {
try { try {
//先插入合同信息 // 先插入合同信息
logger.info("============新增合同 start ============"); logger.info("============新增合同 start ============");
//根据附件unid集合更新附件表信息 // 根据附件unid集合更新附件表信息
Appendix appendix = new Appendix(); Appendix appendix = new Appendix();
if(contractMapper.queryOne(contractVo.getContract_unid()) !=null) { if (contractMapper.queryOne(contractVo.getContract_unid()) != null) {
contractMapper.updateOne(contractVo); contractMapper.updateOne(contractVo);
}else { } else {
contractMapper.addOne(contractVo); contractMapper.addOne(contractVo);
} }
appendix.setBusiness_table("tb_contract"); appendix.setBusiness_table("tb_contract");
appendix.setBusiness_unid(contractVo.getContract_unid()); appendix.setBusiness_unid(contractVo.getContract_unid());
for(int n:contractVo.getAppendix_unids()) { for (int n : contractVo.getAppendix_unids()) {
appendix.setAppendix_unid(n); appendix.setAppendix_unid(n);
appendixMapper.updateAppendix(appendix); appendixMapper.updateAppendix(appendix);
} }
return successCode; return successCode;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
logger.error("增加合同异常:"+e.getLocalizedMessage(), e); logger.error("增加合同异常:" + e.getLocalizedMessage(), e);
failCode.setEcode("500"); failCode.setEcode("500");
failCode.setEnote("增加异常"); failCode.setEnote("增加异常");
return failCode; return failCode;
...@@ -70,6 +82,7 @@ public class ContractServiceImpl implements ContractService { ...@@ -70,6 +82,7 @@ public class ContractServiceImpl implements ContractService {
public Object queryOne(String s) { public Object queryOne(String s) {
try { try {
logger.info("================查询合同start==================="); logger.info("================查询合同start===================");
if (contractMapper.isDelete(s)) {
ContractVo contractVo = contractMapper.queryOne(s); ContractVo contractVo = contractMapper.queryOne(s);
Appendix appendix = new Appendix(); Appendix appendix = new Appendix();
appendix.setBusiness_table("tb_contract"); appendix.setBusiness_table("tb_contract");
...@@ -77,10 +90,15 @@ public class ContractServiceImpl implements ContractService { ...@@ -77,10 +90,15 @@ public class ContractServiceImpl implements ContractService {
List<Appendix> appendixs = appendixMapper.queryAppendixList(appendix); List<Appendix> appendixs = appendixMapper.queryAppendixList(appendix);
contractVo.setAppendix_list(appendixs); contractVo.setAppendix_list(appendixs);
return contractVo; return contractVo;
} else {
failCode.setEcode("100");
failCode.setEnote("合同已删除");
return failCode;
}
} catch (Exception e) { } catch (Exception e) {
// TODO: handle exception // TODO: handle exception
/* return failCode;*/ /* return failCode; */
logger.error("查询合同异常"+e.getLocalizedMessage(),e); logger.error("查询合同异常" + e.getLocalizedMessage(), e);
e.printStackTrace(); e.printStackTrace();
failCode.setEcode("500"); failCode.setEcode("500");
failCode.setEnote("查询异常"); failCode.setEnote("查询异常");
...@@ -96,14 +114,14 @@ public class ContractServiceImpl implements ContractService { ...@@ -96,14 +114,14 @@ public class ContractServiceImpl implements ContractService {
Appendix appendix = new Appendix(); Appendix appendix = new Appendix();
appendix.setBusiness_table("tb_contract"); appendix.setBusiness_table("tb_contract");
appendix.setBusiness_unid(vontractVo.getContract_unid()); appendix.setBusiness_unid(vontractVo.getContract_unid());
for(int n:vontractVo.getAppendix_unids()) { for (int n : vontractVo.getAppendix_unids()) {
appendix.setAppendix_unid(n); appendix.setAppendix_unid(n);
appendixMapper.updateAppendix(appendix); appendixMapper.updateAppendix(appendix);
} }
return successCode; return successCode;
} catch (Exception e) { } catch (Exception e) {
// TODO: handle exception // TODO: handle exception
logger.error("修改合同异常"+e.getLocalizedMessage(), e); logger.error("修改合同异常" + e.getLocalizedMessage(), e);
e.printStackTrace(); e.printStackTrace();
failCode.setEcode("500"); failCode.setEcode("500");
failCode.setEnote("修改异常"); failCode.setEnote("修改异常");
...@@ -115,11 +133,14 @@ public class ContractServiceImpl implements ContractService { ...@@ -115,11 +133,14 @@ public class ContractServiceImpl implements ContractService {
public Object deleteOne(String s) { public Object deleteOne(String s) {
try { try {
logger.info("=================删除合同================="); logger.info("=================删除合同=================");
//contractMapper.updateSingleContract(contractVo); Appendix appendix = new Appendix();
appendix.setBusiness_unid(s);
// contractMapper.updateSingleContract(contractVo);
contractMapper.deleteOne(s); contractMapper.deleteOne(s);
appendixMapper.deleteAppendix(appendix);
return successCode; return successCode;
} catch (Exception e) { } catch (Exception e) {
logger.error("删除合同异常"+e.getLocalizedMessage(),e); logger.error("删除合同异常" + e.getLocalizedMessage(), e);
e.printStackTrace(); e.printStackTrace();
failCode.setEcode("500"); failCode.setEcode("500");
failCode.setEnote("删除异常"); failCode.setEnote("删除异常");
...@@ -139,7 +160,7 @@ public class ContractServiceImpl implements ContractService { ...@@ -139,7 +160,7 @@ public class ContractServiceImpl implements ContractService {
return contractMapper.queryList(); return contractMapper.queryList();
} catch (Exception e) { } catch (Exception e) {
// TODO: handle exception // TODO: handle exception
logger.error("查询合同列表异常"+e.getLocalizedMessage(),e); logger.error("查询合同列表异常" + e.getLocalizedMessage(), e);
e.printStackTrace(); e.printStackTrace();
failCode.setEcode("500"); failCode.setEcode("500");
failCode.setEnote("查询异常"); failCode.setEnote("查询异常");
...@@ -152,15 +173,42 @@ public class ContractServiceImpl implements ContractService { ...@@ -152,15 +173,42 @@ public class ContractServiceImpl implements ContractService {
// TODO Auto-generated method stub // TODO Auto-generated method stub
try { try {
logger.info("========================筛选合同列表==========================="); logger.info("========================筛选合同列表===========================");
List<ContractVo> list=new ArrayList<ContractVo>(); List<Map> list_data = null;
for(ContractVo contractVo:contractMapper.selectByCondition(selectVo)) { if (StringUtils.isNotBlank(selectVo.getSalesperson_name__like())) {
// 调用auth服务的接口获取用户列表信息
String url = financeConfig.getAuthurl();
String result = HttpNetClient.doGet(url, null);
Map map = JavaBean2Json.Json2JavaBean(result, Map.class);
list_data = (List<Map>) map.get("list_data");
if(list_data != null && list_data.size() > 0) {
List<String> salesperson_unids = new ArrayList<String>(list_data.size());
for(Map _map:list_data) {
salesperson_unids.add((String) _map.get("user_unid"));
}
selectVo.setSalesperson_unids(salesperson_unids);
}
}
List<ContractVo> list = contractMapper.selectByCondition(selectVo);
for (ContractVo contractVo : list) {
contractVo.setPaymentAgree_list(paymentAgreeMapper.queryPaymentAgree(contractVo.getContract_unid())); contractVo.setPaymentAgree_list(paymentAgreeMapper.queryPaymentAgree(contractVo.getContract_unid()));
list.add(contractVo); if(list_data != null && list_data.size() > 0) {
for(Map _map:list_data) {
if (contractVo.getSalesperson_unid().equals(_map.get("user_unid"))) {
contractVo.setSalesperson_name((String) _map.get("name"));
}
}
}
} }
return list; ResultVo resultVo=new ResultVo();
resultVo.setList_data(list);
resultVo.setList_size(selectVo.getLimit());
resultVo.setOffset(selectVo.getOffset());
resultVo.setTotal_number(contractMapper.countNumber());
return resultVo;
} catch (Exception e) { } catch (Exception e) {
// TODO: handle exception // TODO: handle exception
logger.error("筛选合同列表异常"+e.getLocalizedMessage(),e); logger.error("筛选合同列表异常" + e.getLocalizedMessage(), e);
failCode.setEcode("500"); failCode.setEcode("500");
failCode.setEnote("筛选异常"); failCode.setEnote("筛选异常");
return failCode; return failCode;
......
...@@ -39,7 +39,7 @@ public class DeliverGoodsServiceImpl implements DeliverGoodsService { ...@@ -39,7 +39,7 @@ public class DeliverGoodsServiceImpl implements DeliverGoodsService {
try { try {
Appendix appendix = new Appendix(); Appendix appendix = new Appendix();
logger.info("=====================增加发货信息====================="); logger.info("=====================增加发货信息=====================");
if((boolean)contractService.isDelete(s)) { if(!contractService.isDelete(s)) {
List<DeliverGoods> list=deliverGoodsVo.getList_deliver_data(); List<DeliverGoods> list=deliverGoodsVo.getList_deliver_data();
for(DeliverGoods deliverGoods:list) { for(DeliverGoods deliverGoods:list) {
deliverGoods.setContract_unid(s); deliverGoods.setContract_unid(s);
...@@ -73,7 +73,7 @@ public class DeliverGoodsServiceImpl implements DeliverGoodsService { ...@@ -73,7 +73,7 @@ public class DeliverGoodsServiceImpl implements DeliverGoodsService {
deliverGoodsVo.setList_deliver_data(new ArrayList()); deliverGoodsVo.setList_deliver_data(new ArrayList());
Appendix appendix = null; Appendix appendix = null;
logger.info("========================查询发货信息========================"); logger.info("========================查询发货信息========================");
if(contractService.isDelete(s)) { if(!contractService.isDelete(s)) {
List<DeliverGoods> list=deliverGoodsMapper.queryDeliverGoods(s); List<DeliverGoods> list=deliverGoodsMapper.queryDeliverGoods(s);
for(DeliverGoods deliverGoods:list) { for(DeliverGoods deliverGoods:list) {
appendix = new Appendix(); appendix = new Appendix();
...@@ -105,7 +105,7 @@ public class DeliverGoodsServiceImpl implements DeliverGoodsService { ...@@ -105,7 +105,7 @@ public class DeliverGoodsServiceImpl implements DeliverGoodsService {
try { try {
Appendix appendix=null; Appendix appendix=null;
logger.info("===========================修改发货信息==========================="); logger.info("===========================修改发货信息===========================");
if(contractService.isDelete(s)) { if(!contractService.isDelete(s)) {
List<DeliverGoods> list_deliver_data=deliverGoodsVo.getList_deliver_data(); List<DeliverGoods> list_deliver_data=deliverGoodsVo.getList_deliver_data();
for(DeliverGoods deliverGoods:list_deliver_data) { for(DeliverGoods deliverGoods:list_deliver_data) {
deliverGoodsMapper.updateDeliverGoods(deliverGoods); deliverGoodsMapper.updateDeliverGoods(deliverGoods);
...@@ -138,7 +138,7 @@ public class DeliverGoodsServiceImpl implements DeliverGoodsService { ...@@ -138,7 +138,7 @@ public class DeliverGoodsServiceImpl implements DeliverGoodsService {
try { try {
logger.info("=========================删除合同发货信息======================="); logger.info("=========================删除合同发货信息=======================");
Appendix appendix=null; Appendix appendix=null;
if(contractService.isDelete(s)) { if(!contractService.isDelete(s)) {
for(int deliverUnid :deliverGoodsVo.getDeliver_unids()) { for(int deliverUnid :deliverGoodsVo.getDeliver_unids()) {
deliverGoodsMapper.deleteDeliverGoods(deliverUnid); deliverGoodsMapper.deleteDeliverGoods(deliverUnid);
appendix=new Appendix(); appendix=new Appendix();
......
...@@ -31,7 +31,7 @@ public class PaymentAgreeServiceImpl implements PaymentAgreeService { ...@@ -31,7 +31,7 @@ public class PaymentAgreeServiceImpl implements PaymentAgreeService {
public Object addPaymentAgree(PaymentAgreeVo paymentAgreeVo,String s) { public Object addPaymentAgree(PaymentAgreeVo paymentAgreeVo,String s) {
try { try {
logger.info("==============增加付款约定信息==================="); logger.info("==============增加付款约定信息===================");
if((boolean) contractServiceImpl.isDelete(s)) { if(! contractServiceImpl.isDelete(s)) {
List<PaymentAgree> list = paymentAgreeVo.getList_payment_data(); List<PaymentAgree> list = paymentAgreeVo.getList_payment_data();
for(PaymentAgree paymentAgree:list) { for(PaymentAgree paymentAgree:list) {
paymentAgree.setContract_unid(s); paymentAgree.setContract_unid(s);
...@@ -56,7 +56,7 @@ public class PaymentAgreeServiceImpl implements PaymentAgreeService { ...@@ -56,7 +56,7 @@ public class PaymentAgreeServiceImpl implements PaymentAgreeService {
public Object queryPaymentAgree(String s) { public Object queryPaymentAgree(String s) {
try { try {
logger.info("===============查询付款约定信息start====================="); logger.info("===============查询付款约定信息start=====================");
if((boolean) contractServiceImpl.isDelete(s)) { if(! contractServiceImpl.isDelete(s)) {
return paymentAgreeMapper.queryPaymentAgree(s); return paymentAgreeMapper.queryPaymentAgree(s);
} }
failCode.setEcode("100"); failCode.setEcode("100");
...@@ -77,7 +77,7 @@ public class PaymentAgreeServiceImpl implements PaymentAgreeService { ...@@ -77,7 +77,7 @@ public class PaymentAgreeServiceImpl implements PaymentAgreeService {
try { try {
logger.info("==============修改付款约定信息==================="); logger.info("==============修改付款约定信息===================");
if((boolean) contractServiceImpl.isDelete(s)) { if(! contractServiceImpl.isDelete(s)) {
List<PaymentAgree> list = paymentAgreeVo.getList_payment_data(); List<PaymentAgree> list = paymentAgreeVo.getList_payment_data();
for(PaymentAgree paymentAgree:list) { for(PaymentAgree paymentAgree:list) {
paymentAgree.setContract_unid(s); paymentAgree.setContract_unid(s);
...@@ -103,7 +103,7 @@ public class PaymentAgreeServiceImpl implements PaymentAgreeService { ...@@ -103,7 +103,7 @@ public class PaymentAgreeServiceImpl implements PaymentAgreeService {
// TODO Auto-generated method stub // TODO Auto-generated method stub
try { try {
logger.info("==============删除付款约定信息==================="); logger.info("==============删除付款约定信息===================");
if((boolean) contractServiceImpl.isDelete(s)) { if(! contractServiceImpl.isDelete(s)) {
List<PaymentAgree> list = paymentAgreeVo.getList_payment_data(); List<PaymentAgree> list = paymentAgreeVo.getList_payment_data();
for(PaymentAgree paymentAgree:list) { for(PaymentAgree paymentAgree:list) {
paymentAgree.setContract_unid(s); paymentAgree.setContract_unid(s);
......
...@@ -39,7 +39,7 @@ public class ProjectAcceptancServiceImpl implements ProjectAcceptancService { ...@@ -39,7 +39,7 @@ public class ProjectAcceptancServiceImpl implements ProjectAcceptancService {
try { try {
Appendix appendix = new Appendix(); Appendix appendix = new Appendix();
logger.info("=====================增加合同验收信息====================="); logger.info("=====================增加合同验收信息=====================");
if((boolean)contractService.isDelete(s)) { if(!contractService.isDelete(s)) {
List<ProjectAcceptanc> list=projectAcceptancVo.getList_check_data(); List<ProjectAcceptanc> list=projectAcceptancVo.getList_check_data();
for(ProjectAcceptanc projectAcceptanc:list) { for(ProjectAcceptanc projectAcceptanc:list) {
projectAcceptanc.setContract_unid(s); projectAcceptanc.setContract_unid(s);
...@@ -74,7 +74,7 @@ public class ProjectAcceptancServiceImpl implements ProjectAcceptancService { ...@@ -74,7 +74,7 @@ public class ProjectAcceptancServiceImpl implements ProjectAcceptancService {
projectAcceptancVo.setList_check_data(new ArrayList()); projectAcceptancVo.setList_check_data(new ArrayList());
Appendix appendix = null; Appendix appendix = null;
logger.info("========================查询合同验收信息========================"); logger.info("========================查询合同验收信息========================");
if(contractService.isDelete(s)) { if(!contractService.isDelete(s)) {
List<ProjectAcceptanc> list=projectAcceptancMapper.queryProjectAcceptanc(s); List<ProjectAcceptanc> list=projectAcceptancMapper.queryProjectAcceptanc(s);
for(ProjectAcceptanc projectAcceptanc:list) { for(ProjectAcceptanc projectAcceptanc:list) {
appendix = new Appendix(); appendix = new Appendix();
...@@ -106,7 +106,7 @@ public class ProjectAcceptancServiceImpl implements ProjectAcceptancService { ...@@ -106,7 +106,7 @@ public class ProjectAcceptancServiceImpl implements ProjectAcceptancService {
try { try {
logger.info("===========================修改合同验收信息==========================="); logger.info("===========================修改合同验收信息===========================");
Appendix appendix=null; Appendix appendix=null;
if(contractService.isDelete(s)) { if(!contractService.isDelete(s)) {
List<ProjectAcceptanc> list=projectAcceptancVo.getList_check_data(); List<ProjectAcceptanc> list=projectAcceptancVo.getList_check_data();
for(ProjectAcceptanc projectAcceptanc:list) { for(ProjectAcceptanc projectAcceptanc:list) {
projectAcceptanc.setContract_unid(s); projectAcceptanc.setContract_unid(s);
...@@ -140,7 +140,7 @@ public class ProjectAcceptancServiceImpl implements ProjectAcceptancService { ...@@ -140,7 +140,7 @@ public class ProjectAcceptancServiceImpl implements ProjectAcceptancService {
try { try {
logger.info("===========================删除合同验收信息==========================="); logger.info("===========================删除合同验收信息===========================");
Appendix appendix =null; Appendix appendix =null;
if(contractService.isDelete(s)) { if(!contractService.isDelete(s)) {
List<Integer> list=projectAcceptancVo.getAcceptanc_unids(); List<Integer> list=projectAcceptancVo.getAcceptanc_unids();
for(int n:list) { for(int n:list) {
projectAcceptancMapper.deleteProjectAcceptanc(n); projectAcceptancMapper.deleteProjectAcceptanc(n);
......
...@@ -31,7 +31,7 @@ public class ReceiptServiceImpl implements ReceiptService { ...@@ -31,7 +31,7 @@ public class ReceiptServiceImpl implements ReceiptService {
// TODO Auto-generated method stub // TODO Auto-generated method stub
try { try {
logger.info("=====================增加合同开票信息====================="); logger.info("=====================增加合同开票信息=====================");
if((boolean) contractServiceImpl.isDelete(s)) { if(! contractServiceImpl.isDelete(s)) {
List<Receipt> list=receiptVo.getList_receipt_data(); List<Receipt> list=receiptVo.getList_receipt_data();
for(Receipt receipt: list) { for(Receipt receipt: list) {
receipt.setContract_unid(s); receipt.setContract_unid(s);
...@@ -56,7 +56,7 @@ public class ReceiptServiceImpl implements ReceiptService { ...@@ -56,7 +56,7 @@ public class ReceiptServiceImpl implements ReceiptService {
// TODO Auto-generated method stub // TODO Auto-generated method stub
try { try {
logger.info("========================查询合同开票信息======================="); logger.info("========================查询合同开票信息=======================");
if((boolean)contractServiceImpl.isDelete(s)) { if(!contractServiceImpl.isDelete(s)) {
return receiptMapper.queryReceipt(s); return receiptMapper.queryReceipt(s);
}else { }else {
failCode.setEcode("100"); failCode.setEcode("100");
...@@ -76,7 +76,7 @@ public class ReceiptServiceImpl implements ReceiptService { ...@@ -76,7 +76,7 @@ public class ReceiptServiceImpl implements ReceiptService {
// TODO Auto-generated method stub // TODO Auto-generated method stub
try { try {
logger.info("===================修改合同开票信息========================"); logger.info("===================修改合同开票信息========================");
if((boolean)contractServiceImpl.isDelete(s)) { if(!contractServiceImpl.isDelete(s)) {
List<Receipt> list=receiptVo.getList_receipt_data(); List<Receipt> list=receiptVo.getList_receipt_data();
for(Receipt receipt:list) { for(Receipt receipt:list) {
receipt.setContract_unid(s); receipt.setContract_unid(s);
...@@ -102,7 +102,7 @@ public class ReceiptServiceImpl implements ReceiptService { ...@@ -102,7 +102,7 @@ public class ReceiptServiceImpl implements ReceiptService {
// TODO Auto-generated method stub // TODO Auto-generated method stub
try { try {
logger.info("=========================删除合同开票信息======================="); logger.info("=========================删除合同开票信息=======================");
if((boolean)contractServiceImpl.isDelete(s)) { if(!contractServiceImpl.isDelete(s)) {
List<Receipt> list=receiptVo.getReceipt_unids(); List<Receipt> list=receiptVo.getReceipt_unids();
for(Receipt receiptUnid :list) { for(Receipt receiptUnid :list) {
receiptMapper.deleteReceipt(receiptUnid.getReceipt_unid()); receiptMapper.deleteReceipt(receiptUnid.getReceipt_unid());
......
...@@ -33,7 +33,7 @@ public class ReturnInfoServiceImpl implements ReturnInfoService { ...@@ -33,7 +33,7 @@ public class ReturnInfoServiceImpl implements ReturnInfoService {
// TODO Auto-generated method stub // TODO Auto-generated method stub
try { try {
logger.info("==============增加合同回款信息==================="); logger.info("==============增加合同回款信息===================");
if((boolean) contractServiceImpl.isDelete(s)) { if(! contractServiceImpl.isDelete(s)) {
List<ReturnInfo> list = returnInfoVo.getList_reback_data(); List<ReturnInfo> list = returnInfoVo.getList_reback_data();
for(ReturnInfo returnInfo:list) { for(ReturnInfo returnInfo:list) {
returnInfo.setContract_unid(s); returnInfo.setContract_unid(s);
...@@ -59,7 +59,7 @@ public class ReturnInfoServiceImpl implements ReturnInfoService { ...@@ -59,7 +59,7 @@ public class ReturnInfoServiceImpl implements ReturnInfoService {
// TODO Auto-generated method stub // TODO Auto-generated method stub
try { try {
logger.info("===============查询回款信息====================="); logger.info("===============查询回款信息=====================");
if((boolean) contractServiceImpl.isDelete(s)){ if(!contractServiceImpl.isDelete(s)){
return returnInfoMapper.queryReturnInfo(s); return returnInfoMapper.queryReturnInfo(s);
}else { }else {
failCode.setEcode("100"); failCode.setEcode("100");
...@@ -80,7 +80,7 @@ public class ReturnInfoServiceImpl implements ReturnInfoService { ...@@ -80,7 +80,7 @@ public class ReturnInfoServiceImpl implements ReturnInfoService {
// TODO Auto-generated method stub // TODO Auto-generated method stub
try { try {
logger.info("==============修改回款信息==================="); logger.info("==============修改回款信息===================");
if((boolean) contractServiceImpl.isDelete(s)) { if(! contractServiceImpl.isDelete(s)) {
List<ReturnInfo> list = returnInfoVo.getList_reback_data(); List<ReturnInfo> list = returnInfoVo.getList_reback_data();
for(ReturnInfo returnInfo:list) { for(ReturnInfo returnInfo:list) {
returnInfo.setContract_unid(s); returnInfo.setContract_unid(s);
...@@ -106,7 +106,7 @@ public class ReturnInfoServiceImpl implements ReturnInfoService { ...@@ -106,7 +106,7 @@ public class ReturnInfoServiceImpl implements ReturnInfoService {
// TODO Auto-generated method stub // TODO Auto-generated method stub
try { try {
logger.info("==============删除回款信息==================="); logger.info("==============删除回款信息===================");
if((boolean) contractServiceImpl.isDelete(s)) { if(!contractServiceImpl.isDelete(s)) {
List<ReturnInfo> list = paymentAgreeVo.getReback_unids(); List<ReturnInfo> list = paymentAgreeVo.getReback_unids();
for(ReturnInfo returnInfo:list) { for(ReturnInfo returnInfo:list) {
returnInfo.setContract_unid(s); returnInfo.setContract_unid(s);
......
package com.vion.financial.vo; package com.vion.financial.vo;
import java.util.Date; import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude.Include;
...@@ -13,24 +14,172 @@ public class SelectVo { ...@@ -13,24 +14,172 @@ public class SelectVo {
private String province; //所属省份 private String province; //所属省份
private String city; //所属市 private String city; //所属市
private String county; //所属县 private String county; //所属县
private int guarantee_period; //保质周 private Integer guarantee_period; //保质周
private String year; //所属年份 private String year; //所属年份
private String month; //所属月份 private String month; //所属月份
private String product_line_type; //生产线类型 private String product_line_type; //生产线类型
private String contract_state; //合同状态 private String contract_state; //合同状态
private String contract_type; //合同性质 private String contract_type; //合同性质
private String acceptanc_type; //验收类型 private String acceptanc_type; //验收类型
private boolean is_archive; //是否归档 private Boolean is_archive; //是否归档
private double confirm_income_amount; //确认收入金额 private Double confirm_income_amount; //确认收入金额
private String amount_state_unid; //账款状态 private String amount_state_unid; //账款状态
private Date start_date; //设置开始查询时间 private Date start_date; //设置开始查询时间
private Date end_date; //设置结束时间 private Date end_date; //设置结束时间
private double amount_point; //设置金额查询节点 private Double amount_point; //设置金额查询节点
private int overdays_point; //逾期天数查询节点 private Integer overdays_point; //逾期天数查询节点
private double leave_amount_point; //账款余额查询节点 private Double leave_amount_point; //账款余额查询节点
private int offset; //设置查询起始位置 private Integer offset; //设置查询起始位置
private int limit; //设置每次查询条数 private Integer limit; //设置每次查询条数
private List<String> salesperson_unids;
/* /*
* 查询条件 * 查询条件
*/ */
public String getSalesperson_name__like() {
return salesperson_name__like;
}
public void setSalesperson_name__like(String salesperson_name__like) {
this.salesperson_name__like = salesperson_name__like;
}
public String getProject_name__like() {
return project_name__like;
}
public void setProject_name__like(String project_name__like) {
this.project_name__like = project_name__like;
}
public String getCustomer_name__like() {
return customer_name__like;
}
public void setCustomer_name__like(String customer_name__like) {
this.customer_name__like = customer_name__like;
}
public String getProvince() {
return province;
}
public void setProvince(String province) {
this.province = province;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getCounty() {
return county;
}
public void setCounty(String county) {
this.county = county;
}
public Integer getGuarantee_period() {
return guarantee_period;
}
public void setGuarantee_period(Integer guarantee_period) {
this.guarantee_period = guarantee_period;
}
public String getYear() {
return year;
}
public void setYear(String year) {
this.year = year;
}
public String getMonth() {
return month;
}
public void setMonth(String month) {
this.month = month;
}
public String getProduct_line_type() {
return product_line_type;
}
public void setProduct_line_type(String product_line_type) {
this.product_line_type = product_line_type;
}
public String getContract_state() {
return contract_state;
}
public void setContract_state(String contract_state) {
this.contract_state = contract_state;
}
public String getContract_type() {
return contract_type;
}
public void setContract_type(String contract_type) {
this.contract_type = contract_type;
}
public String getAcceptanc_type() {
return acceptanc_type;
}
public void setAcceptanc_type(String acceptanc_type) {
this.acceptanc_type = acceptanc_type;
}
public Boolean getIs_archive() {
return is_archive;
}
public void setIs_archive(Boolean is_archive) {
this.is_archive = is_archive;
}
public Double getConfirm_income_amount() {
return confirm_income_amount;
}
public void setConfirm_income_amount(Double confirm_income_amount) {
this.confirm_income_amount = confirm_income_amount;
}
public String getAmount_state_unid() {
return amount_state_unid;
}
public void setAmount_state_unid(String amount_state_unid) {
this.amount_state_unid = amount_state_unid;
}
public Date getStart_date() {
return start_date;
}
public void setStart_date(Date start_date) {
this.start_date = start_date;
}
public Date getEnd_date() {
return end_date;
}
public void setEnd_date(Date end_date) {
this.end_date = end_date;
}
public Double getAmount_point() {
return amount_point;
}
public void setAmount_point(Double amount_point) {
this.amount_point = amount_point;
}
public Integer getOverdays_point() {
return overdays_point;
}
public void setOverdays_point(Integer overdays_point) {
this.overdays_point = overdays_point;
}
public Double getLeave_amount_point() {
return leave_amount_point;
}
public void setLeave_amount_point(Double leave_amount_point) {
this.leave_amount_point = leave_amount_point;
}
public Integer getOffset() {
return offset;
}
public void setOffset(Integer offset) {
this.offset = offset;
}
public Integer getLimit() {
return limit;
}
public void setLimit(Integer limit) {
this.limit = limit;
}
public List<String> getSalesperson_unids() {
return salesperson_unids;
}
public void setSalesperson_unids(List<String> salesperson_unids) {
this.salesperson_unids = salesperson_unids;
}
} }
...@@ -37,11 +37,15 @@ mybatis: ...@@ -37,11 +37,15 @@ mybatis:
logging: logging:
level: level:
root: INFO root: DEBUG
pattern: pattern:
level: INFO level: DEBUG
console: "[financial_serv]-[%d{yyyy-MM-dd HH:mm:ss.SSS}]-%m%n" console: "[financial_serv]-[%d{yyyy-MM-dd HH:mm:ss.SSS}]-%m%n"
path: F:\LOG\ path: F:\LOG\
finance:
authurl: http://192.168.9.162:20080/api/v1/auth/users
#pagehelper: #pagehelper:
# helperDialect: postgresql # helperDialect: postgresql
# reasonable: true # reasonable: true
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!