Commit ecb0f47e authored by wanglong's avatar wanglong

Merge branch 'developer' of http://39.98.45.134:8090/moa/amos-boot-biz into developer

parents 673d32be be283f92
...@@ -26,7 +26,7 @@ public class SuperviseRuleDto extends BaseDto { ...@@ -26,7 +26,7 @@ public class SuperviseRuleDto extends BaseDto {
private String adminRegion; private String adminRegion;
@ApiModelProperty(value = "行政区域代码") @ApiModelProperty(value = "行政区域代码")
private String adminRegionCode; private Integer adminRegionCode;
@ApiModelProperty(value = "监察部门id") @ApiModelProperty(value = "监察部门id")
private Long superviseDeptId; private Long superviseDeptId;
......
...@@ -32,7 +32,7 @@ public class SuperviseRule extends BaseEntity { ...@@ -32,7 +32,7 @@ public class SuperviseRule extends BaseEntity {
* 行政区域代码 * 行政区域代码
*/ */
@TableField("admin_region_code") @TableField("admin_region_code")
private String adminRegionCode; private Integer adminRegionCode;
/** /**
* 监察部门id * 监察部门id
......
...@@ -9,14 +9,14 @@ import org.aspectj.weaver.ast.Test; ...@@ -9,14 +9,14 @@ import org.aspectj.weaver.ast.Test;
* 项目资源表(包括焊工、管材、设备)接口类 * 项目资源表(包括焊工、管材、设备)接口类
* *
* @author system_generator * @author system_generator
* @date 2022-09-22 * @date 2022-10-21
*/ */
public interface IProjectResourceService { public interface IProjectResourceService {
//焊机设备表 //焊机设备表
Page<WelderEquipmentDto> installNoticeMsgList(Page<WelderEquipmentDto> page, String name, String type); Page<WelderEquipmentDto> installNoticeMsgList(Page<WelderEquipmentDto> page, String name, String type);
//焊机设备页面分页查询 //焊机设备页面分页查询
Page<WelderEquipmentDto> selectByName(Page<WelderEquipmentDto> page, String name ,String unit); WelderEquipmentDto selectByName(Long sequenceNbr);
Page<WelderEquipmentDto> selectByInfo(Page<WelderEquipmentDto> page, Test info , String unit); Page<WelderEquipmentDto> selectByInfo(Page<WelderEquipmentDto> page, Test info , String unit);
//根据sequenceNbr查询列表数据 //根据sequenceNbr查询列表数据
......
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
<mapper namespace="com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectResourceMapper"> <mapper namespace="com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectResourceMapper">
<select id="WelderEquipment" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.WelderEquipmentDto"> <select id="WelderEquipment" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.WelderEquipmentDto">
SELECT tz_ugp_equipment.name, SELECT
tz_ugp_project_resource.sequence_nbr,
tz_ugp_equipment.name,
tz_ugp_equipment.code, tz_ugp_equipment.code,
tz_ugp_equipment.type, tz_ugp_equipment.type,
tz_ugp_project.name AS projectName, tz_ugp_project.name AS projectName,
...@@ -14,89 +16,84 @@ ...@@ -14,89 +16,84 @@
tz_ugp_equipment.verify_status, tz_ugp_equipment.verify_status,
info, info,
tz_ugp_project_resource.sequence_nbr as project_resource_id tz_ugp_project_resource.sequence_nbr as project_resource_id
FROM tz_ugp_project FROM tz_ugp_project_resource
inner join tz_ugp_project_resource on tz_ugp_project.sequence_nbr = tz_ugp_project_resource.project_id LEFT JOIN tz_ugp_project ON tz_ugp_project.sequence_nbr = tz_ugp_project_resource.project_id
and tz_ugp_project_resource.type = 'equipment' LEFT JOIN tz_ugp_equipment ON tz_ugp_project_resource.resource_id = tz_ugp_equipment.sequence_nbr
inner join tz_ugp_equipment on tz_ugp_project_resource.resource_id = tz_ugp_equipment.sequence_nbr left join tz_ugp_attachment ON tz_ugp_equipment.sequence_nbr = tz_ugp_attachment.source_id
left join tz_ugp_attachment on tz_ugp_equipment.sequence_nbr = tz_ugp_attachment.source_id and WHERE tz_ugp_project_resource.type = 'equipment'
tz_ugp_attachment.type = 'enuipment'
<where>
<if test="name != null and name != ''"> <if test="name != null and name != ''">
and tz_ugp_equipment.name like '%${name}%' and tz_ugp_equipment.name like '%${name}%'
</if> </if>
<if test="type != null and type != ''"> <if test="type != null and type != ''">
and tz_ugp_equipment.type like '%${type}%' and tz_ugp_equipment.type like '%${type}%'
</if> </if>
</where>
</select> </select>
<select id="selectByName" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.WelderEquipmentDto"> <select id="selectByName" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.WelderEquipmentDto">
SELECT tz_ugp_equipment.name, SELECT tz_ugp_equipment.name,
tz_ugp_equipment.code, tz_ugp_equipment.code,
tz_ugp_equipment.type, tz_ugp_equipment.type,
tz_ugp_project.name as project_Name, tz_ugp_project.name AS projectName,
tz_ugp_project.sequence_nbr AS projectId,
tz_ugp_equipment.manufacturer, tz_ugp_equipment.manufacturer,
tz_ugp_equipment.manufacture_date, tz_ugp_equipment.manufacture_date,
tz_ugp_equipment.service_life, tz_ugp_equipment.service_life,
tz_ugp_equipment.verify_status, tz_ugp_equipment.verify_status,
info info,
FROM tz_ugp_project tz_ugp_project_resource.sequence_nbr as project_resource_id
inner join tz_ugp_project_resource on tz_ugp_project.sequence_nbr = tz_ugp_project_resource.project_id FROM tz_ugp_project_resource
and tz_ugp_project_resource.type = 'equipment' LEFT JOIN tz_ugp_project ON tz_ugp_project.sequence_nbr = tz_ugp_project_resource.project_id
inner join tz_ugp_equipment on tz_ugp_project_resource.resource_id = tz_ugp_equipment.sequence_nbr LEFT JOIN tz_ugp_equipment ON tz_ugp_project_resource.resource_id = tz_ugp_equipment.sequence_nbr
left join tz_ugp_attachment on tz_ugp_equipment.sequence_nbr = tz_ugp_attachment.source_id and left join tz_ugp_attachment ON tz_ugp_equipment.sequence_nbr = tz_ugp_attachment.source_id
tz_ugp_attachment.type = 'enuipment' WHERE tz_ugp_project_resource.type = 'equipment'
<where>
<if test="name != null and name != ''"> <if test="name != null and name != ''">
and tz_ugp_project.name = #{name} and tz_ugp_project.name = #{name}
</if> </if>
<if test="unit != null and unit != ''"> <if test="unit != null and unit != ''">
and tz_ugp_project.construction_unit_id = #{unit} and tz_ugp_project.construction_unit_id = #{unit}
</if> </if>
</where>
</select> </select>
<select id="selectByInfo" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.WelderEquipmentDto"> <select id="selectByInfo" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.WelderEquipmentDto">
SELECT tz_ugp_equipment.name, SELECT tz_ugp_equipment.name,
tz_ugp_equipment.code, tz_ugp_equipment.code,
tz_ugp_equipment.type, tz_ugp_equipment.type,
tz_ugp_project.name AS project_Name, tz_ugp_project.name AS projectName,
tz_ugp_project.sequence_nbr AS projectId,
tz_ugp_equipment.manufacturer, tz_ugp_equipment.manufacturer,
tz_ugp_equipment.manufacture_date, tz_ugp_equipment.manufacture_date,
tz_ugp_equipment.service_life, tz_ugp_equipment.service_life,
tz_ugp_equipment.verify_status, tz_ugp_equipment.verify_status,
info info,
FROM tz_ugp_project tz_ugp_project_resource.sequence_nbr as project_resource_id
inner join tz_ugp_project_resource on tz_ugp_project.sequence_nbr = tz_ugp_project_resource.project_id FROM tz_ugp_project_resource
and tz_ugp_project_resource.type = 'equipment' LEFT JOIN tz_ugp_project ON tz_ugp_project.sequence_nbr = tz_ugp_project_resource.project_id
inner join tz_ugp_equipment on tz_ugp_project_resource.resource_id = tz_ugp_equipment.sequence_nbr LEFT JOIN tz_ugp_equipment ON tz_ugp_project_resource.resource_id = tz_ugp_equipment.sequence_nbr
left join tz_ugp_attachment on tz_ugp_equipment.sequence_nbr = tz_ugp_attachment.source_id and left join tz_ugp_attachment ON tz_ugp_equipment.sequence_nbr = tz_ugp_attachment.source_id
tz_ugp_attachment.type = 'enuipment' WHERE tz_ugp_project_resource.type = 'equipment'
<where>
<if test="info != null and info != ''"> <if test="info != null and info != ''">
and tz_ugp_attachment.info = #{info} and tz_ugp_attachment.info = #{info}
</if> </if>
<if test="unit != null and unit != ''"> <if test="unit != null and unit != ''">
and tz_ugp_attachment.company_id = #{unit} and tz_ugp_attachment.company_id = #{unit}
</if> </if>
</where>
</select> </select>
<select id="customSelectById" <select id="customSelectById"
resultType="com.yeejoin.amos.boot.module.ugp.api.dto.WelderEquipmentDto"> resultType="com.yeejoin.amos.boot.module.ugp.api.dto.WelderEquipmentDto">
SELECT tz_ugp_equipment.name, SELECT tz_ugp_equipment.name,
tz_ugp_equipment.code, tz_ugp_equipment.code,
tz_ugp_equipment.type, tz_ugp_equipment.type,
tz_ugp_project.name AS project_Name, tz_ugp_project.name AS projectName,
tz_ugp_project.sequence_nbr AS projectId,
tz_ugp_equipment.manufacturer, tz_ugp_equipment.manufacturer,
tz_ugp_equipment.manufacture_date, tz_ugp_equipment.manufacture_date,
tz_ugp_equipment.service_life, tz_ugp_equipment.service_life,
tz_ugp_equipment.verify_status, tz_ugp_equipment.verify_status,
info info,
FROM tz_ugp_project tz_ugp_project_resource.sequence_nbr as project_resource_id
inner join tz_ugp_project_resource on tz_ugp_project.sequence_nbr = tz_ugp_project_resource.project_id FROM tz_ugp_project_resource
and tz_ugp_project_resource.type = 'equipment' LEFT JOIN tz_ugp_project ON tz_ugp_project.sequence_nbr = tz_ugp_project_resource.project_id
inner join tz_ugp_equipment on tz_ugp_project_resource.resource_id = tz_ugp_equipment.sequence_nbr LEFT JOIN tz_ugp_equipment ON tz_ugp_project_resource.resource_id = tz_ugp_equipment.sequence_nbr
left join tz_ugp_attachment on tz_ugp_equipment.sequence_nbr = tz_ugp_attachment.source_id and left join tz_ugp_attachment ON tz_ugp_equipment.sequence_nbr = tz_ugp_attachment.source_id
tz_ugp_attachment.type = 'enuipment' WHERE tz_ugp_project_resource.type = 'equipment' and tz_ugp_project_resource.sequence_nbr = #{sequenceNbr}
where tz_ugp_equipment.sequence_nbr = #{sequenceNbr}
</select> </select>
<!-- //管材页面分页,根据名称、编号筛选--> <!-- //管材页面分页,根据名称、编号筛选-->
......
package com.yeejoin.amos.boot.module.ugp.biz.controller; package com.yeejoin.amos.boot.module.ugp.biz.controller;
import com.netflix.ribbon.proxy.annotation.Http;
import com.yeejoin.amos.boot.module.ugp.api.dto.MaterialDto; import com.yeejoin.amos.boot.module.ugp.api.dto.MaterialDto;
import com.yeejoin.amos.boot.module.ugp.api.dto.WelderEquipmentDto; import com.yeejoin.amos.boot.module.ugp.api.dto.WelderEquipmentDto;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
...@@ -92,9 +93,9 @@ public class ProjectResourceController extends BaseController { ...@@ -92,9 +93,9 @@ public class ProjectResourceController extends BaseController {
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@GetMapping(value = "/{sequenceNbr}") @GetMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "GET", value = "根据sequenceNbr查询单个项目资源表(包括焊工、管材、设备)", notes = "根据sequenceNbr查询单个项目资源表(包括焊工、管材、设备)") @ApiOperation(httpMethod = "GET", value = "根据sequenceNbr查询焊机设备)", notes = "根据sequenceNbr查询焊机设备")
public ResponseModel<ProjectResourceDto> selectOne(@PathVariable Long sequenceNbr) { public ResponseModel<WelderEquipmentDto> selectOne(@PathVariable Long sequenceNbr) {
return ResponseHelper.buildResponse(projectResourceServiceImpl.queryBySeq(sequenceNbr)); return ResponseHelper.buildResponse(projectResourceServiceImpl.customSelectById(sequenceNbr));
} }
/** /**
...@@ -149,6 +150,13 @@ public class ProjectResourceController extends BaseController { ...@@ -149,6 +150,13 @@ public class ProjectResourceController extends BaseController {
return ResponseHelper.buildResponse(projectResourceServiceImpl.installNoticeMsgList(page, name, type)); return ResponseHelper.buildResponse(projectResourceServiceImpl.installNoticeMsgList(page, name, type));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@GetMapping(value = "/selectByName")
@ApiOperation(httpMethod = "GET", value = "焊机设备分页查询", notes = "焊机设备分页查询")
public ResponseModel<WelderEquipmentDto> selectByName(Long sequenceNbr){
return ResponseHelper.buildResponse(projectResourceServiceImpl.selectByName(sequenceNbr));
}
/** /**
* 项目设备新增 * 项目设备新增
*/ */
......
...@@ -64,7 +64,7 @@ public class SuperviseRuleController extends BaseController { ...@@ -64,7 +64,7 @@ public class SuperviseRuleController extends BaseController {
// getMap(map,result); // getMap(map,result);
// //获取的Map中key是code,value是name // //获取的Map中key是code,value是name
// model.setAdminRegion(map.get(model.getAdminRegionCode())); // model.setAdminRegion(map.get(model.getAdminRegionCode()));
//外网调不到内网 暂时预留 // //外网调不到内网 暂时预留
// OrgUsr orgUsr = orgServiceImpl.getOrgUsr(); // OrgUsr orgUsr = orgServiceImpl.getOrgUsr();
// model.setSequenceNbr(orgUsr.getSequenceNbr()); // model.setSequenceNbr(orgUsr.getSequenceNbr());
model = superviseRuleServiceImpl.createWithModel(model); model = superviseRuleServiceImpl.createWithModel(model);
...@@ -139,7 +139,7 @@ public class SuperviseRuleController extends BaseController { ...@@ -139,7 +139,7 @@ public class SuperviseRuleController extends BaseController {
public ResponseModel<Page<SuperviseRuleDto>> queryForPage( public ResponseModel<Page<SuperviseRuleDto>> queryForPage(
@RequestParam(value = "current") int current, @RequestParam(value = "current") int current,
@RequestParam(value = "size") int size, @RequestParam(value = "size") int size,
@RequestParam(value = "adminRegionCode", required = false) String adminRegionCode, @RequestParam(value = "adminRegionCode", required = false) Integer adminRegionCode,
@RequestParam(value = "superviseDeptId", required = false) Long superviseDeptId, @RequestParam(value = "superviseDeptId", required = false) Long superviseDeptId,
@RequestParam(value = "inspectionUnitId", required = false) Long inspectionUnitId @RequestParam(value = "inspectionUnitId", required = false) Long inspectionUnitId
) { ) {
...@@ -147,7 +147,7 @@ public class SuperviseRuleController extends BaseController { ...@@ -147,7 +147,7 @@ public class SuperviseRuleController extends BaseController {
Page<SuperviseRuleDto> page = new Page<SuperviseRuleDto>(); Page<SuperviseRuleDto> page = new Page<SuperviseRuleDto>();
page.setCurrent(current); page.setCurrent(current);
page.setSize(size); page.setSize(size);
return ResponseHelper.buildResponse(superviseRuleServiceImpl.queryForSuperviseRulePage(page, superviseDeptId, inspectionUnitId)); return ResponseHelper.buildResponse(superviseRuleServiceImpl.queryForSuperviseRulePage(page, superviseDeptId, inspectionUnitId,adminRegionCode));
} }
/** /**
......
...@@ -62,8 +62,8 @@ public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto,P ...@@ -62,8 +62,8 @@ public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto,P
} }
@Override @Override
public Page<WelderEquipmentDto> selectByName(Page<WelderEquipmentDto> page, String name, String unit) { public WelderEquipmentDto selectByName(Long sequenceNbr) {
return null; return this.projectResourceMapper.customSelectById(sequenceNbr);
} }
@Override @Override
......
...@@ -20,8 +20,11 @@ public class SuperviseRuleServiceImpl extends BaseService<SuperviseRuleDto,Super ...@@ -20,8 +20,11 @@ public class SuperviseRuleServiceImpl extends BaseService<SuperviseRuleDto,Super
/** /**
* 分页查询 * 分页查询
*/ */
public Page<SuperviseRuleDto> queryForSuperviseRulePage(Page<SuperviseRuleDto> page, Long superviseDeptId, Long inspectionUnitId) { public Page<SuperviseRuleDto> queryForSuperviseRulePage(Page<SuperviseRuleDto> page, Long superviseDeptId, Long inspectionUnitId,Integer adminRegionCode) {
return this.queryForPage(page, null, false, superviseDeptId, inspectionUnitId ); if(610000 == adminRegionCode){
return this.queryForPage(page, null, false, superviseDeptId, inspectionUnitId);
}
return this.queryForPage(page, null, false, superviseDeptId, inspectionUnitId,adminRegionCode );
} }
/** /**
......
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