Commit 726cb863 authored by limei's avatar limei

标准规则库列表查询

parent 9ac42835
......@@ -39,4 +39,17 @@ public class SuperviseRuleDto extends BaseDto {
@ApiModelProperty(value = "创建时间")
private Date createDate;
@ApiModelProperty(value = "监察部门")
private String superviseDept;
@ApiModelProperty(value = "检验检测单位")
private String inspectionUnit;
@ApiModelProperty(value = "创建单位")
private String createUnit;
}
package com.yeejoin.amos.boot.module.ugp.biz.controller;
import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr;
import com.yeejoin.amos.boot.module.ugp.api.entity.SuperviseRule;
import com.yeejoin.amos.boot.module.ugp.biz.service.impl.OrgServiceImpl;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
import com.yeejoin.amos.feign.systemctl.Systemctl;
......@@ -142,15 +143,14 @@ public class SuperviseRuleController extends BaseController {
public ResponseModel<Page<SuperviseRuleDto>> queryForPage(
@RequestParam(value = "current") int current,
@RequestParam(value = "size") int size,
@RequestParam(value = "adminRegionCode", required = false) Integer adminRegionCode,
@RequestParam(value = "superviseDeptId", required = false) Long superviseDeptId,
@RequestParam(value = "inspectionUnitId", required = false) Long inspectionUnitId
SuperviseRule superviseRule
) {
//this.current = current;
Page<SuperviseRuleDto> page = new Page<SuperviseRuleDto>();
Page<SuperviseRuleDto> page = new Page<>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(superviseRuleServiceImpl.queryForSuperviseRulePage(page, superviseDeptId, inspectionUnitId,adminRegionCode));
return ResponseHelper.buildResponse(superviseRuleServiceImpl.queryForSuperviseRulePage(page,superviseRule));
}
/**
......
......@@ -89,6 +89,7 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate
materialDto.setManufactureAddr(jsonObject.getString("manufactureAddr"));
materialDto.setManufactureDate(jsonObject.getDate("manufactureDate"));
materialDto.setBatchNum(jsonObject.getString("batchNum"));
materialDto.setType(jsonObject.getString("type"));
MaterialDto result = this.createWithModel(materialDto);
return result;
}
......@@ -114,6 +115,7 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate
materialDto.setManufactureAddr(jsonObject.getString("manufactureAddr"));
materialDto.setManufactureDate(jsonObject.getDate("manufactureDate"));
materialDto.setBatchNum(jsonObject.getString("batchNum"));
materialDto.setType(jsonObject.getString("type"));
this.updateWithModel(materialDto);
JSONArray subForm = jsonObject.getJSONArray("subForm");
......@@ -145,6 +147,7 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate
jsonObject.put("manufactureAddr",materialDto.getManufactureAddr());
jsonObject.put("manufactureDate",materialDto.getManufactureDate());
jsonObject.put("batchNum",materialDto.getBatchNum());
jsonObject.put("type",materialDto.getType());
if (attachmentDto != null){
JSONArray jsonArray = JSON.parseArray(attachmentDto.getInfo());
jsonObject.put("subForm",jsonArray);
......
package com.yeejoin.amos.boot.module.ugp.biz.service.impl;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yeejoin.amos.boot.module.ugp.api.entity.SuperviseRule;
import com.yeejoin.amos.boot.module.ugp.api.mapper.SuperviseRuleMapper;
import com.yeejoin.amos.boot.module.ugp.api.service.ISuperviseRuleService;
import com.yeejoin.amos.boot.module.ugp.api.dto.SuperviseRuleDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
......@@ -17,11 +19,29 @@ import java.util.List;
*/
@Service
public class SuperviseRuleServiceImpl extends BaseService<SuperviseRuleDto,SuperviseRule,SuperviseRuleMapper> implements ISuperviseRuleService {
@Autowired
OrgServiceImpl orgServiceImpl;
/**
* 分页查询
*/
public Page<SuperviseRuleDto> queryForSuperviseRulePage(Page<SuperviseRuleDto> page, Long superviseDeptId, Long inspectionUnitId,Integer adminRegionCode) {
return this.queryForPage(page, null, false, superviseDeptId, inspectionUnitId,adminRegionCode );
public Page<SuperviseRuleDto> queryForSuperviseRulePage(Page<SuperviseRuleDto> page,SuperviseRule superviseRule) {
Integer adminRegionCode = superviseRule.getAdminRegionCode();
Long superviseDeptId = superviseRule.getSuperviseDeptId();
Long inspectionUnitId = superviseRule.getInspectionUnitId();
page = this.queryForPage(page,null,false,adminRegionCode,superviseDeptId,inspectionUnitId);
List<SuperviseRuleDto> superviseRuleDtoList = page.getRecords();
for(SuperviseRuleDto superviseRuleDto: superviseRuleDtoList){
superviseRuleDto.setSuperviseDept(orgServiceImpl.getOrgUsrById(String.valueOf(superviseRuleDto.getSuperviseDeptId())).getBizOrgName());
superviseRuleDto.setInspectionUnit(orgServiceImpl.getOrgUsrById(String.valueOf(superviseRuleDto.getInspectionUnitId())).getBizOrgName());
superviseRuleDto.setCreateUnit(orgServiceImpl.getOrgUsrById(String.valueOf(superviseRuleDto.getCreateUnitId())).getBizOrgName());
}
return page;
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment