|
@@ -20,6 +20,8 @@ import com.jeeplus.business.reimbursement.domain.*;
|
|
|
import com.jeeplus.business.reimbursement.mapper.*;
|
|
|
import com.jeeplus.business.reimbursement.service.dto.JyReimbursementDetailInfoProjectDTO;
|
|
|
import com.jeeplus.business.reimbursement.service.dto.JyReimbursementInfoDTO;
|
|
|
+import com.jeeplus.business.workContractInfo.domain.JyWorkContractInfo;
|
|
|
+import com.jeeplus.business.workContractInfo.mapper.JyWorkContractInfoMapper;
|
|
|
import com.jeeplus.common.TokenProvider;
|
|
|
import com.jeeplus.core.query.QueryWrapperGenerator;
|
|
|
import com.jeeplus.sys.domain.WorkAttachmentInfo;
|
|
@@ -68,6 +70,9 @@ public class JyReimbursementInfoService {
|
|
|
@Resource
|
|
|
private PaymentMapper paymentMapper;
|
|
|
|
|
|
+ @Resource
|
|
|
+ private JyWorkContractInfoMapper contractInfoMapper;
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 列表查询
|
|
@@ -142,7 +147,54 @@ public class JyReimbursementInfoService {
|
|
|
if (StringUtils.isNotBlank(item.getProjectId())) {
|
|
|
String proName = selectProjectByIds(item.getProjectId());
|
|
|
item.setProjectName(proName);
|
|
|
+ //项目类型
|
|
|
+ String[] split = item.getProjectId().split(",");
|
|
|
+ List<String> idList = Arrays.asList(split);
|
|
|
+ List<JyProject> infos = jyProjectService.getListByIds(idList);
|
|
|
+ String newType="";
|
|
|
+ StringBuffer stringBuffer = new StringBuffer();
|
|
|
+ for (JyProject info : infos) {
|
|
|
+ if (StringUtils.isNotBlank(info.getContractId())){
|
|
|
+ JyWorkContractInfo contractInfo = contractInfoMapper.findById(info.getContractId());
|
|
|
+ if (ObjectUtils.isNotEmpty(contractInfo)){
|
|
|
+
|
|
|
+ if (StringUtils.isNotBlank(contractInfo.getContractTypeFirst())){
|
|
|
+ newType = contractInfoMapper.findType(contractInfo.getContractTypeFirst());
|
|
|
+ if (stringBuffer.length() > 0) {
|
|
|
+ stringBuffer.append(","); // 如果不是第一个类型,则添加逗号
|
|
|
+ }
|
|
|
+ stringBuffer.append(newType);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(contractInfo.getContractType())){
|
|
|
+ if (!contractInfo.getContractType().contains(",")){
|
|
|
+ newType= contractInfoMapper.findType2(contractInfo.getContractType());
|
|
|
+ if (stringBuffer.length() > 0) {
|
|
|
+ stringBuffer.append(","); // 如果不是第一个类型,则添加逗号
|
|
|
+ }
|
|
|
+ stringBuffer.append(newType);
|
|
|
+ }else {
|
|
|
+ String[] split1 = contractInfo.getContractType().split(",");
|
|
|
+ for (String s : split1) {
|
|
|
+ String type= contractInfoMapper.findType2(s);
|
|
|
+ if (stringBuffer.length() > 0) {
|
|
|
+ stringBuffer.append(","); // 如果不是第一个类型,则添加逗号
|
|
|
+ }
|
|
|
+ stringBuffer.append(type);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ String da = stringBuffer.toString();
|
|
|
+ if (da.contains(",")){
|
|
|
+ newType=stringBuffer.substring(0,stringBuffer.lastIndexOf(","));
|
|
|
+ }
|
|
|
+ item.setProjectType(newType);
|
|
|
+
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
});
|
|
|
return list;
|
|
@@ -625,6 +677,48 @@ public class JyReimbursementInfoService {
|
|
|
if (CollectionUtil.isNotEmpty(projectList)) {
|
|
|
projectName = projectList.stream().map(JyProject::getName).collect(Collectors.joining(","));
|
|
|
projectNumber = projectList.stream().map(JyProject::getNo).collect(Collectors.joining(","));
|
|
|
+ //项目类型
|
|
|
+ String newType="";
|
|
|
+ StringBuffer stringBuffer = new StringBuffer();
|
|
|
+ for (JyProject info : projectList) {
|
|
|
+ if (StringUtils.isNotBlank(info.getContractId())){
|
|
|
+ JyWorkContractInfo contractInfo = contractInfoMapper.findById(info.getContractId());
|
|
|
+ if (ObjectUtils.isNotEmpty(contractInfo)){
|
|
|
+
|
|
|
+ if (StringUtils.isNotBlank(contractInfo.getContractTypeFirst())){
|
|
|
+ newType = contractInfoMapper.findType(contractInfo.getContractTypeFirst());
|
|
|
+ if (stringBuffer.length() > 0) {
|
|
|
+ stringBuffer.append(","); // 如果不是第一个类型,则添加逗号
|
|
|
+ }
|
|
|
+ stringBuffer.append(newType);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(contractInfo.getContractType())){
|
|
|
+ if (!contractInfo.getContractType().contains(",")){
|
|
|
+ newType= contractInfoMapper.findType2(contractInfo.getContractType());
|
|
|
+ if (stringBuffer.length() > 0) {
|
|
|
+ stringBuffer.append(","); // 如果不是第一个类型,则添加逗号
|
|
|
+ }
|
|
|
+ stringBuffer.append(newType);
|
|
|
+ }else {
|
|
|
+ String[] split1 = contractInfo.getContractType().split(",");
|
|
|
+ for (String s : split1) {
|
|
|
+ String type= contractInfoMapper.findType2(s);
|
|
|
+ if (stringBuffer.length() > 0) {
|
|
|
+ stringBuffer.append(","); // 如果不是第一个类型,则添加逗号
|
|
|
+ }
|
|
|
+ stringBuffer.append(type);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ String da = stringBuffer.toString();
|
|
|
+ if (da.contains(",")){
|
|
|
+ newType=stringBuffer.substring(0,stringBuffer.lastIndexOf(","));
|
|
|
+ }
|
|
|
+ projectDetail.setProjectType(newType);
|
|
|
}
|
|
|
projectDetail.setProjectName(projectName);
|
|
|
projectDetail.setProjectNumber(projectNumber);
|