清单部分高级查询
This commit is contained in:
+2
@@ -23,6 +23,8 @@ public interface SarLawsAttrDetailedListDao extends BaseMapper<SarLawsAttrDetail
|
||||
|
||||
//根据清单id,查出标准的id并排序
|
||||
List<String> selectLawsId(@Param("standId") String standId,@Param("param3") Integer page,@Param("param2") Integer size,@Param("sar") SarFindDto sarFindDto);
|
||||
|
||||
List<String> selectHighLawsId(@Param("standId") String standId,@Param("sar") SarFindDto sarFindDto);
|
||||
//根据标准id查出数据
|
||||
List<LawsDto> selectLawsById(@Param("param1") List<String> LawsIds, @Param("sarFindDto") SarFindDto sarFindDto);
|
||||
//根据标准id查出数据用于清单查询
|
||||
|
||||
+4
@@ -1,7 +1,11 @@
|
||||
package com.adc.da.slrs.sarLawsAttrDetailedList.entity;
|
||||
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarAdvanceSearchVO;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 高级检索
|
||||
*
|
||||
|
||||
+7
@@ -40,6 +40,13 @@ public class BusinessDeptIssueController extends BaseController {
|
||||
return Result.success(b);
|
||||
}
|
||||
|
||||
@PostMapping("/saveBatch")
|
||||
@ApiOperation("批量新增事业部重点问题")
|
||||
public ResponseMessage saveBatch(@RequestBody List<BusinessDeptIssue> issue){
|
||||
boolean b = iBusinessDeptIssueService.saveBatch(issue);
|
||||
return Result.success(b);
|
||||
}
|
||||
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation("删除事业部重点问题")
|
||||
|
||||
+7
@@ -33,6 +33,13 @@ public class ProductDeptIssueController {
|
||||
return Result.success(b);
|
||||
}
|
||||
|
||||
@PostMapping("/saveBatch")
|
||||
@ApiOperation("新增产品规划部重点问题")
|
||||
public ResponseMessage productDeptIssueSaveBatch(@RequestBody List<ProductDeptIssue> issue){
|
||||
boolean b = iProductDeptIssueService.saveBatch(issue);
|
||||
return Result.success(b);
|
||||
}
|
||||
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation("删除产品规划部重点问题")
|
||||
|
||||
+2
-1
@@ -3,10 +3,11 @@ package com.adc.da.slrs.sarStandUnqualified.service;
|
||||
import com.adc.da.slrs.sarStandUnqualified.entity.ProductDeptIssue;
|
||||
import com.adc.da.slrs.sarStandUnqualified.entity.ProductDeptIssueVo;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IProductDeptIssueService {
|
||||
public interface IProductDeptIssueService extends IService<ProductDeptIssue> {
|
||||
|
||||
|
||||
public boolean addProductDeptIssue(ProductDeptIssue obj);
|
||||
|
||||
+33
@@ -248,6 +248,39 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
|
||||
return Result.success(getPageInfo(page.getPager(), rows));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ApiOperation(value = "|SarStandardsInfoEO|自定义分页查询")
|
||||
@GetMapping("/selectHighLawsById")
|
||||
//@RequiresPermissions("lawss:sarStandardsInfo:getSarStandardsInfoPage")
|
||||
public ResponseMessage<PageInfo<SarStandardsInfo>> selectHighLawsById(SarStandardsInfoEOPage page,@RequestParam(defaultValue = "0") String mark) throws Exception {
|
||||
if (null != page.getNowOrderBy()) {
|
||||
nowOrderFunc(page);
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(page.getAdvanceSearchVOStr())) {
|
||||
List<SarAdvanceSearchVO> searchList = JSONObject.parseArray(page.getAdvanceSearchVOStr(),SarAdvanceSearchVO.class);
|
||||
//不改传参强行置换
|
||||
// searchList.forEach(sarAdvanceSearchVO -> {
|
||||
// if ("TXLB".equals(sarAdvanceSearchVO.getField())){
|
||||
// sarAdvanceSearchVO.setField("STAND_SYSTEM");
|
||||
// }
|
||||
// });
|
||||
String advanceStr = SarAdvanceSearchUtil.createStandSql(searchList,"sar_stand_attr_info");
|
||||
if (StringUtils.isNotBlank(advanceStr)) {
|
||||
page.setAdvanceSearchStr(advanceStr);
|
||||
} else {
|
||||
page.setAdvanceSearchStr(null);
|
||||
}
|
||||
}
|
||||
|
||||
if(page.getUserId() == null || page.getUserId().equals("")){
|
||||
page.setUserId(LoginUserUtil.getUserId());
|
||||
}
|
||||
List<SarStandardsInfo> rows = sarStandardsInfoEOService.selectHighLawsById(page);
|
||||
return Result.success(getPageInfo(page.getPager(), rows));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|SarStandardsInfoEO|新增")
|
||||
@PostMapping("/addarStandardsInfo")
|
||||
//401问题2021-03-31暂时注释掉 liuhuiwen
|
||||
|
||||
+4
@@ -23,8 +23,12 @@ public interface SarStandardsInfoDao extends BaseMapper<SarStandardsInfo> {
|
||||
|
||||
List<SarStandardsInfo> getSarStandardsInfoPage(@Param("page") SarStandardsInfoEOPage page,@Param("mark")String mark);
|
||||
|
||||
List<SarStandardsInfo> selectHighLawsPage(@Param("page") SarStandardsInfoEOPage page,@Param("mark")String mark,@Param("list") List<String> lawsIds);
|
||||
|
||||
int getSarStandardsInfoCount(@Param("page") SarStandardsInfoEOPage page);
|
||||
|
||||
int selectHighLawsCount(@Param("page") SarStandardsInfoEOPage page);
|
||||
|
||||
int getSarStandardsInfoCountWk1(SarStandardsInfoEOPage page);
|
||||
|
||||
int insertSelective(SarStandardsInfo page);
|
||||
|
||||
+16
@@ -116,4 +116,20 @@ public class SarStandardsInfoEOPage extends BasePage {
|
||||
* 标准号
|
||||
*/
|
||||
private String standCode;
|
||||
|
||||
private String qdFlag;
|
||||
|
||||
|
||||
private String qdid;
|
||||
// private String standName;
|
||||
// private String standEnName;
|
||||
private String typeApplicable;
|
||||
private String nylx;
|
||||
private String zrbm;
|
||||
private String sycpx;
|
||||
// private String standSort;
|
||||
// private String standType;
|
||||
// private String standNumber;
|
||||
private String types;
|
||||
|
||||
}
|
||||
|
||||
+2
@@ -27,6 +27,8 @@ public interface ISarStandardsInfoService extends IService<SarStandardsInfo> {
|
||||
|
||||
List<SarStandardsInfo> getSarStandardsInfoPageBak1(SarStandardsInfoEOPage page) throws Exception;
|
||||
|
||||
List<SarStandardsInfo> selectHighLawsById(SarStandardsInfoEOPage page) throws Exception;
|
||||
|
||||
void createSarStandardsInfo(SarStandardsInfo sarStandardsInfoEO) throws Exception;
|
||||
|
||||
int updateSarStandardsInfo(SarStandardsInfo sarStandardsInfoEO) throws Exception;
|
||||
|
||||
+53
@@ -3,6 +3,8 @@ package com.adc.da.slrs.sarStandardsInfo.service.impl;
|
||||
import com.adc.da.att.entity.AttFileEO;
|
||||
import com.adc.da.person.entity.StandInfo;
|
||||
import com.adc.da.person.entity.TsPersonCollect;
|
||||
import com.adc.da.slrs.sarLawsAttrDetailedList.dao.SarLawsAttrDetailedListDao;
|
||||
import com.adc.da.slrs.sarLawsAttrDetailedList.entity.SarFindDto;
|
||||
import com.adc.da.slrs.sarPosition.entity.TsPosition;
|
||||
import com.adc.da.slrs.sarPosition.service.ITsPositionService;
|
||||
import com.adc.da.slrs.sarStandWarning.dao.WarningDateDao;
|
||||
@@ -128,6 +130,9 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
@Value("${file.path}")
|
||||
private String filePath;//文件存储路径
|
||||
|
||||
@Autowired
|
||||
SarLawsAttrDetailedListDao sarLawsAttrDetailedListDao;
|
||||
|
||||
@Autowired
|
||||
WarningDateServiceImpl warningDateService;
|
||||
|
||||
@@ -433,6 +438,54 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
return sarlist;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SarStandardsInfo> selectHighLawsById(SarStandardsInfoEOPage page) throws Exception {
|
||||
//查询当前登录人角色拥有权限的菜单
|
||||
if(page.getMenuId() != null && page.getUserId() != null && StringUtils.isNotBlank(page.getUserId())){
|
||||
QueryWrapper<TsResource> qw = new QueryWrapper<>();
|
||||
qw.eq("ID",page.getMenuId());
|
||||
qw.isNull("PARENT_ID");
|
||||
List<TsResource> children = iTsResourceService.list(qw);
|
||||
if(children.isEmpty() && !page.getMenuId().equals("nomenu")){
|
||||
List<String> getMenuIdList = tsUserService.getResourceUserId(page.getUserId());
|
||||
if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
|
||||
page.setMenuRoleList(getMenuIdList);
|
||||
} else {
|
||||
page.setMenuRoleList(null);
|
||||
}
|
||||
List<String> ids = iTsResourceService.getChildMenuList(page.getMenuId());
|
||||
if (ids != null && !ids.isEmpty()) {
|
||||
page.setMenuAllChildrenIdList(ids);
|
||||
}
|
||||
}
|
||||
}
|
||||
List<String> lawsIds=new ArrayList<>();
|
||||
if ("1".equals(page.getQdFlag())){
|
||||
|
||||
SarFindDto sarFindDto=new SarFindDto();
|
||||
sarFindDto.setId(page.getQdid());
|
||||
sarFindDto.setStandEnName(page.getStandEnName());
|
||||
sarFindDto.setStandName(page.getStandName());
|
||||
sarFindDto.setTypeApplicable(page.getTypeApplicable());
|
||||
sarFindDto.setSycpx(page.getSycpx());
|
||||
sarFindDto.setNylx(page.getNylx());
|
||||
sarFindDto.setTypes(page.getTypes());
|
||||
sarFindDto.setStandSort(page.getStandSort());
|
||||
sarFindDto.setZrbm(page.getZrbm());
|
||||
sarFindDto.setStandNumber(page.getStandNumber());
|
||||
sarFindDto.setStandType(page.getStandType());
|
||||
|
||||
lawsIds = sarLawsAttrDetailedListDao.selectHighLawsId(sarFindDto.getId(),sarFindDto);
|
||||
|
||||
}
|
||||
|
||||
Integer rowCount = dao.selectHighLawsCount(page);
|
||||
page.getPager().setRowCount(rowCount);
|
||||
List<SarStandardsInfo> sarlist = dao.selectHighLawsPage(page,"0",lawsIds);
|
||||
attrInfo(sarlist);
|
||||
return sarlist;
|
||||
}
|
||||
|
||||
public void attrInfo(List<SarStandardsInfo> sarlist) throws Exception {
|
||||
for (SarStandardsInfo row : sarlist) {
|
||||
attrInfoDetails(row);
|
||||
|
||||
+25
@@ -169,6 +169,31 @@
|
||||
LIMIT #{param3} , #{param2};
|
||||
</select>
|
||||
|
||||
<select id="selectHighLawsId" resultType="string">
|
||||
select stand_id from sar_laws_attr_detailed_list
|
||||
LEFT JOIN sar_standards_info si ON sar_laws_attr_detailed_list.stand_id = si.ID
|
||||
<where>
|
||||
<if test="standId != null">
|
||||
and detailed_list_id = #{standId}
|
||||
</if>
|
||||
<if test="sar.standSort != null">
|
||||
and si.STAND_SORT = #{sar.standSort}
|
||||
</if>
|
||||
<if test="sar.standType != null">
|
||||
and si.STAND_TYPE = #{sar.standType}
|
||||
</if>
|
||||
<if test="sar.standNumber != null">
|
||||
and concat(concat(concat(concat(si.STAND_SORT,' '),si.STAND_NUMBER),'-'),si.STAND_YEAR) like concat(concat('%', #{sar.standNumber}),'%')
|
||||
or si.STAND_NAME like concat(concat('%', #{sar.standNumber}),'%')
|
||||
</if>
|
||||
<if test="sar.standName != null">
|
||||
and si.STAND_NAME like concat(concat('%', #{sar.standName}),'%')
|
||||
</if>
|
||||
|
||||
</where>
|
||||
order by number
|
||||
</select>
|
||||
|
||||
<select id="selectLawsId2" resultType="string">
|
||||
select stand_id from sar_laws_attr_detailed_list
|
||||
<where>
|
||||
|
||||
+32
@@ -21,6 +21,7 @@
|
||||
|
||||
|
||||
<select id="findPage" resultMap="BusinessIssuePage">
|
||||
select t.* from (
|
||||
SELECT
|
||||
issue.*,laws.LAWS_NUMBER,laws.LAWS_NAME
|
||||
FROM
|
||||
@@ -28,5 +29,36 @@
|
||||
LEFT JOIN sar_laws_stand_info AS laws
|
||||
ON issue.law_id = laws.ID
|
||||
${ew.customSqlSegment}
|
||||
|
||||
UNION ALL
|
||||
SELECT
|
||||
issue.*,
|
||||
laws.STAND_CODE AS lawNumber,
|
||||
laws.STAND_NAME AS lawName
|
||||
FROM
|
||||
business_dept_issue AS issue
|
||||
LEFT JOIN sar_bussioness_stand AS laws
|
||||
ON issue.law_id = laws.ID
|
||||
${ew.customSqlSegment}
|
||||
|
||||
UNION ALL
|
||||
SELECT
|
||||
issue.*, CONCAT(
|
||||
laws.STAND_SORT,
|
||||
' ',
|
||||
laws.STAND_NUMBER,
|
||||
'-',
|
||||
laws.STAND_YEAR
|
||||
) AS lawNumber,
|
||||
laws.STAND_NAME AS lawName
|
||||
FROM
|
||||
business_dept_issue AS issue
|
||||
LEFT JOIN sar_standards_info AS laws
|
||||
ON issue.law_id = laws.ID
|
||||
${ew.customSqlSegment}
|
||||
) t
|
||||
where t.LAWS_NAME is not null and t.LAWS_NUMBER is not null
|
||||
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+30
@@ -1394,6 +1394,8 @@
|
||||
</sql>
|
||||
|
||||
|
||||
<!--<!–直接在这区分了 1是国内地区 2是车型类别 3是重点跟踪清单 4是其他清单 5是项目清单–>-->
|
||||
|
||||
<!-- 分页查询-->
|
||||
<select id="getSarStandardsInfoPage" resultMap="BaseResultMap"
|
||||
parameterType="com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfoEOPage">
|
||||
@@ -1410,6 +1412,25 @@
|
||||
</if>
|
||||
limit ${page.pager.startIndex-1},${page.pageSize}
|
||||
</select>
|
||||
|
||||
<select id="selectHighLawsPage" resultMap="BaseResultMap"
|
||||
parameterType="com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfoEOPage">
|
||||
SELECT
|
||||
<include refid="Base_Column_List_DIS"/>
|
||||
from SAR_STANDARDS_INFO
|
||||
<include refid="SarStandardsInfo_in_left_2"/>
|
||||
<if test="null != list and list.size()>0">
|
||||
and SAR_STANDARDS_INFO.ID in
|
||||
<foreach item="id" collection="list" open="(" separator="," close=")" index="index">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test='(page.orderByA != null and page.orderByA != "" and page.order1 != null and page.order1 != "")
|
||||
or (page.standType != null and page.standType != "") '>
|
||||
<include refid="standSort_in"/>
|
||||
</if>
|
||||
limit ${page.pager.startIndex-1},${page.pageSize}
|
||||
</select>
|
||||
<!--FIELD(SAR_STANDARDS_INFO.issue_time,'已发布'), FIELD(SAR_STANDARDS_INFO.issue_time,'TBD'), FIELD(SAR_STANDARDS_INFO.issue_time,'N/A') ,-->
|
||||
<!--if(isnull(SAR_STANDARDS_INFO.issue_time),0,1) desc ,-->
|
||||
<!-- 分页查询条件查询一共有多少条数据,配合分页 -->
|
||||
@@ -1422,6 +1443,15 @@
|
||||
GROUP BY SAR_STANDARDS_INFO.id) a
|
||||
</select>
|
||||
|
||||
<select id="selectHighLawsCount" resultType="java.lang.Integer"
|
||||
parameterType="com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfoEOPage">
|
||||
select count(1) from (select count(*) from SAR_STANDARDS_INFO
|
||||
<!-- left join SAR_STAND_ATTR_INFO on (SAR_STAND_ATTR_INFO.stand_id = SAR_STANDARDS_INFO.id and SAR_STAND_ATTR_INFO.valid_flag=0)-->
|
||||
<include refid="SarStandardsInfo_in_left"/>
|
||||
|
||||
GROUP BY SAR_STANDARDS_INFO.id) a
|
||||
</select>
|
||||
|
||||
<select id="getSarStandardsInfoCountWk1" resultType="java.lang.Integer"
|
||||
parameterType="com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfoEOPage">
|
||||
select count(1) from (select count(*) from SAR_STANDARDS_INFO
|
||||
|
||||
Reference in New Issue
Block a user