Merge branch 'develop_master' into 'FOTON'

Develop master

See merge request LiuChao/foton-slrs-system-rest!262
This commit is contained in:
王夏晖
2021-12-01 20:53:15 +08:00
18 changed files with 378 additions and 8 deletions
@@ -38,10 +38,14 @@ public class SarBussionessStand extends BaseEntity {
@TableId("ID")
private String id;
@ApiModelProperty(value = "标准")
@ApiModelProperty(value = "企标标准号")
@TableField("STAND_CODE")
private String standCode;
@ApiModelProperty(value = "标准编号")
@TableField("STAND_NUMBER")
private String standNumber;
@ApiModelProperty(value = "标准名称")
@TableField("STAND_NAME")
private String standName;
@@ -17,7 +17,7 @@ import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.Api;
import com.adc.da.base.web.BaseController;
import java.util.List;
import java.util.*;
/**
* <p>
@@ -53,6 +53,29 @@ public class SarStandItemsController extends BaseController<SarStandItems> {
}
}
@ApiOperation(value = "项目评估流程分解单查询")
@GetMapping("/workflowFindItems")
public ResponseMessage workflowFindItems( @RequestParam("ids") String ids,@RequestParam("types") String types){
List<String> id=new ArrayList<>(Arrays.asList(ids.split(",")));
List<String> type=new ArrayList<>(Arrays.asList(types.split(",")));
Map<String,String> map=new HashMap<>();
int i =0 ;
for (String s:type) {
if (null!=map.get(s)){
map.put(s,map.get(s)+","+id.get(i));
}else {
map.put(s,id.get(i));
}
}
List<SarStandItemsDto> ItemDto = new ArrayList<>();
map.entrySet().forEach(stringStringEntry -> {
if (!"BDR".equals(stringStringEntry.getKey())){
ItemDto.addAll(ServiceImpl.findAllItems(stringStringEntry.getKey(),stringStringEntry.getValue().split(",")));
}
});
return Result.success("200",ItemDto);
}
@ApiOperation(value = "分解单查询")
@GetMapping("/querySarItemAndInterpretation")
public ResponseMessage querySarItemAndInterpretation(FindSarItemsPageReqDTO page){
@@ -144,6 +144,29 @@ public class SarStandProjectLibraryController extends BaseController<SarStandPro
IPage<StandAttrInfoDto> list = sarStandProjectLibraryService.queryStandInfo(current,pageSize,id,cars);
return Result.success("200",list);
}
/**
*
* @param current
* @param pageSize
* @param id
* @return
* @author zj
* date 2021-07-15
**/
@GetMapping("/queryStandInfoNew")
@ApiOperation("查询标准信息")
public ResponseMessage queryStandInfoNew(@RequestParam(defaultValue = "1", value = "current")int current, @RequestParam(defaultValue = "10", value = "PageSize") int pageSize,
String id,String cars){
// List<SarStandProjectLibrary> list = sarStandProjectLibraryService.queryStandId(id);
// List<String> list1 = new ArrayList();
// for(SarStandProjectLibrary s:list){
// list1.add(s.getStandId());
// }
// System.out.println(list1);
IPage<StandAttrInfoDto> list = sarStandProjectLibraryService.queryStandInfoNew(current,pageSize,id,cars);
return Result.success("200",list);
}
/**
*
* @param id
@@ -192,6 +215,20 @@ public class SarStandProjectLibraryController extends BaseController<SarStandPro
sarStandProjectLibraryService.batchInsert(list);
return Result.success("200","新增成功",list);
}
/**
*
* @param list
* @return
* @author zj
* date 2021-07-15
**/
@PostMapping("/batchInsertAdd")
@ApiOperation("调取标准")
public ResponseMessage batchInsertAdd(@RequestBody List<StandProjectRelationDto> list){
sarStandProjectLibraryService.batchInsertAdd(list);
return Result.success("200","新增成功",list);
}
/**
*
* @param standAttrInfoExcelDto
@@ -29,6 +29,8 @@ public interface SarStandProjectLibraryDao extends BaseMapper<SarStandProjectLib
List<String> getAllStands();
List<String> getAllStand();
List<SarStandProjectLibrary> updateByProjectId(@Param("id")String id, @Param("version")String version);
List<SarStandProjectLibrary> updateByProjectIdBath(@Param("id")List<String> id, @Param("version")String version);
void deleteByProjectId(@Param("projectId")String projectId);
List<String> selectListByids(@Param("ids") List<String> ids);
}
@@ -59,4 +59,6 @@ public class StandAttrInfoDto {
//关联模块--乘用车vpps中文名称
@ExcelProperty("关联模块--乘用车vpps中文名称")
private String CYCVPPSCN;
private Long unCount;
}
@@ -22,8 +22,11 @@ public interface SarStandProjectLibraryService {
List<SarStandProjectLibrary> queryByProductLine(String productLine);
List<SarStandProjectLibrary> queryStandId(String standId);
IPage<StandAttrInfoDto> queryStandInfo(int current, int pageSize, String standId, String cars);
IPage<StandAttrInfoDto> queryStandInfoNew(int current, int pageSize, String standId, String cars);
void deleteByIds(List<StandProjectRelationDto> ids);
void batchInsert(@Param("ids") List<StandProjectRelationDto> list);
void batchInsertAdd(@Param("ids") List<StandProjectRelationDto> list);
List<StandAttrInfoDto> exportStandAttrInfoExcel(StandAttrInfoExcelDto standAttrInfoExcelDto,String standId);
public Head AnalysisJsonAndStorage(String jsonStr);
@@ -17,6 +17,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -370,6 +371,63 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
System.out.println("总页数"+userIPage.getPages());
return userIPage;
}
@Override
public IPage<StandAttrInfoDto> queryStandInfoNew(int current, int pageSize, String standId, String cars) {
//cars传回值为1时判断是从车型项目库中调取
QueryWrapper<SarStandardsInfo> wrapper1 = new QueryWrapper<>();
wrapper1.select("ID","STAND_NUMBER","STAND_SORT","STAND_YEAR","STAND_NAME","STAND_EN_NAME","STAND_TYPE","(select count(*) from sar_stand_unqualified" +
" where STAND_ID = r.stand_id and CLOSE_STATE = '1' ) as unCount ");
wrapper1.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_standards_info.ID WHERE r.project_id ='" + standId + "'");
Page<SarStandardsInfo> page1 = new Page<>(current, pageSize);
IPage<SarStandardsInfo> userIPage1 = SarStandardsInfoDao.selectPage(page1, wrapper1);
System.out.println("总条数"+userIPage1.getTotal());
System.out.println("总页数"+userIPage1.getPages());
QueryWrapper<SarStandAttrInfo> wrapper2 = new QueryWrapper<>();
wrapper2.select("r.STAND_ID","SSRQ","XCXSSRQ","ZCCSSRQ","ZRBM","KCCVPPSBM","KCCVPPSCN","CYCVPPSBM","CYCVPPSCN");
wrapper2.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_stand_attr_info.STAND_ID WHERE r.project_id ='"+ standId+"'");
Page<SarStandAttrInfo> page2 = new Page<>(current, pageSize);
IPage<SarStandAttrInfo> userIPage2 = sarStandAttrInfoDao.selectPage(page2, wrapper2);
System.out.println("总条数"+userIPage2.getTotal());
System.out.println("总页数"+userIPage2.getPages());
List<StandAttrInfoDto> list = new ArrayList<>();
List<SarStandardsInfo> list1 = userIPage1.getRecords();
List<SarStandAttrInfo> list2 = userIPage2.getRecords();
for(SarStandardsInfo s:list1){
StandAttrInfoDto p =new StandAttrInfoDto();
p.setStandId(s.getId());
p.setStandNumber(s.getStandNumber());
p.setStandSort(s.getStandSort());
p.setStandYear(s.getStandYear());
p.setStandName(s.getStandName());
p.setStandType(s.getStandType());
p.setStandEnName(s.getStandEnName());
p.setUnCount(s.getUnCount());
for (SarStandAttrInfo a:list2){
if(s.getId().equals(a.getStandId())){
p.setCYCVPPSBM(a.getCycvppsbm());
p.setCYCVPPSCN(a.getCycvppscn());
p.setSSRQ(a.getSsrq());
p.setXCXSSRQ(a.getXcxssrq());
p.setZCCSSRQ(a.getZccssrq());
p.setKCCVPPSBM(a.getKccvppsbm());
p.setKCCVPPSCN(a.getKccvppscn());
p.setZRBM(a.getZrbm());
}
}
list.add(p);
}
IPage<StandAttrInfoDto> userIPage = new Page<>();
userIPage.setRecords(list);
userIPage.setTotal(userIPage1.getTotal());
System.out.println("总条数"+userIPage.getTotal());
System.out.println("总页数"+userIPage.getPages());
return userIPage;
}
@Override
public void deleteByIds(List<StandProjectRelationDto> ids) {
sarStandProjectLibraryDao.deleteByIds(ids);
@@ -385,6 +443,26 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
}
@Override
public void batchInsertAdd(List<StandProjectRelationDto> list) {
List<String> ids=new ArrayList<>();
List<String> projectIds=new ArrayList<>();
list.forEach(standProjectRelationDto -> {
if (!ids.contains(standProjectRelationDto.getStandId())) {
ids.add(standProjectRelationDto.getStandId());
}});
List<String> standProjectRelationDtos=sarStandProjectLibraryDao.selectListByids(ids);
List<StandProjectRelationDto> ins=new ArrayList<>();
list.forEach(standProjectRelationDto -> {
if (!standProjectRelationDtos.contains(standProjectRelationDto.getProjectId())){
ins.add(standProjectRelationDto);
projectIds.add(standProjectRelationDto.getProjectId());
}
});
sarStandProjectLibraryDao.batchInsert(ins);
sarStandProjectLibraryDao.updateByProjectIdBath(projectIds, TimeVersion());
}
@Override
public List<StandAttrInfoDto> exportStandAttrInfoExcel(StandAttrInfoExcelDto standAttrInfoExcelDto ,String id) {
List<String> ids = standAttrInfoExcelDto.getIds();
@@ -51,6 +51,9 @@ public class SarStandUnqualified extends BaseEntity {
@TableField("STAND_NAME")
private String standName;
@ApiModelProperty(value = "项目编号")
@TableField("product_id")
private String productId;
// @ExcelProperty("标准编号")
// @ApiModelProperty(value = "标准编号")
// @TableField("STAND_NUMBER")
@@ -19,7 +19,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import oracle.ucp.proxy.annotation.Post;
import org.apache.commons.beanutils.BeanUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -60,7 +59,7 @@ public class SarStandardComplianceAssessResultController {
if (eo.getStandApplicationType() == 1) {
QueryWrapper<SarStandardComplianceProductAssess> queryWrapper = new QueryWrapper<>();
IPage<SarStandardComplianceProductAssess> iPage = new Page<>(eo.getCurrent(), eo.getSize());
queryWrapper.select("distinct STAND_ID, STAND_NUMBER, STAND_NAME, STAND_TYPE, INTERPRETATION_TIME,type");
queryWrapper.select("distinct STAND_ID, STAND_NUMBER, STAND_NAME, STAND_TYPE");
if (eo.getStandName() != null && !eo.getStandName().trim().equals("")) {
queryWrapper.like("STAND_NAME", eo.getStandName().trim());
}
@@ -175,6 +174,46 @@ public class SarStandardComplianceAssessResultController {
return Result.success(page);
}
@ApiOperation(value = "标准涉及项目复合性详情")
@GetMapping("/productNewDetail")
public ResponseMessage<Map<String,IPage<SarStandardComplianceProductAssess>>> selectProductDetail(SarStandardComplianceProductAssessEO eo) throws Exception {
IPage<SarStandardComplianceProductAssess> iPage = new Page<>(eo.getCurrent(), eo.getSize());
Map<String,IPage<SarStandardComplianceProductAssess>> map=new HashMap<>();
QueryWrapper<SarStandardComplianceProductAssess> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("STAND_ID", eo.getStandId());
queryWrapper.eq("product_id", eo.getProductId());
queryWrapper.isNotNull("research_completion_time");
queryWrapper.orderByAsc("product_name");
queryWrapper.orderByAsc("standard_item");
Page p1=new Page();
IPage<SarStandardComplianceProductAssess> page = iSarStandardComplianceProductAssessService.page(iPage, queryWrapper);
BeanUtils.copyProperties(page,p1);
p1.setRecords(page.getRecords());
p1.setTotal(page.getTotal());
map.put("unfit",p1);
QueryWrapper<SarStandardComplianceProductAssess> queryWrapper1 = new QueryWrapper<>();
queryWrapper.eq("STAND_ID", eo.getStandId());
queryWrapper.eq("product_id", eo.getProductId());
queryWrapper1.ne("research_compliance","");
queryWrapper1.orderByAsc("product_name");
queryWrapper1.orderByAsc("standard_item");
IPage<SarStandardComplianceProductAssess> page1 = iSarStandardComplianceProductAssessService.page(iPage, queryWrapper1);
map.put("fit",page1);
return Result.success(map);
}
@ApiOperation(value = "标准涉及项目复合性")
@GetMapping("/productNew")
public ResponseMessage<IPage<unCountDTO>> selectProduct(unCountDTO eo) throws Exception {
Page iPage = new Page<>();
iPage.setCurrent(eo.getCurrent());
iPage.setSize(eo.getSize());
IPage<unCountDTO> page = iSarStandardComplianceProductAssessService.selectPages(iPage, eo);
return Result.success(page);
}
@ApiOperation(value = "插入标准涉及项目符合性清单")
@PostMapping("/add")
public ResponseMessage insertProduct(@RequestBody List<SarStandardComplianceProductAssess> eo) throws Exception {
@@ -1,7 +1,14 @@
package com.adc.da.slrs.sarStandardComplianceAssessResult.dao;
import com.adc.da.slrs.sarStandardComplianceAssessResult.entity.SarStandardComplianceProductAssess;
import com.adc.da.slrs.sarStandardComplianceAssessResult.entity.SarStandardComplianceProductAssessEO;
import com.adc.da.slrs.sarStandardComplianceAssessResult.entity.unCountDTO;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* <p>
@@ -13,4 +20,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public interface SarStandardComplianceProductAssessDao extends BaseMapper<SarStandardComplianceProductAssess> {
List<unCountDTO> selectPages(@Param("page")Long page,@Param("pageSize")Long size,@Param("product") unCountDTO productAssess);
List<Integer> selectPagesCount(@Param("product")unCountDTO productAssess);
}
@@ -1,7 +1,6 @@
package com.adc.da.slrs.sarStandardComplianceAssessResult.entity;
import com.adc.da.base.entity.BaseEntity;
import java.time.LocalDateTime;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableField;
@@ -121,7 +120,23 @@ public class SarStandardComplianceProductAssess extends BaseEntity {
@TableField("type")
private String type;
@ApiModelProperty(value = "评估时间")
@TableField("evaluation_time")
private String evaluationTime;
@ApiModelProperty(value = "评估人")
@TableField("evaluation_people")
private String evaluationPeople;
@ApiModelProperty(value = "评估人")
@TableField("evaluation_people_name")
private String evaluationPeopleName;
private String id;
@ApiModelProperty(value = "符合不符合")
@TableField(exist = false)
private String bfh;
}
@@ -0,0 +1,35 @@
package com.adc.da.slrs.sarStandardComplianceAssessResult.entity;
import lombok.Data;
@Data
public class unCountDTO {
private String standId;
private String productName;
private String productId;
private String productNumber;
private String productLine;
private String projectGroup;
private String projectManager;
private String uName;
private String unCount;
private Long current;
private Long size;
//项目编号
private String sarId;
private String type;
}
@@ -1,7 +1,12 @@
package com.adc.da.slrs.sarStandardComplianceAssessResult.service;
import com.adc.da.slrs.sarStandardComplianceAssessResult.entity.SarStandardComplianceProductAssess;
import com.adc.da.slrs.sarStandardComplianceAssessResult.entity.unCountDTO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;
/**
* <p>
@@ -13,4 +18,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public interface ISarStandardComplianceProductAssessService extends IService<SarStandardComplianceProductAssess> {
IPage<unCountDTO> selectPages(Page page, @Param("product") unCountDTO productAssess);
}
@@ -2,10 +2,17 @@ package com.adc.da.slrs.sarStandardComplianceAssessResult.service.impl;
import com.adc.da.slrs.sarStandardComplianceAssessResult.entity.SarStandardComplianceProductAssess;
import com.adc.da.slrs.sarStandardComplianceAssessResult.dao.SarStandardComplianceProductAssessDao;
import com.adc.da.slrs.sarStandardComplianceAssessResult.entity.SarStandardComplianceProductAssessEO;
import com.adc.da.slrs.sarStandardComplianceAssessResult.entity.unCountDTO;
import com.adc.da.slrs.sarStandardComplianceAssessResult.service.ISarStandardComplianceProductAssessService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* <p>
* 服务实现类
@@ -17,4 +24,25 @@ import org.springframework.stereotype.Service;
@Service
public class SarStandardComplianceProductAssessServiceImpl extends ServiceImpl<SarStandardComplianceProductAssessDao, SarStandardComplianceProductAssess> implements ISarStandardComplianceProductAssessService {
@Autowired
SarStandardComplianceProductAssessDao sarStandardComplianceProductAssessDao;
@Override
public IPage<unCountDTO> selectPages(Page pages, unCountDTO productAssess) {
IPage<unCountDTO> productAssessIPage= new Page<>();
List<unCountDTO> res=sarStandardComplianceProductAssessDao.selectPages(pages.getCurrent(),pages.getSize(),productAssess);
res.forEach(unCountDTO -> {unCountDTO.setStandId(productAssess.getStandId());
unCountDTO.setType(productAssess.getType());});
productAssessIPage.setRecords(res);
List<Integer> a=sarStandardComplianceProductAssessDao.selectPagesCount(productAssess);
if (null!=a) {
productAssessIPage.setTotal(a.size());
}else {
productAssessIPage.setTotal(0);
}
productAssessIPage.setCurrent(pages.getCurrent());
productAssessIPage.setSize(pages.getSize());
return productAssessIPage;
}
}
@@ -142,6 +142,10 @@ public class SarStandardsInfo extends BaseEntity {
@TableField("STAND_SYSTEM")
private String standSystem;
@ApiModelProperty(value = "为符合数量")
@TableField(exist = false)
private Long unCount;
// 以下为非表中字段
@TableField(exist = false)
@@ -37,19 +37,20 @@
<result column="standSortShow" property="standSortShow" />
<result column="stand_year" property="standYear" />
<result column="text_status_buss" property="textStatusBuss" />
<result column="stand_number" property="standNumber" />
</resultMap>
<!-- SAR_BUSSIONESS_STAND table all fields -->
<sql id="Base_Column_List" >
modify_time, creation_time, valid_flag, stand_status, replaced_stand_num,replace_stand_num,
put_time, issue_time,stand_en_name,stand_name, stand_code, id,apply_country, stand_nature, stand_sort,text_status_buss
put_time, issue_time,stand_en_name,stand_name, stand_code, id,apply_country, stand_nature, stand_sort,text_status_buss,stand_number
</sql>
<sql id="Base_Column_List_show" >
SAR_BUSSIONESS_STAND.modify_time,
SAR_BUSSIONESS_STAND.creation_time, SAR_BUSSIONESS_STAND.valid_flag,
SAR_BUSSIONESS_STAND.apply_country, SAR_BUSSIONESS_STAND.stand_nature,SAR_BUSSIONESS_STAND.stand_sort,SAR_BUSSIONESS_STAND.stand_year,
stand_status, replaced_stand_num,replace_stand_num,put_time,issue_time,stand_en_name,
stand_name, stand_code,SAR_BUSSIONESS_STAND.id,SAR_BUSSIONESS_STAND.text_status_buss
stand_name, stand_code,SAR_BUSSIONESS_STAND.id,SAR_BUSSIONESS_STAND.text_status_buss,SAR_BUSSIONESS_STAND.stand_number
</sql>
<sql id="Group_Column_List_show" >
@@ -168,6 +169,7 @@
<if test="standNature != null" >stand_Nature,</if>
<if test="standSort != null" >stand_sort,</if>
<if test="standYear != null" >stand_year,</if>
<if test="standNumber != null" >stand_number,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="modifyTime != null" >#{modifyTime, jdbcType=TIMESTAMP},</if>
@@ -187,6 +189,7 @@
<if test="standNature != null" >#{standNature, jdbcType=VARCHAR},</if>
<if test="standSort != null" >#{standSort, jdbcType=VARCHAR},</if>
<if test="standYear != null" >#{standYear, jdbcType=VARCHAR},</if>
<if test="standNumber != null" >#{standNumber, jdbcType=VARCHAR},</if>
</trim>
</insert>
@@ -246,6 +249,9 @@
<if test="standYear != null" >
stand_year = #{standYear},
</if>
<if test="standNumber != null" >
stand_number = #{standNumber},
</if>
</set>
where id = #{id}
</update>
@@ -301,6 +307,9 @@
<if test="standYear != null" >
stand_year = #{standYear},
</if>
<if test="standNumber != null" >
stand_number = #{standNumber},
</if>
</set>
where id = #{id}
</update>
@@ -373,7 +382,7 @@
when tmp_tb.stand_code like concat('%', 'Q/QCFLC', '%') THEN 16
ELSE 17
END,
tmp_tb.stand_sort ASC
tmp_tb.stand_sort ASC,CAST(tmp_tb.STAND_NUMBER AS decimal(9,2)) ASC,tmp_tb.STAND_YEAR DESC,tmp_tb.id
</sql>
<sql id="standSort_out">
ORDER BY
@@ -39,6 +39,17 @@
</if>
</update>
<update id="updateByProjectIdBath">
update sar_stand_project_library
<if test="id != null">
set detailed_list_version = #{version} where id in
<foreach collection="ids" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</update>
<select id="selectCount" resultType="java.lang.Integer">
SELECT
count(
@@ -349,4 +360,12 @@
<select id="getAllStand" resultType="java.lang.String">
SELECT DISTINCT ID FROM sar_standards_info where VALID_FLAG=0
</select>
<select id="selectListByids" resultType="java.lang.String">
select distinct sar_stand_project_relation.project_id as projectId
from sar_stand_project_relation
where sar_stand_project_relation.stand_id in
<foreach collection="ids" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</select>
</mapper>
@@ -3,5 +3,56 @@
<mapper namespace="com.adc.da.slrs.sarStandardComplianceAssessResult.dao.SarStandardComplianceProductAssessDao">
<select id="selectPages"
resultType="com.adc.da.slrs.sarStandardComplianceAssessResult.entity.unCountDTO">
select PRODUCT_NAME as productName,sar_stand_project_library.project_group as projectGroup,
sar_stand_project_library.id as sarId,
sar_stand_project_library.product_line as productLine,sar_stand_project_library.project_number as productId,
sar_stand_project_library.project_manager as projectManager,ts_user.UNAME as uName,count(*) unCount from
sar_stand_unqualified
left join sar_stand_project_library on sar_stand_unqualified.product_id = sar_stand_project_library.project_number
LEFT JOIN ts_user on ts_user.USID = sar_stand_project_library.project_manager
where STAND_ID = #{product.standId} and CLOSE_STATE = '1'
group by
PRODUCT_NAME,
sar_stand_project_library.project_group,
sar_stand_project_library.product_line,
sar_stand_project_library.project_manager,
sar_stand_project_library.project_number,
sar_stand_project_library.id,
ts_user.UNAME
<if test="null != product.productName and ''!= product.productName">
and product_name like concat(concat('%',#{product.productName}),'%')
</if>
<if test="null != product.productId and ''!= product.productId">
and project_number like concat(concat('%',#{product.productId}),'%')
</if>
ORDER BY
PRODUCT_NAME ASC
limit ${(page-1)*pageSize},${page*pageSize}
</select>
<select id="selectPagesCount"
resultType="java.lang.Integer">
select count(sar_stand_unqualified.product_id) from sar_stand_unqualified
left join sar_stand_project_library on sar_stand_unqualified.product_id = sar_stand_project_library.project_number
LEFT JOIN ts_user on ts_user.USID = sar_stand_project_library.project_manager
where STAND_ID = #{product.standId} and CLOSE_STATE = '1'
group by
PRODUCT_NAME,
sar_stand_project_library.project_group,
sar_stand_project_library.product_line,
sar_stand_project_library.project_manager,
sar_stand_project_library.project_number,
sar_stand_project_library.id,
ts_user.UNAME
<if test="null != product.productName and ''!= product.productName">
and product_name like concat(concat('%',#{product.productName}),'%')
</if>
<if test="null != product.productId and ''!= product.productId">
and project_number like concat(concat('%',#{product.productId}),'%')
</if>
ORDER BY
PRODUCT_NAME ASC
</select>
</mapper>