评估流程

This commit is contained in:
yuezhihang
2021-07-21 10:52:22 +08:00
parent b564ff964a
commit 7d890e7fcd
17 changed files with 134 additions and 50 deletions
@@ -141,7 +141,7 @@ public class ActSarItemsEOService {
// String resId = standMap.get("standId").toString();
// //此处说明是带入的形式
// sarStandardsInfoEO.setId(resId);
// SarCompResAssess assessInfoByResId = sarCompResAssessEOService.getAssessInfoByResId(resId);
// SarCompResAssess assessInfoByResId = sarCompResAssessEOService.ssessInfoByResId(resId);
// if (assessInfoByResId != null) {
// assessInfoByResId.setProcessState("2");
// sarCompResAssessEOService.updateByPrimaryKeySelective(assessInfoByResId);
@@ -2,6 +2,7 @@ package com.adc.da.slrs.sarLawsAttrDetailedList.entity;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@@ -49,4 +50,6 @@ public class LawsDto {
private String KCCVPPSBM;
@ApiModelProperty(value = "卡车vpps中文名称")
private String KCCVPPSCN;
@ApiModelProperty(value = "责任工程师")
private String responsibleEngineer;
}
@@ -99,7 +99,7 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
@Override
public IPage<SarLawsDetailedList> AllSelectD(Integer pages, Integer size, String sortKey,
public IPage<SarLawsDetailedList> AllSelectD(Integer page, Integer pageSize, String sortKey,
String countryArea,String projectName,
String detailedList,String detailedListName) {
QueryWrapper<SarLawsDetailedList> wrapper = new QueryWrapper<>();
@@ -115,8 +115,8 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
like(StringUtils.isNotEmpty(detailedListName),"detailed_list_name",detailedListName);
}
wrapper.eq("sort_key",sortKey);
Page<SarLawsDetailedList> page = new Page<>(pages, size);
IPage<SarLawsDetailedList> userIPage = sarLawsDetailedListDao.selectPage(page, wrapper);
Page<SarLawsDetailedList> pageRes = new Page<>(page, pageSize);
IPage<SarLawsDetailedList> userIPage = sarLawsDetailedListDao.selectPage(pageRes, wrapper);
if ("1".equals(sortKey)){
Map<String,Object> map= iDicTypeEOService.getDicTypeListCode();
List<SarLawsDetailedList> list= userIPage.getRecords();
@@ -196,9 +196,11 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
else list.setDetailedListState(detailedUpDto.getDetailedListState());
sarLawsDetailedListDao.updateById(list);
detailedUpDto.setInforlist(detailedUpDto.getInforlist().substring(1,detailedUpDto.getInforlist().length()-1));
String[] split = detailedUpDto.getInforlist().split(",");
service.updateDetailedLaws(detailedUpDto.getId(), split);
if (null!=detailedUpDto.getInforlist()) {
detailedUpDto.setInforlist(detailedUpDto.getInforlist().substring(1, detailedUpDto.getInforlist().length() - 1));
String[] split = detailedUpDto.getInforlist().split(",");
service.updateDetailedLaws(detailedUpDto.getId(), split);
}
return "修改成功";
}
@@ -156,5 +156,9 @@ public class SarStandItems extends BaseEntity {
@TableField(exist = false)
private SarCompStatusInfo pgForm;
//责任工程师
private String responsibleEngineer;
}
@@ -32,7 +32,7 @@ public class SarStandItemsDto {
private String responsibleUnit;
private String responsibleEngineer;
@@ -87,7 +87,13 @@ public class SarStandProjectLibraryController extends BaseController<SarStandPro
p.setSarStandProjectLibraries(list2);
listTemp.add(p);
}
return Result.success("200",listTemp);
IPage<productLineDto> pageres=new Page();
pageres.setRecords(listTemp);
pageres.setPages(list1.getPages());
pageres.setTotal(list1.getTotal());
pageres.setCurrent(list1.getCurrent());
pageres.setSize(list1.getSize());
return Result.success("200",pageres);
}
}
@@ -34,7 +34,9 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.OutputStream;
import java.net.URLEncoder;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
@@ -55,6 +57,18 @@ public class SarStandUnqualifiedController extends BaseController<SarStandUnqual
@Autowired
private ISarStandUnqualifiedService sarStandUnqualifiedService;
@ApiOperation("未符合项整改新增")
@PostMapping("/add")
public ResponseMessage<Object> add(@RequestBody List<SarStandUnqualified> sarStandUnqualified){
sarStandUnqualified.forEach(sarStandUnqualified1 -> sarStandUnqualified1.setCreateTime(new Date()));
if (sarStandUnqualifiedService.saveBatch(sarStandUnqualified)) {
return Result.success("新增成功");
}
else{
return Result.error("新增失败");
}
}
/**
* 分页查询未符合项
* @param sarStandUnqualifiedPage:筛选、分页信息
@@ -1,7 +1,14 @@
package com.adc.da.slrs.sarStandUnqualified.dao;
import com.adc.da.slrs.sarStandUnqualified.entity.SarStandUnqualified;
import com.adc.da.slrs.sarStandUnqualified.entity.SarStandUnqualifiedPage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
/**
* <p>
@@ -12,5 +19,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @since 2021-06-15
*/
public interface SarStandUnqualifiedDao extends BaseMapper<SarStandUnqualified> {
IPage<SarStandUnqualified> getAllDatasByPage(Page page,@Param("sar") SarStandUnqualifiedPage sarStandUnqualified);
}
@@ -3,11 +3,13 @@ package com.adc.da.slrs.sarStandUnqualified.entity;
import com.adc.da.base.entity.BaseEntity;
import java.sql.Timestamp;
import java.util.Date;
import com.adc.da.slrs.sarStandUnqualified.utils.ProductTypeConverter;
import com.adc.da.slrs.sarStandUnqualified.utils.TimestampConverter;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
@@ -84,7 +86,7 @@ public class SarStandUnqualified extends BaseEntity {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@TableField("CREATE_TIME")
private Timestamp createTime;
private Date createTime;
@ExcelIgnore
@ApiModelProperty(value = "关闭状态(1为开启,2为关闭)")
@@ -96,14 +98,14 @@ public class SarStandUnqualified extends BaseEntity {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@TableField("ACTUAL_CLOSE_TIME")
private Timestamp actualCloseTime;
private Date actualCloseTime;
@ExcelProperty(value = "计划关闭时间",converter = TimestampConverter.class)
@ApiModelProperty(value = "计划关闭时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@TableField("PLAN_CLOSE_TIME")
private Timestamp planCloseTime;
private Date planCloseTime;
@ApiModelProperty(value = "未符合原因")
@TableField("REASON")
@@ -133,8 +135,18 @@ public class SarStandUnqualified extends BaseEntity {
@ExcelIgnore
@ApiModelProperty(value = "主键")
@TableId("ID")
@TableId(type = IdType.UUID)
private String id;
@ApiModelProperty(value = "质量工程师")
private String qaEngineerName;
@ApiModelProperty(value = "认证工程师")
private String authEngineerName;
@ApiModelProperty(value = "责任工程师")
private String dutyEngineerName;
}
@@ -46,4 +46,5 @@ public interface ISarStandUnqualifiedService extends IService<SarStandUnqualifie
* @return List<SarStandUnqualified>
*/
List<SarStandUnqualified> getStandUnqualifiedExcelData(StandUnqualifiedExcelVO standUnqualifiedExcelVO);
}
@@ -40,25 +40,28 @@ public class SarStandUnqualifiedServiceImpl extends ServiceImpl<SarStandUnqualif
*/
@Override
public IPage<SarStandUnqualified> getSarStandUnqualifiedPage(SarStandUnqualifiedPage sarStandUnqualifiedPage) {
QueryWrapper<SarStandUnqualified> sarStandUnqualifiedQueryWrapper=new QueryWrapper<>();
if(sarStandUnqualifiedPage.getStandId()!=null){
sarStandUnqualifiedQueryWrapper.and(wrapper->wrapper.eq("stand_id",sarStandUnqualifiedPage.getStandId()).or().like("stand_name","%"+sarStandUnqualifiedPage.getStandId()+"%"));
// sarStandUnqualifiedQueryWrapper.eq("stand_id",sarStandUnqualifiedPage.getStandId()).or().like("stand_name","%"+sarStandUnqualifiedPage.getStandId()+"%");
}
//仅查询未关闭的
sarStandUnqualifiedQueryWrapper.eq("close_state",1);
if(sarStandUnqualifiedPage.getProductName()!=null){
sarStandUnqualifiedQueryWrapper.like("product_name","%"+sarStandUnqualifiedPage.getProductName()+"%");
}
if(sarStandUnqualifiedPage.getResponsibleUnit()!=null){
sarStandUnqualifiedQueryWrapper.eq("responsible_unit",sarStandUnqualifiedPage.getResponsibleUnit());
}
Page<SarStandUnqualified> standUnqualifiedPage=new Page<>();
//判断前端是否提供页码和每页条数
if(sarStandUnqualifiedPage.getCurrent()!=null&&sarStandUnqualifiedPage.getSize()!=null){
standUnqualifiedPage=new Page<>(sarStandUnqualifiedPage.getCurrent(),sarStandUnqualifiedPage.getSize());
}
return sarStandUnqualifiedDao.selectPage(standUnqualifiedPage,sarStandUnqualifiedQueryWrapper);
// QueryWrapper<SarStandUnqualified> sarStandUnqualifiedQueryWrapper=new QueryWrapper<>();
// if(sarStandUnqualifiedPage.getStandId()!=null){
// sarStandUnqualifiedQueryWrapper.and(wrapper->wrapper.eq("stand_id",sarStandUnqualifiedPage.getStandId()).or().like("stand_name","%"+sarStandUnqualifiedPage.getStandId()+"%"));
//// sarStandUnqualifiedQueryWrapper.eq("stand_id",sarStandUnqualifiedPage.getStandId()).or().like("stand_name","%"+sarStandUnqualifiedPage.getStandId()+"%");
// }
// //仅查询未关闭的
// sarStandUnqualifiedQueryWrapper.eq("close_state",1);
// if(sarStandUnqualifiedPage.getProductName()!=null){
// sarStandUnqualifiedQueryWrapper.like("product_name","%"+sarStandUnqualifiedPage.getProductName()+"%");
// }
// if(sarStandUnqualifiedPage.getResponsibleUnit()!=null){
// sarStandUnqualifiedQueryWrapper.eq("responsible_unit",sarStandUnqualifiedPage.getResponsibleUnit());
// }
// Page<SarStandUnqualified> standUnqualifiedPage=new Page<>();
// //判断前端是否提供页码和每页条数
// if(sarStandUnqualifiedPage.getCurrent()!=null&&sarStandUnqualifiedPage.getSize()!=null){
// standUnqualifiedPage=new Page<>(sarStandUnqualifiedPage.getCurrent(),sarStandUnqualifiedPage.getSize());
// }
Page pag = new Page();
pag.setCurrent(sarStandUnqualifiedPage.getCurrent()).setSize(sarStandUnqualifiedPage.getSize());
return sarStandUnqualifiedDao.getAllDatasByPage(pag,sarStandUnqualifiedPage);
}
/**
@@ -12,6 +12,7 @@ import com.adc.da.slrs.sarStandardComplianceAssessResult.service.ISarInterpretat
import com.adc.da.slrs.sarStandardComplianceAssessResult.service.ISarStandardComplianceProductAssessService;
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
import com.adc.da.slrs.sarStandardsInfo.service.ISarStandardsInfoService;
import com.adc.da.util.UUIDUtils;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -25,9 +26,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
* <p>
@@ -170,10 +169,14 @@ public class SarStandardComplianceAssessResultController {
}
@ApiOperation(value = "插入标准涉及项目符合性清单")
@PostMapping("/product")
public ResponseMessage insertProduct(List<SarStandardComplianceProductAssess> eo) throws Exception {
@PostMapping("/add")
public ResponseMessage insertProduct(@RequestBody List<SarStandardComplianceProductAssess> eo) throws Exception {
iSarStandardComplianceProductAssessService.saveOrUpdateBatch(eo);
eo.forEach(sarStandardComplianceProductAssess -> {
sarStandardComplianceProductAssess.setId(UUIDUtils.randomUUID(32));
sarStandardComplianceProductAssess.setInterpretationTime(new Date());
});
iSarStandardComplianceProductAssessService.saveBatch(eo);
return Result.success();
@@ -109,4 +109,6 @@ public class SarStandardComplianceProductAssess extends BaseEntity {
private Date interpretationTime;
private String id;
}
@@ -643,7 +643,7 @@
<select id="selectAllItemsByIds" resultType="com.adc.da.slrs.sarStandItems.entity.SarStandItemsDto">
select ID,STAND_ID,ITEMS_NUM,ITEMS_NAME,RESPONSIBLE_UNIT,SVPPS,APPLY_ARCTIC,CLAIM_TYPE,BUS_STAND_COVER
select ID,STAND_ID,ITEMS_NUM,ITEMS_NAME,RESPONSIBLE_UNIT,SVPPS,APPLY_ARCTIC,CLAIM_TYPE,BUS_STAND_COVER,DUTY_ENGINEER as responsibleEngineer
from SAR_STAND_ITEMS
where FILE_TYPE=#{type}
@@ -15,7 +15,7 @@
a.ID IN
<foreach collection="param1" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach
</foreach>
</where>
</select>
@@ -47,7 +47,7 @@
WHERE ID =#{param1,jdbcType=VARCHAR}
</select>
<select id="selectLawsByIdC" resultType="com.adc.da.slrs.sarLawsAttrDetailedList.entity.LawsDto">
SELECT a.ID,a.STAND_NUMBER,a.STAND_NAME,a.STAND_EN_NAME,b.NYLX,a.PUT_TIME,b.XCXSSRQGJ,b.ZCCSSRQGJ,b.ZRBM,b.SYCPX,b.CYCVPPSBM,b.CYCVPPSCN,b.KCCVPPSBM,b.KCCVPPSCN
SELECT a.ID,a.STAND_NUMBER,a.STAND_NAME,a.STAND_EN_NAME,b.NYLX,a.PUT_TIME,b.XCXSSRQGJ,b.ZCCSSRQGJ,b.ZRBM,b.SYCPX,b.CYCVPPSBM,b.CYCVPPSCN,b.KCCVPPSBM,b.KCCVPPSCN,b.ZRGCS as responsibleEngineer
FROM sar_standards_info a LEFT JOIN sar_stand_attr_info b on
a.ID = b.STAND_ID
<where>
@@ -3,12 +3,12 @@
<mapper namespace="com.adc.da.slrs.sarStandProjectLibrary.dao.SarStandProjectLibraryDao">
<!-- <select id="queryProjectManagerPage" resultType="com.adc.da.slrs.sarStandProjectLibrary.entity.SarStandProjectLibrary">-->
<!-- select s.product_line,t.UNAME as uName-->
<!-- from sar_stand_project_library s-->
<!-- INNER JOIN ts_user t-->
<!-- ON s.project_manager=t.USID-->
<!-- GROUP BY s.product_line-->
<!-- limit #{current},#{pageSize}-->
<!-- </select>-->
<select id="queryProjectManagerPage" resultType="com.adc.da.slrs.sarStandProjectLibrary.entity.SarStandProjectLibrary">
select s.product_line,t.UNAME as uName ,s.project_manager as projectManager
from sar_stand_project_library s
INNER JOIN ts_user t
ON s.project_manager=t.USID
GROUP BY s.product_line
limit #{current},#{pageSize}
</select>
</mapper>
@@ -2,4 +2,31 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.adc.da.slrs.sarStandUnqualified.dao.SarStandUnqualifiedDao">
<select id="getAllDatasByPage" resultType="com.adc.da.slrs.sarStandUnqualified.entity.SarStandUnqualified">
SELECT
a.*,
b.UNAME AS qaEngineerName,
c.UNAME AS authEngineerName,
d.UNAME AS dutyEngineerName
FROM
sar_stand_unqualified a
LEFT JOIN ts_user b ON a.QA_ENGINEER = b.USID
LEFT JOIN ts_user c ON a.AUTH_ENGINEER = c.USID
LEFT JOIN ts_user d ON a.DUTY_ENGINEER = d.USID
WHERE
a.close_state = 1
<if test="sar.productName != null and sar.productName != '' ">
and a.product_name like concat(concat('%',#{sar.productName}),'%')
</if>
<if test="sar.standName != null and sar.standName != '' ">
and a.stand_name like concat(concat('%',#{sar.standName}),'%')
</if>
<if test="sar.productName != null and sar.productName != '' ">
and a.responsible_unit = #{responsibleUnit}
</if>
<if test="sar.standId != null and sar.standId != '' ">
and a.stand_id = #{standId}
</if>
</select>
</mapper>