Commit f1804a7c by 王军业

[筛选合同接口]

1 parent 2c9ab75d
......@@ -81,6 +81,17 @@
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</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>
<build>
......
......@@ -9,7 +9,7 @@ import org.springframework.context.annotation.ComponentScan;
@SpringBootApplication
@MapperScan(basePackages="com.vion.financial.mapper")
@ComponentScan(basePackages="com.vion.financial")
@ComponentScan(basePackages="com.vion.financial.*")
public class FinancialSystemApplication extends SpringBootServletInitializer {
public static void main(String[] args) {
......
......@@ -52,7 +52,7 @@ public class ContractController extends BaseController {
return contractService.queryList();
}
@GetMapping
@GetMapping()
@ResponseBody
public Object queryByCondition(SelectVo selectVo) {
return contractService.selectByCondition(selectVo);
......
......@@ -4,6 +4,7 @@ import java.util.List;
import org.springframework.transaction.annotation.Transactional;
import com.vion.financial.vo.ContractVo;
import com.vion.financial.vo.SelectVo;
......@@ -19,5 +20,5 @@ public interface ContractMapper {
public List<ContractVo> selectByCondition(SelectVo selectVo);
public boolean isDelete(String contract_unid);
public int countNumber();
}
......@@ -16,10 +16,10 @@
<if test="county != null and county != ''">
,county
</if>
<if test="guarantee_period != null and guarantee_period != ''">
<if test="guarantee_period != null">
,guarantee_period
</if>
<if test="sign_date != null and sign_date != ''">
<if test="sign_date != null">
,sign_date
</if>
<if test="product_line_type != null and product_line_type != ''">
......@@ -274,31 +274,37 @@
</delete>
<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,
contract_type, contract_amount, deduct_amount, contract_amount_note,
stop_amount, reback_note, exemptions_amount, contract_remain_note,
is_archive, bad_amount, bad_amount_note, confirm_income_amount,
contract_type, cast(contract_amount as decimal(18,2)), cast(deduct_amount as decimal(18,2)), contract_amount_note,
cast(stop_amount as decimal(18,2)), reback_note, cast(exemptions_amount as decimal(18,2)), contract_remain_note,
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,
mainten_start_point, contract_note, is_delete, project_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,
(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 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 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 over_days_view.over_days from over_days_view where over_days_view.contract_unid=tb_contract.contract_unid) as over_days
(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,
(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 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 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 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
<if test="salesperson_name__like !=null and salesperson_name__like !=''">
<if test="salesperson_unids !=null">
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 test="project_name__like !=null and project_name__like !=''">
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 test="customer_name__like !=null and customer_name__like !=''">
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 test="province !=null and province !=''">
and
......@@ -312,17 +318,17 @@
and
county=#{county}
</if>
<if test="guarantee_period !=null">
<if test="guarantee_period !=null and guarantee_period !=0">
and
guarantee_period=#{guarantee_period}
</if>
<if test="year !=null and year !=''">
and
to_char(sign_date,"yyyy")=#{year}
to_char(sign_date,'yyyy')=#{year}
</if>
<if test="month !=null and month!=''">
and
to_char(sign_date,"MM")=#{month}
to_char(sign_date,'MM')=#{month}
</if>
<if test="product_line_type !=null and product_line_type !=''">
and
......@@ -348,7 +354,7 @@
and
confirm_income_amount=#{confirm_income_amount}
</if>
<if test="amount_state_unid !=null">
<if test="amount_state_unid !=null and amount_state_unid !=''">
and
amount_state_unid=#{amount_state_unid}
</if>
......@@ -356,18 +362,19 @@
and
#{start_date} <![CDATA[<=]]> sign_date and sign_date <![CDATA[<=]]> #{end_date}
</if>
<if test="amount_point !=null">
<if test="amount_point !=null and amount_point !=0.0">
and
contract_amount <![CDATA[>=]]> #{amount_point}
</if>
<if test="overdays_point !=null">
<if test="overdays_point !=null and overdays_point !=0">
and
<!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_point})
</if>
<if test="leave_amount_point !=null">
<if test="leave_amount_point !=null and leave_amount_point !=0.0">
<!--应收款余额-->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})
</if>
and is_delete=false
<if test="limit !=null and offset !=null">
limit #{limit} offset #{offset}
</if>
......@@ -378,4 +385,7 @@
<select id="queryList" resultType="String">
select contract_unid from tb_contract
</select>
<select id="countNumber" resultType="int">
select count(contract_unid) from tb_contract where is_delete=false
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.vion.financial.mapper.PaymentAgreeMapper">
<insert id="addPaymentAgree" parameterType="com.vion.financial.entity.PaymentAgree">
insert into tb_payment_agree (
contract_unid,
<if test="payment_type !=null and payment_type !=''">
payment_type,
</if>
<if test="payment_progress !=null and payment_progress !=''">
payment_progress,
</if>
<if test="days !=null and days !=''">
days,
</if>
<if test="payment_propority !=null and payment_propority !=''">
payment_propority,
</if>
<if test="payment_requirement !=null and payment_requirement !=''">
payment_requirement
</if>
)
values(
#{contract_unid},
<if test="payment_type !=null and payment_type !=''">
#{payment_type},
</if>
<if test="payment_progress !=null and payment_progress !=''">
#{payment_progress},
</if>
<if test="days !=null and days !=''">
#{days},
</if>
<if test="payment_propority !=null and payment_propority !=''">
#{payment_propority},
</if>
<if test="payment_requirement !=null and payment_requirement !=''">
#{payment_requirement}
</if>
)
</insert>
<update id="updatePaymentAgree" parameterType="com.vion.financial.entity.PaymentAgree">
update tb_payment_agree set
contract_unid=#{contract_unid},
<if test="payment_type != null and payment_type !=''">
payment_type = #{payment_type} ,
</if>
<if test="payment_progress !=null and payment_progress !=''">
payment_progress = #{payment_progress} ,
</if>
<if test="days !=null and days !=''">
days = #{days} ,
</if>
<if test="payment_propority !=null and payment_propority !=''">
payment_propority = #{payment_propority} ,
</if>
<if test="payment_requirement !=null and payment_requirement !=''">
payment_requirement = #{payment_requirement}
</if>
where payment_unid = #{payment_unid}
</update>
<select id="queryPaymentAgree" parameterType="String" resultType="com.vion.financial.entity.PaymentAgree">
select * from tb_payment_agree where contract_unid = #{contract_unid}
</select>
<delete id="deletePaymentAgree" parameterType="int">
delete from tb_payment_agree where payment_unid = #{payment_unid}
</delete>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.vion.financial.mapper.PaymentAgreeMapper">
<insert id="addPaymentAgree" parameterType="com.vion.financial.entity.PaymentAgree">
insert into tb_payment_agree (
contract_unid,
<if test="payment_type !=null and payment_type !=''">
payment_type,
</if>
<if test="payment_progress !=null and payment_progress !=''">
payment_progress,
</if>
<if test="days !=null and days !=''">
days,
</if>
<if test="payment_propority !=null and payment_propority !=''">
payment_propority,
</if>
<if test="payment_requirement !=null and payment_requirement !=''">
payment_requirement
</if>
)
values(
#{contract_unid},
<if test="payment_type !=null and payment_type !=''">
#{payment_type},
</if>
<if test="payment_progress !=null and payment_progress !=''">
#{payment_progress},
</if>
<if test="days !=null and days !=''">
#{days},
</if>
<if test="payment_propority !=null and payment_propority !=''">
#{payment_propority},
</if>
<if test="payment_requirement !=null and payment_requirement !=''">
#{payment_requirement}
</if>
)
</insert>
<update id="updatePaymentAgree" parameterType="com.vion.financial.entity.PaymentAgree">
update tb_payment_agree set
contract_unid=#{contract_unid},
<if test="payment_type != null and payment_type !=''">
payment_type = #{payment_type} ,
</if>
<if test="payment_progress !=null and payment_progress !=''">
payment_progress = #{payment_progress} ,
</if>
<if test="days !=null and days !=''">
days = #{days} ,
</if>
<if test="payment_propority !=null and payment_propority !=''">
payment_propority = #{payment_propority} ,
</if>
<if test="payment_requirement !=null and payment_requirement !=''">
payment_requirement = #{payment_requirement}
</if>
where payment_unid = #{payment_unid}
</update>
<select id="queryPaymentAgree" parameterType="String" resultType="com.vion.financial.entity.PaymentAgree">
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>
<delete id="deletePaymentAgree" parameterType="int">
delete from tb_payment_agree where payment_unid = #{payment_unid}
</delete>
</mapper>
\ No newline at end of file
......@@ -2,64 +2,76 @@ package com.vion.financial.service.imp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.vion.financial.config.FinanceConfig;
import com.vion.financial.entity.Appendix;
import com.vion.financial.mapper.AppendixMapper;
import com.vion.financial.mapper.ContractMapper;
import com.vion.financial.mapper.PaymentAgreeMapper;
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.FailCode;
import com.vion.financial.vo.ResultVo;
import com.vion.financial.vo.SelectVo;
import com.vion.financial.vo.SuccessCode;
import net.sf.json.JSONObject;
@Service
public class ContractServiceImpl implements ContractService {
Logger logger = LoggerFactory.getLogger(ContractServiceImpl.class);
Logger logger = LoggerFactory.getLogger(ContractServiceImpl.class);
@Autowired
ContractMapper contractMapper;
@Autowired
AppendixMapper appendixMapper;
@Autowired
PaymentAgreeMapper paymentAgreeMapper;
@Autowired
SuccessCode successCode;
@Autowired
FailCode failCode;
@Autowired
FinanceConfig financeConfig;
/***
* 新增合同信息
*/
@Override
public Object addOne(ContractVo contractVo) {
try {
//先插入合同信息
// 先插入合同信息
logger.info("============新增合同 start ============");
//根据附件unid集合更新附件表信息
// 根据附件unid集合更新附件表信息
Appendix appendix = new Appendix();
if(contractMapper.queryOne(contractVo.getContract_unid()) !=null) {
if (contractMapper.queryOne(contractVo.getContract_unid()) != null) {
contractMapper.updateOne(contractVo);
}else {
} else {
contractMapper.addOne(contractVo);
}
appendix.setBusiness_table("tb_contract");
appendix.setBusiness_unid(contractVo.getContract_unid());
for(int n:contractVo.getAppendix_unids()) {
for (int n : contractVo.getAppendix_unids()) {
appendix.setAppendix_unid(n);
appendixMapper.updateAppendix(appendix);
}
return successCode;
} catch (Exception e) {
e.printStackTrace();
logger.error("增加合同异常:"+e.getLocalizedMessage(), e);
logger.error("增加合同异常:" + e.getLocalizedMessage(), e);
failCode.setEcode("500");
failCode.setEnote("增加异常");
return failCode;
......@@ -70,17 +82,23 @@ public class ContractServiceImpl implements ContractService {
public Object queryOne(String s) {
try {
logger.info("================查询合同start===================");
ContractVo contractVo = contractMapper.queryOne(s);
Appendix appendix = new Appendix();
appendix.setBusiness_table("tb_contract");
appendix.setBusiness_unid(s);
List<Appendix> appendixs = appendixMapper.queryAppendixList(appendix);
contractVo.setAppendix_list(appendixs);
return contractVo;
if (contractMapper.isDelete(s)) {
ContractVo contractVo = contractMapper.queryOne(s);
Appendix appendix = new Appendix();
appendix.setBusiness_table("tb_contract");
appendix.setBusiness_unid(s);
List<Appendix> appendixs = appendixMapper.queryAppendixList(appendix);
contractVo.setAppendix_list(appendixs);
return contractVo;
} else {
failCode.setEcode("100");
failCode.setEnote("合同已删除");
return failCode;
}
} catch (Exception e) {
// TODO: handle exception
/* return failCode;*/
logger.error("查询合同异常"+e.getLocalizedMessage(),e);
/* return failCode; */
logger.error("查询合同异常" + e.getLocalizedMessage(), e);
e.printStackTrace();
failCode.setEcode("500");
failCode.setEnote("查询异常");
......@@ -96,14 +114,14 @@ public class ContractServiceImpl implements ContractService {
Appendix appendix = new Appendix();
appendix.setBusiness_table("tb_contract");
appendix.setBusiness_unid(vontractVo.getContract_unid());
for(int n:vontractVo.getAppendix_unids()) {
for (int n : vontractVo.getAppendix_unids()) {
appendix.setAppendix_unid(n);
appendixMapper.updateAppendix(appendix);
}
return successCode;
} catch (Exception e) {
// TODO: handle exception
logger.error("修改合同异常"+e.getLocalizedMessage(), e);
logger.error("修改合同异常" + e.getLocalizedMessage(), e);
e.printStackTrace();
failCode.setEcode("500");
failCode.setEnote("修改异常");
......@@ -115,11 +133,14 @@ public class ContractServiceImpl implements ContractService {
public Object deleteOne(String s) {
try {
logger.info("=================删除合同=================");
//contractMapper.updateSingleContract(contractVo);
Appendix appendix = new Appendix();
appendix.setBusiness_unid(s);
// contractMapper.updateSingleContract(contractVo);
contractMapper.deleteOne(s);
appendixMapper.deleteAppendix(appendix);
return successCode;
} catch (Exception e) {
logger.error("删除合同异常"+e.getLocalizedMessage(),e);
logger.error("删除合同异常" + e.getLocalizedMessage(), e);
e.printStackTrace();
failCode.setEcode("500");
failCode.setEnote("删除异常");
......@@ -139,7 +160,7 @@ public class ContractServiceImpl implements ContractService {
return contractMapper.queryList();
} catch (Exception e) {
// TODO: handle exception
logger.error("查询合同列表异常"+e.getLocalizedMessage(),e);
logger.error("查询合同列表异常" + e.getLocalizedMessage(), e);
e.printStackTrace();
failCode.setEcode("500");
failCode.setEnote("查询异常");
......@@ -152,15 +173,42 @@ public class ContractServiceImpl implements ContractService {
// TODO Auto-generated method stub
try {
logger.info("========================筛选合同列表===========================");
List<ContractVo> list=new ArrayList<ContractVo>();
for(ContractVo contractVo:contractMapper.selectByCondition(selectVo)) {
List<Map> list_data = null;
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()));
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) {
// TODO: handle exception
logger.error("筛选合同列表异常"+e.getLocalizedMessage(),e);
logger.error("筛选合同列表异常" + e.getLocalizedMessage(), e);
failCode.setEcode("500");
failCode.setEnote("筛选异常");
return failCode;
......
......@@ -39,7 +39,7 @@ public class DeliverGoodsServiceImpl implements DeliverGoodsService {
try {
Appendix appendix = new Appendix();
logger.info("=====================增加发货信息=====================");
if((boolean)contractService.isDelete(s)) {
if(!contractService.isDelete(s)) {
List<DeliverGoods> list=deliverGoodsVo.getList_deliver_data();
for(DeliverGoods deliverGoods:list) {
deliverGoods.setContract_unid(s);
......@@ -73,7 +73,7 @@ public class DeliverGoodsServiceImpl implements DeliverGoodsService {
deliverGoodsVo.setList_deliver_data(new ArrayList());
Appendix appendix = null;
logger.info("========================查询发货信息========================");
if(contractService.isDelete(s)) {
if(!contractService.isDelete(s)) {
List<DeliverGoods> list=deliverGoodsMapper.queryDeliverGoods(s);
for(DeliverGoods deliverGoods:list) {
appendix = new Appendix();
......@@ -105,7 +105,7 @@ public class DeliverGoodsServiceImpl implements DeliverGoodsService {
try {
Appendix appendix=null;
logger.info("===========================修改发货信息===========================");
if(contractService.isDelete(s)) {
if(!contractService.isDelete(s)) {
List<DeliverGoods> list_deliver_data=deliverGoodsVo.getList_deliver_data();
for(DeliverGoods deliverGoods:list_deliver_data) {
deliverGoodsMapper.updateDeliverGoods(deliverGoods);
......@@ -138,7 +138,7 @@ public class DeliverGoodsServiceImpl implements DeliverGoodsService {
try {
logger.info("=========================删除合同发货信息=======================");
Appendix appendix=null;
if(contractService.isDelete(s)) {
if(!contractService.isDelete(s)) {
for(int deliverUnid :deliverGoodsVo.getDeliver_unids()) {
deliverGoodsMapper.deleteDeliverGoods(deliverUnid);
appendix=new Appendix();
......
......@@ -31,7 +31,7 @@ public class PaymentAgreeServiceImpl implements PaymentAgreeService {
public Object addPaymentAgree(PaymentAgreeVo paymentAgreeVo,String s) {
try {
logger.info("==============增加付款约定信息===================");
if((boolean) contractServiceImpl.isDelete(s)) {
if(! contractServiceImpl.isDelete(s)) {
List<PaymentAgree> list = paymentAgreeVo.getList_payment_data();
for(PaymentAgree paymentAgree:list) {
paymentAgree.setContract_unid(s);
......@@ -56,7 +56,7 @@ public class PaymentAgreeServiceImpl implements PaymentAgreeService {
public Object queryPaymentAgree(String s) {
try {
logger.info("===============查询付款约定信息start=====================");
if((boolean) contractServiceImpl.isDelete(s)) {
if(! contractServiceImpl.isDelete(s)) {
return paymentAgreeMapper.queryPaymentAgree(s);
}
failCode.setEcode("100");
......@@ -77,7 +77,7 @@ public class PaymentAgreeServiceImpl implements PaymentAgreeService {
try {
logger.info("==============修改付款约定信息===================");
if((boolean) contractServiceImpl.isDelete(s)) {
if(! contractServiceImpl.isDelete(s)) {
List<PaymentAgree> list = paymentAgreeVo.getList_payment_data();
for(PaymentAgree paymentAgree:list) {
paymentAgree.setContract_unid(s);
......@@ -103,7 +103,7 @@ public class PaymentAgreeServiceImpl implements PaymentAgreeService {
// TODO Auto-generated method stub
try {
logger.info("==============删除付款约定信息===================");
if((boolean) contractServiceImpl.isDelete(s)) {
if(! contractServiceImpl.isDelete(s)) {
List<PaymentAgree> list = paymentAgreeVo.getList_payment_data();
for(PaymentAgree paymentAgree:list) {
paymentAgree.setContract_unid(s);
......
......@@ -39,7 +39,7 @@ public class ProjectAcceptancServiceImpl implements ProjectAcceptancService {
try {
Appendix appendix = new Appendix();
logger.info("=====================增加合同验收信息=====================");
if((boolean)contractService.isDelete(s)) {
if(!contractService.isDelete(s)) {
List<ProjectAcceptanc> list=projectAcceptancVo.getList_check_data();
for(ProjectAcceptanc projectAcceptanc:list) {
projectAcceptanc.setContract_unid(s);
......@@ -74,7 +74,7 @@ public class ProjectAcceptancServiceImpl implements ProjectAcceptancService {
projectAcceptancVo.setList_check_data(new ArrayList());
Appendix appendix = null;
logger.info("========================查询合同验收信息========================");
if(contractService.isDelete(s)) {
if(!contractService.isDelete(s)) {
List<ProjectAcceptanc> list=projectAcceptancMapper.queryProjectAcceptanc(s);
for(ProjectAcceptanc projectAcceptanc:list) {
appendix = new Appendix();
......@@ -106,7 +106,7 @@ public class ProjectAcceptancServiceImpl implements ProjectAcceptancService {
try {
logger.info("===========================修改合同验收信息===========================");
Appendix appendix=null;
if(contractService.isDelete(s)) {
if(!contractService.isDelete(s)) {
List<ProjectAcceptanc> list=projectAcceptancVo.getList_check_data();
for(ProjectAcceptanc projectAcceptanc:list) {
projectAcceptanc.setContract_unid(s);
......@@ -140,7 +140,7 @@ public class ProjectAcceptancServiceImpl implements ProjectAcceptancService {
try {
logger.info("===========================删除合同验收信息===========================");
Appendix appendix =null;
if(contractService.isDelete(s)) {
if(!contractService.isDelete(s)) {
List<Integer> list=projectAcceptancVo.getAcceptanc_unids();
for(int n:list) {
projectAcceptancMapper.deleteProjectAcceptanc(n);
......
......@@ -31,7 +31,7 @@ public class ReceiptServiceImpl implements ReceiptService {
// TODO Auto-generated method stub
try {
logger.info("=====================增加合同开票信息=====================");
if((boolean) contractServiceImpl.isDelete(s)) {
if(! contractServiceImpl.isDelete(s)) {
List<Receipt> list=receiptVo.getList_receipt_data();
for(Receipt receipt: list) {
receipt.setContract_unid(s);
......@@ -56,7 +56,7 @@ public class ReceiptServiceImpl implements ReceiptService {
// TODO Auto-generated method stub
try {
logger.info("========================查询合同开票信息=======================");
if((boolean)contractServiceImpl.isDelete(s)) {
if(!contractServiceImpl.isDelete(s)) {
return receiptMapper.queryReceipt(s);
}else {
failCode.setEcode("100");
......@@ -76,7 +76,7 @@ public class ReceiptServiceImpl implements ReceiptService {
// TODO Auto-generated method stub
try {
logger.info("===================修改合同开票信息========================");
if((boolean)contractServiceImpl.isDelete(s)) {
if(!contractServiceImpl.isDelete(s)) {
List<Receipt> list=receiptVo.getList_receipt_data();
for(Receipt receipt:list) {
receipt.setContract_unid(s);
......@@ -102,7 +102,7 @@ public class ReceiptServiceImpl implements ReceiptService {
// TODO Auto-generated method stub
try {
logger.info("=========================删除合同开票信息=======================");
if((boolean)contractServiceImpl.isDelete(s)) {
if(!contractServiceImpl.isDelete(s)) {
List<Receipt> list=receiptVo.getReceipt_unids();
for(Receipt receiptUnid :list) {
receiptMapper.deleteReceipt(receiptUnid.getReceipt_unid());
......
......@@ -33,7 +33,7 @@ public class ReturnInfoServiceImpl implements ReturnInfoService {
// TODO Auto-generated method stub
try {
logger.info("==============增加合同回款信息===================");
if((boolean) contractServiceImpl.isDelete(s)) {
if(! contractServiceImpl.isDelete(s)) {
List<ReturnInfo> list = returnInfoVo.getList_reback_data();
for(ReturnInfo returnInfo:list) {
returnInfo.setContract_unid(s);
......@@ -59,7 +59,7 @@ public class ReturnInfoServiceImpl implements ReturnInfoService {
// TODO Auto-generated method stub
try {
logger.info("===============查询回款信息=====================");
if((boolean) contractServiceImpl.isDelete(s)){
if(!contractServiceImpl.isDelete(s)){
return returnInfoMapper.queryReturnInfo(s);
}else {
failCode.setEcode("100");
......@@ -80,7 +80,7 @@ public class ReturnInfoServiceImpl implements ReturnInfoService {
// TODO Auto-generated method stub
try {
logger.info("==============修改回款信息===================");
if((boolean) contractServiceImpl.isDelete(s)) {
if(! contractServiceImpl.isDelete(s)) {
List<ReturnInfo> list = returnInfoVo.getList_reback_data();
for(ReturnInfo returnInfo:list) {
returnInfo.setContract_unid(s);
......@@ -106,7 +106,7 @@ public class ReturnInfoServiceImpl implements ReturnInfoService {
// TODO Auto-generated method stub
try {
logger.info("==============删除回款信息===================");
if((boolean) contractServiceImpl.isDelete(s)) {
if(!contractServiceImpl.isDelete(s)) {
List<ReturnInfo> list = paymentAgreeVo.getReback_unids();
for(ReturnInfo returnInfo:list) {
returnInfo.setContract_unid(s);
......
package com.vion.financial.vo;
import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
......@@ -13,24 +14,172 @@ public class SelectVo {
private String province; //所属省份
private String city; //所属市
private String county; //所属县
private int guarantee_period; //保质周
private Integer guarantee_period; //保质周
private String year; //所属年份
private String month; //所属月份
private String product_line_type; //生产线类型
private String contract_state; //合同状态
private String contract_type; //合同性质
private String acceptanc_type; //验收类型
private boolean is_archive; //是否归档
private double confirm_income_amount; //确认收入金额
private Boolean is_archive; //是否归档
private Double confirm_income_amount; //确认收入金额
private String amount_state_unid; //账款状态
private Date start_date; //设置开始查询时间
private Date end_date; //设置结束时间
private double amount_point; //设置金额查询节点
private int overdays_point; //逾期天数查询节点
private double leave_amount_point; //账款余额查询节点
private int offset; //设置查询起始位置
private int limit; //设置每次查询条数
private Double amount_point; //设置金额查询节点
private Integer overdays_point; //逾期天数查询节点
private Double leave_amount_point; //账款余额查询节点
private Integer offset; //设置查询起始位置
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:
logging:
level:
root: INFO
root: DEBUG
pattern:
level: INFO
level: DEBUG
console: "[financial_serv]-[%d{yyyy-MM-dd HH:mm:ss.SSS}]-%m%n"
path: F:\LOG\
finance:
authurl: http://192.168.9.162:20080/api/v1/auth/users
#pagehelper:
# helperDialect: postgresql
# reasonable: true
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!