Commit 347de6f1 authored by 曹盼盼's avatar 曹盼盼

设备认领修改

parent 6c43d2ba
...@@ -21,7 +21,7 @@ public interface EquipmentCategoryMapper extends BaseMapper<EquipmentCategory> { ...@@ -21,7 +21,7 @@ public interface EquipmentCategoryMapper extends BaseMapper<EquipmentCategory> {
@Select("select * from tz_equipment_category where code in('1000','2000','3000','4000','5000','6000','8000','9000')") @Select("select * from tz_equipment_category where code in('1000','2000','3000','4000','5000','6000','8000','9000')")
List<EquipmentCategoryDto> selectClassify(); List<EquipmentCategoryDto> selectClassify();
Map<String, Object> getCategoryCount(@Param("code") String code); Map<String, Object> getCategoryCount(@Param("code") String code,@Param("level")String level,@Param("orgCode")String orgCode);
Map<String, Object> getAdministrativeDivision(@Param("division") String division, @Param("county") String county); Map<String, Object> getAdministrativeDivision(@Param("division") String division, @Param("county") String county);
......
...@@ -13,7 +13,16 @@ ...@@ -13,7 +13,16 @@
LEFT JOIN tz_equipment_category tec ON ibjri.EQU_CATEGORY = tec.code LEFT JOIN tz_equipment_category tec ON ibjri.EQU_CATEGORY = tec.code
LEFT JOIN tz_equipment_category tec1 ON ibjri.EQU_LIST = tec1.code LEFT JOIN tz_equipment_category tec1 ON ibjri.EQU_LIST = tec1.code
WHERE WHERE
ibjoi.claim_status = '待认领' AND ibjri."EQU_LIST" = #{code} ) waitClaim , ibjoi.claim_status = '待认领' AND ibjri."EQU_LIST" = #{code}
<if test="level == 'company'">
AND ibjui."USE_UNIT_CREDIT_CODE"
LIKE CONCAT('%',#{orgCode},'%')
</if>
<if test="level != 'company'">
AND ibjsi."ORG_BRANCH_CODE"
LIKE CONCAT('%',#{orgCode},'%')
</if>
) waitClaim ,
(SELECT (SELECT
COUNT( * ) COUNT( * )
FROM FROM
...@@ -24,7 +33,16 @@ ...@@ -24,7 +33,16 @@
LEFT JOIN tz_equipment_category tec ON ibjri.EQU_CATEGORY = tec.code LEFT JOIN tz_equipment_category tec ON ibjri.EQU_CATEGORY = tec.code
LEFT JOIN tz_equipment_category tec1 ON ibjri.EQU_LIST = tec1.code LEFT JOIN tz_equipment_category tec1 ON ibjri.EQU_LIST = tec1.code
WHERE WHERE
ibjoi.claim_status = '已认领' AND ibjri."EQU_LIST" = #{code} ) alreadyClaim, ibjoi.claim_status = '已认领' AND ibjri."EQU_LIST" = #{code}
<if test="level == 'company'">
AND ibjui."USE_UNIT_CREDIT_CODE"
LIKE CONCAT('%',#{orgCode},'%')
</if>
<if test="level != 'company'">
AND ibjsi."ORG_BRANCH_CODE"
LIKE CONCAT('%',#{orgCode},'%')
</if>
) alreadyClaim,
(SELECT (SELECT
COUNT( * ) COUNT( * )
FROM FROM
...@@ -35,8 +53,17 @@ ...@@ -35,8 +53,17 @@
LEFT JOIN tz_equipment_category tec ON ibjri.EQU_CATEGORY = tec.code LEFT JOIN tz_equipment_category tec ON ibjri.EQU_CATEGORY = tec.code
LEFT JOIN tz_equipment_category tec1 ON ibjri.EQU_LIST = tec1.code LEFT JOIN tz_equipment_category tec1 ON ibjri.EQU_LIST = tec1.code
WHERE WHERE
ibjoi.claim_status = '已拒领' AND ibjri."EQU_LIST" = #{code} ) refuseClaim ibjoi.claim_status = '已拒领' AND ibjri."EQU_LIST" = #{code}
</select> <if test="level == 'company'">
AND ibjui."USE_UNIT_CREDIT_CODE"
LIKE CONCAT('%',#{orgCode},'%')
</if>
<if test="level != 'company'">
AND ibjsi."ORG_BRANCH_CODE"
LIKE CONCAT('%',#{orgCode},'%')
</if>
) refuseClaim
</select>
<select id="getAdministrativeDivision" resultType="java.util.Map"> <select id="getAdministrativeDivision" resultType="java.util.Map">
SELECT SELECT
...@@ -51,7 +78,7 @@ ...@@ -51,7 +78,7 @@
</select> </select>
<select id="getSrcee" resultType="java.util.Map" > <select id="getSrcee" resultType="java.util.Map">
SELECT SELECT
* *
from from
......
...@@ -194,13 +194,13 @@ public class EquipmentCategoryController extends BaseController { ...@@ -194,13 +194,13 @@ public class EquipmentCategoryController extends BaseController {
/** /**
* 生成管辖分局树 * 获取行政区划
* *
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/creatTree") @GetMapping(value = "/creatTree")
@ApiOperation(httpMethod = "GET", value = "生成管辖分局树", notes = "生成管辖分局树") @ApiOperation(httpMethod = "GET", value = "获取行政区划", notes = "获取行政区划")
public ResponseModel<Object> creatTree() { public ResponseModel<Object> creatTree() {
return ResponseHelper.buildResponse(equipmentCategoryService.creatTree()); return ResponseHelper.buildResponse(equipmentCategoryService.creatTree());
} }
......
...@@ -101,9 +101,12 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -101,9 +101,12 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
Map<String, List<Map<String, Object>>> resourceJson = JsonUtils.getResourceJson(equipCategory); Map<String, List<Map<String, Object>>> resourceJson = JsonUtils.getResourceJson(equipCategory);
List<Map<String, Object>> mapList = resourceJson.get(EquipmentClassifityEnum.BDLS.getCode()); List<Map<String, Object>> mapList = resourceJson.get(EquipmentClassifityEnum.BDLS.getCode());
List<Map<String, Object>> list = new ArrayList<>(); List<Map<String, Object>> list = new ArrayList<>();
JSONObject object = getCompanyType();
String level = object.getString("level");
String orgCode = object.getString("orgCode");
for (Map map : mapList) { for (Map map : mapList) {
Map<String, Object> resultMap = new HashMap<>(); Map<String, Object> resultMap = new HashMap<>();
Map<String, Object> map1 = equipmentCategoryMapper.getCategoryCount(map.get("code").toString()); Map<String, Object> map1 = equipmentCategoryMapper.getCategoryCount(map.get("code").toString(),level,orgCode);
resultMap.put("name", map.get("name")); resultMap.put("name", map.get("name"));
resultMap.put("image", map.get("image")); resultMap.put("image", map.get("image"));
resultMap.put("waitClaim", map1.get("waitClaim")); resultMap.put("waitClaim", map1.get("waitClaim"));
......
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