|
@@ -5,28 +5,33 @@ import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.serializer.SerializerFeature;
|
|
import com.alibaba.fastjson.serializer.SerializerFeature;
|
|
import com.jeeplus.common.utils.StringUtils;
|
|
import com.jeeplus.common.utils.StringUtils;
|
|
import com.jeeplus.common.web.BaseController;
|
|
import com.jeeplus.common.web.BaseController;
|
|
|
|
+import com.jeeplus.modules.projectVisa.entity.ProjectVisa;
|
|
import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
|
|
import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
|
|
import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectRecordsService;
|
|
import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectRecordsService;
|
|
import com.jeeplus.modules.sys.dao.OfficeDao;
|
|
import com.jeeplus.modules.sys.dao.OfficeDao;
|
|
import com.jeeplus.modules.sys.entity.Office;
|
|
import com.jeeplus.modules.sys.entity.Office;
|
|
import com.jeeplus.modules.sys.entity.User;
|
|
import com.jeeplus.modules.sys.entity.User;
|
|
|
|
+import com.jeeplus.modules.sys.service.WorkattachmentService;
|
|
import com.jeeplus.modules.sys.utils.UserUtils;
|
|
import com.jeeplus.modules.sys.utils.UserUtils;
|
|
import com.jeeplus.modules.workclientinfo.dao.WorkClientBankDao;
|
|
import com.jeeplus.modules.workclientinfo.dao.WorkClientBankDao;
|
|
import com.jeeplus.modules.workclientinfo.dao.WorkClientInfoDao;
|
|
import com.jeeplus.modules.workclientinfo.dao.WorkClientInfoDao;
|
|
import com.jeeplus.modules.workclientinfo.dao.WorkClientLinkmanDao;
|
|
import com.jeeplus.modules.workclientinfo.dao.WorkClientLinkmanDao;
|
|
|
|
+import com.jeeplus.modules.workclientinfo.entity.WorkClientAttachment;
|
|
import com.jeeplus.modules.workclientinfo.entity.WorkClientBank;
|
|
import com.jeeplus.modules.workclientinfo.entity.WorkClientBank;
|
|
import com.jeeplus.modules.workclientinfo.entity.WorkClientInfo;
|
|
import com.jeeplus.modules.workclientinfo.entity.WorkClientInfo;
|
|
import com.jeeplus.modules.workclientinfo.entity.WorkClientLinkman;
|
|
import com.jeeplus.modules.workclientinfo.entity.WorkClientLinkman;
|
|
import com.jeeplus.modules.workcontractinfo.dao.WorkContractInfoDao;
|
|
import com.jeeplus.modules.workcontractinfo.dao.WorkContractInfoDao;
|
|
import com.jeeplus.modules.workcontractinfo.entity.WorkContractInfo;
|
|
import com.jeeplus.modules.workcontractinfo.entity.WorkContractInfo;
|
|
|
|
+import com.jeeplus.modules.workreceiptsregister.entity.ResponseEntity;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import java.util.*;
|
|
import java.util.*;
|
|
-@Controller
|
|
|
|
|
|
+@RestController
|
|
@RequestMapping(value = "${adminPath}/ccpmList/ccpmList")
|
|
@RequestMapping(value = "${adminPath}/ccpmList/ccpmList")
|
|
public class CcpmList{
|
|
public class CcpmList{
|
|
|
|
|
|
@@ -48,6 +53,9 @@ public class CcpmList{
|
|
@Autowired
|
|
@Autowired
|
|
private WorkClientBankDao workClientBankDao;
|
|
private WorkClientBankDao workClientBankDao;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private WorkattachmentService workattachmentService;
|
|
|
|
+
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取苏州分公司下的部门
|
|
* 获取苏州分公司下的部门
|
|
@@ -69,6 +77,17 @@ public class CcpmList{
|
|
//根据部门获取项目信息
|
|
//根据部门获取项目信息
|
|
for (Office office : list) {
|
|
for (Office office : list) {
|
|
List<RuralProjectRecords> projectRecords=projectRecordsService.getListByOffice(office.getId());
|
|
List<RuralProjectRecords> projectRecords=projectRecordsService.getListByOffice(office.getId());
|
|
|
|
+ if (projectRecords != null){
|
|
|
|
+ for (RuralProjectRecords projectRecord : projectRecords) {
|
|
|
|
+ if (null !=projectRecord){
|
|
|
|
+ if(org.apache.commons.lang3.StringUtils.isNotBlank(projectRecord.getBelongingDepartment()) && "其他".equals(projectRecord.getBelongingDepartment())){
|
|
|
|
+ projectRecord.setBelongingDepartmentName("其他");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ projectRecordsService.queryLinkmanInfos(projectRecord);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
maps.addAll(projectRecords);
|
|
maps.addAll(projectRecords);
|
|
}
|
|
}
|
|
return maps;
|
|
return maps;
|
|
@@ -86,6 +105,19 @@ public class CcpmList{
|
|
//根据部门获取合同信息
|
|
//根据部门获取合同信息
|
|
for (Office office : list) {
|
|
for (Office office : list) {
|
|
List<WorkContractInfo> projectRecords=workContractInfoDao.getListByOffice(office.getId());
|
|
List<WorkContractInfo> projectRecords=workContractInfoDao.getListByOffice(office.getId());
|
|
|
|
+ for (WorkContractInfo projectRecord : projectRecords) {
|
|
|
|
+ //获取客户联系人信息
|
|
|
|
+ if (StringUtils.isNotBlank(projectRecord.getClient().getId())){
|
|
|
|
+ List<WorkClientLinkman> clientId = workClientLinkmanDao.findByClientId(projectRecord.getClient().getId());
|
|
|
|
+ if (clientId != null){
|
|
|
|
+ projectRecord.getClient().setWorkClientLinkmanList(clientId);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ WorkClientAttachment workClientAttachment = new WorkClientAttachment();
|
|
|
|
+ workClientAttachment.setAttachmentId(projectRecord.getId());
|
|
|
|
+ workClientAttachment.setAttachmentFlag("44");
|
|
|
|
+ projectRecord.setWorkAttachments(workattachmentService.getAttachmentList(workClientAttachment));
|
|
|
|
+ }
|
|
maps.addAll(projectRecords);
|
|
maps.addAll(projectRecords);
|
|
}
|
|
}
|
|
return maps;
|
|
return maps;
|
|
@@ -97,16 +129,15 @@ public class CcpmList{
|
|
public List<WorkClientInfo> getClient(){
|
|
public List<WorkClientInfo> getClient(){
|
|
List<WorkClientInfo> clientInfoList=workClientInfoDao.getAllClient();
|
|
List<WorkClientInfo> clientInfoList=workClientInfoDao.getAllClient();
|
|
//根据客户id查询客户的相关客户类型
|
|
//根据客户id查询客户的相关客户类型
|
|
- for (WorkClientInfo clientInfo: clientInfoList) {
|
|
|
|
- clientInfo.setJobTypeStr(workClientInfoDao.getJobTypeStr(clientInfo.getId()));
|
|
|
|
- if (StringUtils.isBlank(clientInfo.getClientType())){
|
|
|
|
- clientInfo.setClientType("");
|
|
|
|
- clientInfo.setClientTypeLables("");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
if(clientInfoList!=null && clientInfoList.size()>0){
|
|
if(clientInfoList!=null && clientInfoList.size()>0){
|
|
for (int i = 0; i < clientInfoList.size(); i++) {
|
|
for (int i = 0; i < clientInfoList.size(); i++) {
|
|
WorkClientInfo entity = clientInfoList.get(i);
|
|
WorkClientInfo entity = clientInfoList.get(i);
|
|
|
|
+ entity.setCompanyIndustry(workClientInfoDao.getCompanyIndustryStr(entity.getId()));
|
|
|
|
+ if (StringUtils.isBlank(entity.getClientType())){
|
|
|
|
+ entity.setClientType("");
|
|
|
|
+ entity.setClientTypeLables("");
|
|
|
|
+ }
|
|
|
|
+ //客户联系人
|
|
List<WorkClientLinkman> linkmanList = workClientLinkmanDao.findList(new WorkClientLinkman(entity));
|
|
List<WorkClientLinkman> linkmanList = workClientLinkmanDao.findList(new WorkClientLinkman(entity));
|
|
entity.setWorkClientLinkmanList(linkmanList);
|
|
entity.setWorkClientLinkmanList(linkmanList);
|
|
if(linkmanList!=null && linkmanList.size()>0){
|
|
if(linkmanList!=null && linkmanList.size()>0){
|
|
@@ -121,6 +152,11 @@ public class CcpmList{
|
|
}
|
|
}
|
|
List<WorkClientBank> bankList = workClientBankDao.findListByClient(new WorkClientBank(entity));
|
|
List<WorkClientBank> bankList = workClientBankDao.findListByClient(new WorkClientBank(entity));
|
|
entity.setWorkClientBankList(bankList);
|
|
entity.setWorkClientBankList(bankList);
|
|
|
|
+ //附件
|
|
|
|
+ WorkClientAttachment attchment = new WorkClientAttachment();
|
|
|
|
+ attchment.setAttachmentId(entity.getId());
|
|
|
|
+ List<WorkClientAttachment> attachments = workattachmentService.getAttachmentList(attchment);
|
|
|
|
+ entity.setWorkAttachments(attachments);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
List<WorkClientInfo> maps = new ArrayList<>();
|
|
List<WorkClientInfo> maps = new ArrayList<>();
|
|
@@ -130,5 +166,11 @@ public class CcpmList{
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+ @RequestMapping("/checkConnect")
|
|
|
|
+ public ResponseEntity checkConnect() {
|
|
|
|
+ ResponseEntity<String> responseEntity = new ResponseEntity<>();
|
|
|
|
+ responseEntity.setMessage("success");
|
|
|
|
+ return responseEntity;
|
|
|
|
+ }
|
|
|
|
|
|
}
|
|
}
|