|
@@ -107,7 +107,7 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
|
@Override
|
|
|
public HttpRespMsg getContractPage(HttpServletRequest request, Integer pageIndex, Integer pageSize, String number, String name,
|
|
|
String typeName, Integer status, String startDate, String endDate,
|
|
|
- String paymentStartDate, String paymentEndDate, Integer secTypeId,String customerOrg,Integer finishStatus) {
|
|
|
+ String paymentStartDate, String paymentEndDate, Integer secTypeId,String customerOrg,Integer finishStatus,Integer stampDutyStatus ) {
|
|
|
HttpRespMsg httpRespMsg = new HttpRespMsg();
|
|
|
try {
|
|
|
String token = request.getHeader("token");
|
|
@@ -140,8 +140,8 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
|
// if (StringUtils.isNotBlank(name)){
|
|
|
// name = "%" + name + "%";
|
|
|
// }
|
|
|
- List<Contract> contracts = contractMapper.selectContract(user.getCompanyId(), pageStart, pageSize, number, name , typeName , status, startDate,endDate, paymentStartDate, paymentEndDate, secTypeId,customerOrg,finishStatus);
|
|
|
- Long totalCnt = contractMapper.selectContractCnt(user.getCompanyId(), number, name, typeName, status, startDate, endDate, paymentStartDate, paymentEndDate, secTypeId,customerOrg,finishStatus);
|
|
|
+ List<Contract> contracts = contractMapper.selectContract(user.getCompanyId(), pageStart, pageSize, number, name , typeName , status, startDate,endDate, paymentStartDate, paymentEndDate, secTypeId,customerOrg,finishStatus,stampDutyStatus);
|
|
|
+ Long totalCnt = contractMapper.selectContractCnt(user.getCompanyId(), number, name, typeName, status, startDate, endDate, paymentStartDate, paymentEndDate, secTypeId,customerOrg,finishStatus,stampDutyStatus);
|
|
|
for (Contract contract : contracts) {
|
|
|
if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
|
|
|
contract.setCreatorName(contract.getCreatorWxCorpId());
|
|
@@ -438,6 +438,7 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
|
HttpRespMsg httpRespMsg = new HttpRespMsg();
|
|
|
User user = userMapper.selectById(request.getHeader("token"));
|
|
|
List<SysRichFunction> functionContractList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "管理全部合同");
|
|
|
+ boolean isAddPayRecord=false;
|
|
|
if(functionContractList.size() <= 0){
|
|
|
httpRespMsg.setError(MessageUtils.message("access.operationError"));
|
|
|
return httpRespMsg;
|
|
@@ -480,6 +481,9 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
|
if (payCustomized.getIsPayed()) {
|
|
|
bg = bg.add(payCustomized.getPayedAmount());
|
|
|
}
|
|
|
+ if (payCustomized.getReservedAmounts()==null){
|
|
|
+ isAddPayRecord=true;
|
|
|
+ }
|
|
|
}
|
|
|
contract.setPayment(bg);
|
|
|
}else {
|
|
@@ -525,6 +529,10 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
|
contractLogMapper.insert(contractLog);
|
|
|
if (user.getCompanyId() == 4215) {
|
|
|
custom.setContractId(contract.getId());
|
|
|
+ ContractCustom customSelect = contractCustomMapper.selectOne(new QueryWrapper<ContractCustom>().eq("contract_id", contract.getId()));
|
|
|
+ if (!customSelect.getIsAmountFixed()&&customSelect.getStampDutyStatus()==2&&isAddPayRecord){
|
|
|
+ custom.setStampDutyStatus(3);
|
|
|
+ }
|
|
|
contractCustomMapper.updateById(custom);
|
|
|
}
|
|
|
httpRespMsg.msg = MessageUtils.message("contract.editSuc");
|