Merge branch 'develop_master' into 'FOTON'
Develop master See merge request LiuChao/foton-slrs-system-rest!303
This commit is contained in:
+29
@@ -0,0 +1,29 @@
|
||||
package com.adc.da.slrs.ActivityDatas.controller;
|
||||
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.ActivityDatas.entity.receiveData;
|
||||
import com.adc.da.slrs.ActivityDatas.service.ActivityDataService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@Api(description = "|EsRevisePlan|")
|
||||
@RequestMapping("api/activityData")
|
||||
public class ActivityDataController {
|
||||
|
||||
@Autowired
|
||||
ActivityDataService activityDataService;
|
||||
|
||||
@ApiOperation(value = "返回拼接的数据")
|
||||
@PostMapping("/backData")
|
||||
public ResponseMessage<Object> queryAllPlans(receiveData receiveData){
|
||||
return Result.success(activityDataService.dealWithDatas(receiveData.getJson()));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
package com.adc.da.slrs.ActivityDatas.controller.tools;
|
||||
|
||||
import net.sf.json.JsonConfig;
|
||||
import net.sf.json.processors.JsonValueProcessor;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
public class JsonDateValueProcessor implements JsonValueProcessor {
|
||||
|
||||
private String datePattern = "yyyy-MM-dd HH:mm:ss";//默认样式,可以在构造方法中修改
|
||||
public JsonDateValueProcessor() {
|
||||
super();
|
||||
}
|
||||
public JsonDateValueProcessor(String datePattern) {
|
||||
super();
|
||||
this.datePattern = datePattern;
|
||||
}
|
||||
public Object processArrayValue(Object value, JsonConfig jsonConfig) {
|
||||
try {
|
||||
if(value instanceof Date){
|
||||
SimpleDateFormat sdf = new SimpleDateFormat(datePattern);
|
||||
Date date = (Date)value;
|
||||
return sdf.format(date);
|
||||
}
|
||||
return value == null ? null : value.toString();
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
public Object processObjectValue(String key, Object value, JsonConfig jsonConfig) {
|
||||
return processArrayValue(value, jsonConfig);
|
||||
}
|
||||
public String getDatePattern() {
|
||||
return datePattern;
|
||||
}
|
||||
public void setDatePattern(String datePattern) {
|
||||
this.datePattern = datePattern;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
/**
|
||||
* Copyright 2021 bejson.com
|
||||
*/
|
||||
package com.adc.da.slrs.ActivityDatas.entity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Auto-generated: 2021-07-09 16:11:32
|
||||
*
|
||||
* @author bejson.com (i@bejson.com)
|
||||
* @website http://www.bejson.com/java2pojo/
|
||||
*/
|
||||
@Data
|
||||
public class BreakdownList {
|
||||
|
||||
private String id;
|
||||
private String svpps;
|
||||
private String standId;
|
||||
private String itemsNum;
|
||||
private String claimType;
|
||||
private String itemsName;
|
||||
private String applyArctic;
|
||||
private String busStandCover;
|
||||
private String responsibleUnit;
|
||||
private String responsibleEngineer;
|
||||
private String technicalRequir;
|
||||
private String changePoint;
|
||||
private String xcxssrq;
|
||||
private String zccssrq;
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setSvpps(String svpps) {
|
||||
this.svpps = svpps;
|
||||
}
|
||||
public String getSvpps() {
|
||||
return svpps;
|
||||
}
|
||||
|
||||
public void setStandId(String standId) {
|
||||
this.standId = standId;
|
||||
}
|
||||
public String getStandId() {
|
||||
return standId;
|
||||
}
|
||||
|
||||
public void setItemsNum(String itemsNum) {
|
||||
this.itemsNum = itemsNum;
|
||||
}
|
||||
public String getItemsNum() {
|
||||
return itemsNum;
|
||||
}
|
||||
|
||||
public void setClaimType(String claimType) {
|
||||
this.claimType = claimType;
|
||||
}
|
||||
public String getClaimType() {
|
||||
return claimType;
|
||||
}
|
||||
|
||||
public void setItemsName(String itemsName) {
|
||||
this.itemsName = itemsName;
|
||||
}
|
||||
public String getItemsName() {
|
||||
return itemsName;
|
||||
}
|
||||
|
||||
public void setApplyArctic(String applyArctic) {
|
||||
this.applyArctic = applyArctic;
|
||||
}
|
||||
public String getApplyArctic() {
|
||||
return applyArctic;
|
||||
}
|
||||
|
||||
public void setBusStandCover(String busStandCover) {
|
||||
this.busStandCover = busStandCover;
|
||||
}
|
||||
public String getBusStandCover() {
|
||||
return busStandCover;
|
||||
}
|
||||
|
||||
public void setResponsibleUnit(String responsibleUnit) {
|
||||
this.responsibleUnit = responsibleUnit;
|
||||
}
|
||||
public String getResponsibleUnit() {
|
||||
return responsibleUnit;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
/**
|
||||
* Copyright 2021 bejson.com
|
||||
*/
|
||||
package com.adc.da.slrs.ActivityDatas.entity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Auto-generated: 2021-07-09 16:11:32
|
||||
*
|
||||
* @author bejson.com (i@bejson.com)
|
||||
* @website http://www.bejson.com/java2pojo/
|
||||
*/
|
||||
@Data
|
||||
public class DataList {
|
||||
|
||||
private String uname;
|
||||
private String productLine;
|
||||
private String distributePerson;
|
||||
private String distributePersonId;
|
||||
private String projectManager;
|
||||
|
||||
//合规评估添加的数据
|
||||
|
||||
private String itemNum;
|
||||
private String xCXSSRQ;
|
||||
private String zCCSSRQ;
|
||||
private String itemsName;
|
||||
private String standName;
|
||||
private String implementer;
|
||||
private String projectName;
|
||||
private String standNumber;
|
||||
private String noCompliance;
|
||||
private String implementerId;
|
||||
private String projectNumber;
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date completionTime;
|
||||
private String zcNoCompliance;
|
||||
private String countermeasures;
|
||||
private String qualityEngineer;
|
||||
private String responsibleUnit;
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date zcCompletionTime;
|
||||
private String certifiedEngineer;
|
||||
private String complianceReasons;
|
||||
private String zcCountermeasures;
|
||||
private String responsibleEngineer;
|
||||
private String zcComplianceReasons;
|
||||
private String technicalRequir;
|
||||
private String changePoint;
|
||||
|
||||
private List<SarStandProjectLibraries> sarStandProjectLibraries;
|
||||
public void setUname(String uname) {
|
||||
this.uname = uname;
|
||||
}
|
||||
public String getUname() {
|
||||
return uname;
|
||||
}
|
||||
|
||||
public void setProductLine(String productLine) {
|
||||
this.productLine = productLine;
|
||||
}
|
||||
public String getProductLine() {
|
||||
return productLine;
|
||||
}
|
||||
|
||||
public void setSarStandProjectLibraries(List<SarStandProjectLibraries> sarStandProjectLibraries) {
|
||||
this.sarStandProjectLibraries = sarStandProjectLibraries;
|
||||
}
|
||||
public List<SarStandProjectLibraries> getSarStandProjectLibraries() {
|
||||
return sarStandProjectLibraries;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,132 @@
|
||||
package com.adc.da.slrs.ActivityDatas.entity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class PEPDTO {
|
||||
|
||||
private String id;
|
||||
private List<DataList> dataList;
|
||||
private SarStandProjectLibraries sarStandProjectLibraries;
|
||||
private String jlUserId;
|
||||
private String passFlag;
|
||||
private String zrUserId;
|
||||
private String standName;
|
||||
private String standNumber;
|
||||
private List<BreakdownList> breakdownList;
|
||||
private String prcCreateUser;
|
||||
private String applyUpdUserId;
|
||||
private String approvalOpinion;
|
||||
private String qualityEngineer;
|
||||
private String qualityEngineerName;
|
||||
private String certifiedEngineer;
|
||||
private String certifiedEngineerName;
|
||||
private String prcCreateUserName;
|
||||
//返回分发责任人
|
||||
private String distributePerson;
|
||||
private String distributePersonId;
|
||||
private String uname;
|
||||
private String projectManager;
|
||||
//责任人 (对应到每条数据一个责任人)
|
||||
private String workPeople;
|
||||
//在研在产字段!!! 待定中 下发落实人需要使用
|
||||
//时间字段
|
||||
private String ZCCSSRQ;
|
||||
private String XCXSSRQ;
|
||||
|
||||
private String commentText;
|
||||
|
||||
private List<Step3DTO> step3DTOS;
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setDataList(List<DataList> dataList) {
|
||||
this.dataList = dataList;
|
||||
}
|
||||
public List<DataList> getDataList() {
|
||||
return dataList;
|
||||
}
|
||||
|
||||
public void setJlUserId(String jlUserId) {
|
||||
this.jlUserId = jlUserId;
|
||||
}
|
||||
public String getJlUserId() {
|
||||
return jlUserId;
|
||||
}
|
||||
|
||||
public void setZrUserId(String zrUserId) {
|
||||
this.zrUserId = zrUserId;
|
||||
}
|
||||
public String getZrUserId() {
|
||||
return zrUserId;
|
||||
}
|
||||
|
||||
public void setStandName(String standName) {
|
||||
this.standName = standName;
|
||||
}
|
||||
public String getStandName() {
|
||||
return standName;
|
||||
}
|
||||
|
||||
public void setStandNumber(String standNumber) {
|
||||
this.standNumber = standNumber;
|
||||
}
|
||||
public String getStandNumber() {
|
||||
return standNumber;
|
||||
}
|
||||
|
||||
public void setBreakdownList(List<BreakdownList> breakdownList) {
|
||||
this.breakdownList = breakdownList;
|
||||
}
|
||||
public List<BreakdownList> getBreakdownList() {
|
||||
return breakdownList;
|
||||
}
|
||||
|
||||
public void setPrcCreateUser(String prcCreateUser) {
|
||||
this.prcCreateUser = prcCreateUser;
|
||||
}
|
||||
public String getPrcCreateUser() {
|
||||
return prcCreateUser;
|
||||
}
|
||||
|
||||
public void setApplyUpdUserId(String applyUpdUserId) {
|
||||
this.applyUpdUserId = applyUpdUserId;
|
||||
}
|
||||
public String getApplyUpdUserId() {
|
||||
return applyUpdUserId;
|
||||
}
|
||||
|
||||
public void setApprovalOpinion(String approvalOpinion) {
|
||||
this.approvalOpinion = approvalOpinion;
|
||||
}
|
||||
public String getApprovalOpinion() {
|
||||
return approvalOpinion;
|
||||
}
|
||||
|
||||
public void setQualityEngineer(String qualityEngineer) {
|
||||
this.qualityEngineer = qualityEngineer;
|
||||
}
|
||||
public String getQualityEngineer() {
|
||||
return qualityEngineer;
|
||||
}
|
||||
|
||||
public void setCertifiedEngineer(String certifiedEngineer) {
|
||||
this.certifiedEngineer = certifiedEngineer;
|
||||
}
|
||||
public String getCertifiedEngineer() {
|
||||
return certifiedEngineer;
|
||||
}
|
||||
|
||||
public void setPrcCreateUserName(String prcCreateUserName) {
|
||||
this.prcCreateUserName = prcCreateUserName;
|
||||
}
|
||||
public String getPrcCreateUserName() {
|
||||
return prcCreateUserName;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.adc.da.slrs.ActivityDatas.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class PEPres {
|
||||
|
||||
private List<PEPDTO> pepdtos;
|
||||
|
||||
|
||||
private List<Step3DTO> step3DTOS;
|
||||
}
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
/**
|
||||
* Copyright 2021 bejson.com
|
||||
*/
|
||||
package com.adc.da.slrs.ActivityDatas.entity;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Auto-generated: 2021-07-09 16:11:32
|
||||
*
|
||||
* @author bejson.com (i@bejson.com)
|
||||
* @website http://www.bejson.com/java2pojo/
|
||||
*/
|
||||
public class SarStandProjectLibraries {
|
||||
|
||||
private String id;
|
||||
private String uname;
|
||||
private String currentNode;
|
||||
private String productLine;
|
||||
private String projectName;
|
||||
private String projectGroup;
|
||||
private String projectLevel;
|
||||
private String projectNumber;
|
||||
private String projectStatus;
|
||||
private Date projectEndDate;
|
||||
private String projectManager;
|
||||
private String projectPlatfor;
|
||||
private Date projectStartDate;
|
||||
private String projectClassification;
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setUname(String uname) {
|
||||
this.uname = uname;
|
||||
}
|
||||
public String getUname() {
|
||||
return uname;
|
||||
}
|
||||
|
||||
public void setCurrentNode(String currentNode) {
|
||||
this.currentNode = currentNode;
|
||||
}
|
||||
public String getCurrentNode() {
|
||||
return currentNode;
|
||||
}
|
||||
|
||||
public void setProductLine(String productLine) {
|
||||
this.productLine = productLine;
|
||||
}
|
||||
public String getProductLine() {
|
||||
return productLine;
|
||||
}
|
||||
|
||||
public void setProjectName(String projectName) {
|
||||
this.projectName = projectName;
|
||||
}
|
||||
public String getProjectName() {
|
||||
return projectName;
|
||||
}
|
||||
|
||||
public void setProjectGroup(String projectGroup) {
|
||||
this.projectGroup = projectGroup;
|
||||
}
|
||||
public String getProjectGroup() {
|
||||
return projectGroup;
|
||||
}
|
||||
|
||||
public void setProjectLevel(String projectLevel) {
|
||||
this.projectLevel = projectLevel;
|
||||
}
|
||||
public String getProjectLevel() {
|
||||
return projectLevel;
|
||||
}
|
||||
|
||||
public void setProjectNumber(String projectNumber) {
|
||||
this.projectNumber = projectNumber;
|
||||
}
|
||||
public String getProjectNumber() {
|
||||
return projectNumber;
|
||||
}
|
||||
|
||||
public void setProjectStatus(String projectStatus) {
|
||||
this.projectStatus = projectStatus;
|
||||
}
|
||||
public String getProjectStatus() {
|
||||
return projectStatus;
|
||||
}
|
||||
|
||||
public void setProjectEndDate(Date projectEndDate) {
|
||||
this.projectEndDate = projectEndDate;
|
||||
}
|
||||
public Date getProjectEndDate() {
|
||||
return projectEndDate;
|
||||
}
|
||||
|
||||
public void setProjectManager(String projectManager) {
|
||||
this.projectManager = projectManager;
|
||||
}
|
||||
public String getProjectManager() {
|
||||
return projectManager;
|
||||
}
|
||||
|
||||
public void setProjectPlatfor(String projectPlatfor) {
|
||||
this.projectPlatfor = projectPlatfor;
|
||||
}
|
||||
public String getProjectPlatfor() {
|
||||
return projectPlatfor;
|
||||
}
|
||||
|
||||
public void setProjectStartDate(Date projectStartDate) {
|
||||
this.projectStartDate = projectStartDate;
|
||||
}
|
||||
public Date getProjectStartDate() {
|
||||
return projectStartDate;
|
||||
}
|
||||
|
||||
public void setProjectClassification(String projectClassification) {
|
||||
this.projectClassification = projectClassification;
|
||||
}
|
||||
public String getProjectClassification() {
|
||||
return projectClassification;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
/**
|
||||
* Copyright 2021 bejson.com
|
||||
*/
|
||||
package com.adc.da.slrs.ActivityDatas.entity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Auto-generated: 2021-07-12 17:52:47
|
||||
*
|
||||
* @author bejson.com (i@bejson.com)
|
||||
* @website http://www.bejson.com/java2pojo/
|
||||
*/
|
||||
@Data
|
||||
public class Step3DTO {
|
||||
|
||||
private String id;
|
||||
private String uname;
|
||||
private String itemNum;
|
||||
private String itemsName;
|
||||
private String standName;
|
||||
private String implementer;
|
||||
private String productLine;
|
||||
private String projectName;
|
||||
private String standNumber;
|
||||
private String implementerId;
|
||||
private String projectNumber;
|
||||
private String projectManager;
|
||||
private String qualityEngineer;
|
||||
private String qualityEngineerName;
|
||||
private String qaEngineer;
|
||||
private String distributePerson;
|
||||
private String certifiedEngineer;
|
||||
private String certifiedEngineerName;
|
||||
private String authEngineer;
|
||||
private String distributePersonId;
|
||||
private String zCCSSRQ;
|
||||
private String xCXSSRQ;
|
||||
private String responsibleUnit;
|
||||
private String responsibleEngineer;
|
||||
private String dutyEngineer;
|
||||
private String standId;
|
||||
private String standardInfo;
|
||||
private String typeId;
|
||||
|
||||
private String technicalRequir;
|
||||
private String changePoint;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.adc.da.slrs.ActivityDatas.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class receiveData {
|
||||
|
||||
private String json;
|
||||
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package com.adc.da.slrs.ActivityDatas.service;
|
||||
|
||||
|
||||
public interface ActivityDataService {
|
||||
|
||||
public String dealWithDatas(String json);
|
||||
|
||||
|
||||
}
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
package com.adc.da.slrs.ActivityDatas.service.impl;
|
||||
|
||||
import com.adc.da.slrs.ActivityDatas.controller.tools.JsonDateValueProcessor;
|
||||
import com.adc.da.slrs.ActivityDatas.entity.*;
|
||||
import com.adc.da.slrs.ActivityDatas.service.ActivityDataService;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import net.sf.json.JsonConfig;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@Service
|
||||
public class ActivityDataServiceimpl implements ActivityDataService {
|
||||
|
||||
public String dealWithDatas(String json){
|
||||
JSONObject object = JSONObject.parseObject(json);
|
||||
//先获取标准的数据
|
||||
List<BreakdownList> breakdownList = JSONArray.parseArray(object.getString("breakdownList"), BreakdownList.class);
|
||||
//再获取产品线和项目对应信息
|
||||
List<DataList> dataList = JSONArray.parseArray(object.getString("dataList"), DataList.class);
|
||||
|
||||
PEPDTO pepdto = JSONObject.parseObject(json, PEPDTO.class);
|
||||
|
||||
//生成任务信息
|
||||
Map<String,String> numberWithId=new HashMap<>();
|
||||
|
||||
PEPres pePres = new PEPres();
|
||||
for (DataList da : dataList) {
|
||||
List<PEPDTO> pepdtos = new ArrayList<>();
|
||||
for (SarStandProjectLibraries sa : da.getSarStandProjectLibraries()) {
|
||||
numberWithId.put(sa.getProjectNumber(), sa.getId());
|
||||
for (BreakdownList breakdownList1 : breakdownList) {
|
||||
//造数据
|
||||
//项目
|
||||
PEPDTO res = new PEPDTO();
|
||||
BeanUtils.copyProperties(pepdto, res);
|
||||
List<DataList> dataLists = new ArrayList<>();
|
||||
DataList dataList1 = new DataList();
|
||||
List<SarStandProjectLibraries> list = new ArrayList<>();
|
||||
SarStandProjectLibraries libraries = new SarStandProjectLibraries();
|
||||
BeanUtils.copyProperties(sa, libraries);
|
||||
res.setSarStandProjectLibraries(libraries);
|
||||
list.add(sa);
|
||||
dataList1.setSarStandProjectLibraries(list);
|
||||
dataLists.add(dataList1);
|
||||
res.setDataList(dataLists);
|
||||
//标准 数据
|
||||
BreakdownList breakdownList2 = new BreakdownList();
|
||||
BeanUtils.copyProperties(breakdownList1, breakdownList2);
|
||||
List<BreakdownList> breakdownLists = new ArrayList<>();
|
||||
breakdownLists.add(breakdownList2);
|
||||
res.setBreakdownList(breakdownLists);
|
||||
res.setCertifiedEngineerName(object.getString("certifiedEngineerName"));
|
||||
res.setQualityEngineerName(object.getString("qualityEngineerName"));
|
||||
//存储终点数据
|
||||
res.setDistributePerson(da.getDistributePerson());
|
||||
res.setDistributePersonId(da.getDistributePersonId());
|
||||
res.setUname(da.getUname());
|
||||
res.setProjectManager(da.getProjectManager());
|
||||
//时间
|
||||
res.setXCXSSRQ(breakdownList1.getXcxssrq());
|
||||
res.setZCCSSRQ(breakdownList1.getZccssrq());
|
||||
pepdtos.add(res);
|
||||
}
|
||||
}
|
||||
pePres.setPepdtos(pepdtos);
|
||||
}
|
||||
return delWithTime(pePres);
|
||||
}
|
||||
|
||||
|
||||
public static String delWithTime(PEPres a){
|
||||
JsonConfig jsonConfig = new JsonConfig();
|
||||
jsonConfig.registerJsonValueProcessor(Date.class, new JsonDateValueProcessor());
|
||||
net.sf.json.JSONObject jsonObject = net.sf.json.JSONObject.fromObject(a,jsonConfig);
|
||||
return jsonObject.toString();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package com.adc.da.slrs.sapMeetInfo.entity;
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@@ -32,6 +33,7 @@ public class SapMeeting{
|
||||
|
||||
private String title;//会议标题
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date date;//会议开始时间
|
||||
|
||||
|
||||
+6
@@ -13,6 +13,7 @@ import com.adc.da.slrs.sarLawsDetailedList.entity.TimeDto;
|
||||
import com.adc.da.slrs.sarLawsDetailedList.service.ISarLawsDetailedListService;
|
||||
import com.adc.da.slrs.sarStandardsInfo.dao.SarStandardsInfoDao;
|
||||
import com.adc.da.slrs.sarStandardsInfo.service.impl.SarStandardsInfoServiceImpl;
|
||||
import com.adc.da.slrs.sarUser.service.ITsUserService;
|
||||
import com.adc.da.sys.service.IDicTypeEOService;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
@@ -54,6 +55,8 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
private SarLawsAttrDetailedListServiceImpl service;
|
||||
@Autowired
|
||||
private IDicTypeEOService iDicTypeEOService;
|
||||
@Autowired
|
||||
private ITsUserService iTsUserService;
|
||||
|
||||
@Override
|
||||
public String del(List<String> idList) {
|
||||
@@ -345,6 +348,9 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
}
|
||||
}
|
||||
}
|
||||
/////asdfghjkl
|
||||
|
||||
|
||||
userIPage.setRecords(list);
|
||||
}
|
||||
System.out.println("总条数" + userIPage.getTotal());
|
||||
|
||||
+31
@@ -8,6 +8,7 @@ import com.adc.da.slrs.sarStandProjectLibrary.entity.myResponse.ResponseDto;
|
||||
import com.adc.da.slrs.sarStandProjectLibrary.service.impl.SarStandProjectLibraryServiceImpl;
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -122,6 +123,36 @@ public class SarStandProjectLibraryController extends BaseController<SarStandPro
|
||||
pageres.setSize(list1.getSize());
|
||||
return Result.success("200",pageres);
|
||||
}
|
||||
|
||||
@GetMapping("/queryProjectUnderLine")
|
||||
@ApiOperation("查询产品线项目经理")
|
||||
public ResponseMessage queryProjectUnderLine(@RequestParam(defaultValue = "1", value = "current")int current,
|
||||
@RequestParam(defaultValue = "10", value = "PageSize") int pageSize,
|
||||
standDTO standDTO){
|
||||
List<String> strings=new ArrayList<>();
|
||||
if (!standDTO.getProductLine().isEmpty()){
|
||||
if (standDTO.getProductLine().contains(",")){
|
||||
strings.addAll(new ArrayList<>(Arrays.asList(standDTO.getProductLine().split(","))));
|
||||
}else {
|
||||
strings.add(standDTO.getProductLine());
|
||||
}
|
||||
}
|
||||
Page page=new Page();
|
||||
page.setCurrent(current);
|
||||
page.setSize(pageSize);
|
||||
QueryWrapper<SarStandProjectLibrary> queryWrapper=new QueryWrapper<>();
|
||||
if (null!=standDTO.getProjectNumber()) {
|
||||
queryWrapper.like("project_number", standDTO.getProjectNumber());
|
||||
}
|
||||
if (null!=standDTO.getProjectName()) {
|
||||
queryWrapper.like("project_name", standDTO.getProjectName());
|
||||
}
|
||||
queryWrapper.in("product_line",strings);
|
||||
queryWrapper.orderByAsc("product_line");
|
||||
// 创建一个新的list集合,用于存储去重后的元素
|
||||
IPage<SarStandProjectLibrary> pageres=sarStandProjectLibraryService.page(page,queryWrapper);
|
||||
return Result.success("200",pageres);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param current
|
||||
|
||||
@@ -8,4 +8,8 @@ public class standDTO {
|
||||
private String uname;
|
||||
|
||||
private String productLine;
|
||||
|
||||
private String projectName;
|
||||
|
||||
private String projectNumber;
|
||||
}
|
||||
|
||||
@@ -78,4 +78,6 @@ public interface ITsUserService extends IService<TsUser> {
|
||||
List<SarMenu> getSecondMenusByUserId(String userId);
|
||||
|
||||
List<UpDTO> selectByName(String name);
|
||||
|
||||
List<UpDTO> selectNameById(List<String> strings,String type);
|
||||
}
|
||||
|
||||
@@ -305,4 +305,24 @@ public class TsUserServiceImpl extends ServiceImpl<TsUserDao, TsUser> implements
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UpDTO> selectNameById(List<String> strings,String type) {
|
||||
QueryWrapper<TsUser> tsUserQueryWrapper=new QueryWrapper<>();
|
||||
tsUserQueryWrapper.in("ACCOUNT",strings);
|
||||
QueryWrapper<TsUser> nameQueryWrapper=new QueryWrapper<>();
|
||||
nameQueryWrapper.in("UNAME",strings);
|
||||
List<TsUser> res= tsUserDao.selectList(tsUserQueryWrapper);
|
||||
List<TsUser> res1= tsUserDao.selectList(nameQueryWrapper);
|
||||
res1.removeIf(tsUser -> res.contains(tsUser));
|
||||
res.addAll(res1);
|
||||
List<UpDTO> result=new ArrayList<>();
|
||||
res.forEach(tsUser -> {
|
||||
UpDTO upDTO=new UpDTO();
|
||||
upDTO.setValue(tsUser.getUname()+"("+tsUser.getAccount()+")");
|
||||
upDTO.setId(tsUser.getUserId());
|
||||
result.add(upDTO);
|
||||
});
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user