|
@@ -80,8 +80,6 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
private ContractLogMapper contractLogMapper;
|
|
private ContractLogMapper contractLogMapper;
|
|
@Resource
|
|
@Resource
|
|
private InformationMapper informationMapper;
|
|
private InformationMapper informationMapper;
|
|
- @Resource
|
|
|
|
- private CompanyDingdingMapper companyDingdingMapper;
|
|
|
|
@Value(value = "${upload.path}")
|
|
@Value(value = "${upload.path}")
|
|
private String path;
|
|
private String path;
|
|
@Autowired
|
|
@Autowired
|
|
@@ -111,7 +109,6 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
String token = request.getHeader("token");
|
|
String token = request.getHeader("token");
|
|
User user = userMapper.selectById(token);
|
|
User user = userMapper.selectById(token);
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", user.getCompanyId()));
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", user.getCompanyId()));
|
|
- CompanyDingding dingding = companyDingdingMapper.selectOne(new LambdaQueryWrapper<CompanyDingding>().eq(CompanyDingding::getCompanyId, user.getCompanyId()));
|
|
|
|
List<SysRichFunction> functionContractList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "查看全部合同");
|
|
List<SysRichFunction> functionContractList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "查看全部合同");
|
|
if(functionContractList.size() <= 0){
|
|
if(functionContractList.size() <= 0){
|
|
httpRespMsg.setError(MessageUtils.message("access.viewError"));
|
|
httpRespMsg.setError(MessageUtils.message("access.viewError"));
|
|
@@ -193,14 +190,17 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
contractPageVO.setPayment(contract.getPayment());
|
|
contractPageVO.setPayment(contract.getPayment());
|
|
contractPageVO.setNextPaymentDate(contract.getNextPaymentDate());
|
|
contractPageVO.setNextPaymentDate(contract.getNextPaymentDate());
|
|
contractPageVO.setNextPaymentAmount(contract.getNextPaymentAmount());
|
|
contractPageVO.setNextPaymentAmount(contract.getNextPaymentAmount());
|
|
|
|
+ contractPageVO.setPlate1(contract.getPlate1());
|
|
|
|
+ contractPageVO.setPlate2(contract.getPlate2());
|
|
|
|
+ contractPageVO.setPlate3(contract.getPlate3());
|
|
|
|
+ contractPageVO.setPlate4(contract.getPlate4());
|
|
|
|
+ contractPageVO.setPlate5(contract.getPlate5());
|
|
if (contract.getStatus().equals(2)){
|
|
if (contract.getStatus().equals(2)){
|
|
for (Map<String, Object> contractLog : contractLogs) {
|
|
for (Map<String, Object> contractLog : contractLogs) {
|
|
if (contractLog.get("contractId").toString().equals(contract.getId().toString())){
|
|
if (contractLog.get("contractId").toString().equals(contract.getId().toString())){
|
|
String msg = "";
|
|
String msg = "";
|
|
if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
|
|
if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
|
|
msg = "$userName=" + contractLog.get("operateCorpWxId") + "$" + contractLog.get("msg");
|
|
msg = "$userName=" + contractLog.get("operateCorpWxId") + "$" + contractLog.get("msg");
|
|
- }else if(dingding!=null&&dingding.getContactNeedTranslate()==1){
|
|
|
|
- msg = "$userName=" + contractLog.get("operateName") + "$" + contractLog.get("msg");
|
|
|
|
}else {
|
|
}else {
|
|
msg = contractLog.get("operateName") + "" + contractLog.get("msg");
|
|
msg = contractLog.get("operateName") + "" + contractLog.get("msg");
|
|
}
|
|
}
|
|
@@ -256,7 +256,6 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
return httpRespMsg;
|
|
return httpRespMsg;
|
|
}
|
|
}
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", user.getCompanyId()));
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", user.getCompanyId()));
|
|
- CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", user.getCompanyId()));
|
|
|
|
HttpRespMsg contractPage = getContractPage(request, null, null, number, name, typeName, status, startDate, endDate, paymentStartDate, paymentEndDate, secTypeId,customerOrg,finishStatus);
|
|
HttpRespMsg contractPage = getContractPage(request, null, null, number, name, typeName, status, startDate, endDate, paymentStartDate, paymentEndDate, secTypeId,customerOrg,finishStatus);
|
|
HashMap<String, Object> resultDate = (HashMap<String, Object>) contractPage.data;
|
|
HashMap<String, Object> resultDate = (HashMap<String, Object>) contractPage.data;
|
|
List<ContractPageVO> data = (List<ContractPageVO>)resultDate.get("data");
|
|
List<ContractPageVO> data = (List<ContractPageVO>)resultDate.get("data");
|
|
@@ -291,8 +290,6 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
item.add(contract.getEndDate()==null?"":contract.getEndDate()+"");
|
|
item.add(contract.getEndDate()==null?"":contract.getEndDate()+"");
|
|
if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
|
|
if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
|
|
contract.setCreatorName("$userName=" + contract.getCreatorWxCorpId() + "$");
|
|
contract.setCreatorName("$userName=" + contract.getCreatorWxCorpId() + "$");
|
|
- }else if(dingding!=null&&dingding.getContactNeedTranslate()==1){
|
|
|
|
- contract.setCreatorName("$userName=" + contract.getCreatorName() + "$");
|
|
|
|
}else {
|
|
}else {
|
|
contract.setCreatorName(contract.getCreatorName());
|
|
contract.setCreatorName(contract.getCreatorName());
|
|
}
|
|
}
|
|
@@ -426,7 +423,7 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
public HttpRespMsg editContract(HttpServletRequest request, Contract contract, ContractCustom custom, String paymentListStr) {
|
|
public HttpRespMsg editContract(HttpServletRequest request, Contract contract, ContractCustom custom, String paymentListStr) {
|
|
HttpRespMsg httpRespMsg = new HttpRespMsg();
|
|
HttpRespMsg httpRespMsg = new HttpRespMsg();
|
|
User user = userMapper.selectById(request.getHeader("token"));
|
|
User user = userMapper.selectById(request.getHeader("token"));
|
|
- List<SysRichFunction> functionContractList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "管理全部合同");
|
|
|
|
|
|
+ List<SysRichFunction> functionContractList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "查看全部合同");
|
|
if(functionContractList.size() <= 0){
|
|
if(functionContractList.size() <= 0){
|
|
httpRespMsg.setError(MessageUtils.message("access.operationError"));
|
|
httpRespMsg.setError(MessageUtils.message("access.operationError"));
|
|
return httpRespMsg;
|
|
return httpRespMsg;
|
|
@@ -1149,7 +1146,7 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
HttpRespMsg msg = new HttpRespMsg();
|
|
HttpRespMsg msg = new HttpRespMsg();
|
|
String token = request.getHeader("TOKEN");
|
|
String token = request.getHeader("TOKEN");
|
|
User user = userMapper.selectById(token);
|
|
User user = userMapper.selectById(token);
|
|
- List<SysRichFunction> functionContractList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "管理全部合同");
|
|
|
|
|
|
+ List<SysRichFunction> functionContractList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "查看全部合同");
|
|
if(functionContractList.size() <= 0){
|
|
if(functionContractList.size() <= 0){
|
|
msg.setError(MessageUtils.message("access.deleteError"));
|
|
msg.setError(MessageUtils.message("access.deleteError"));
|
|
return msg;
|
|
return msg;
|