Commit 747c9ec3 authored by tangwei's avatar tangwei

解决冲突

parents 0159d832 69d10e90
...@@ -69,8 +69,8 @@ public class ESEquipmentCategoryDto { ...@@ -69,8 +69,8 @@ public class ESEquipmentCategoryDto {
@Field(type = FieldType.Text) @Field(type = FieldType.Text)
private String STATUS; private String STATUS;
@Field(type = FieldType.Date, format = DateFormat.basic_date_time, index = false) @Field(type = FieldType.Long)
private Date REC_DATE; private Long REC_DATE;
} }
...@@ -38,7 +38,7 @@ public interface IEquipmentCategoryService { ...@@ -38,7 +38,7 @@ public interface IEquipmentCategoryService {
void checkEsData(String id); void checkEsData(String id);
List<EquipmentCategoryData> createEquipmentCategoryData(String unitCode); List<EquipmentCategoryData> createEquipmentCategoryData();
EquipmentCategoryData updateEquipmentCategoryData(String id); EquipmentCategoryData updateEquipmentCategoryData(String id);
} }
...@@ -179,14 +179,139 @@ ...@@ -179,14 +179,139 @@
<select id="getCategoryData" resultType="java.util.Map"> <select id="getCategoryData" resultType="java.util.Map">
SELECT SELECT
elevator, (SELECT
lifting, to_json ( b ) :: json
vehicle, FROM
boiler, (SELECT
vessel, SUM ( int4 ( ( elevator :: json -> 'waitClaim' ) ) ) waitClaim,
pipeline, SUM ( int4 ( ( elevator :: json -> 'alreadyClaim' ) ) ) alreadyClaim,
rides, SUM ( int4 ( ( elevator :: json -> 'refuseClaim' ) ) ) refuseClaim
ropeway FROM
biz_jg_equipment_category_data bjecd
WHERE
<if test="level == 'company'">
bjecd."unit_code" LIKE CONCAT('%',#{companyCode},'%')
</if>
<if test="level != 'company'">
bjecd."org_branch_code" LIKE CONCAT('%',#{orgCode},'%')
</if>
) b
) elevator,
(SELECT
to_json ( b ) :: json
FROM
(SELECT
SUM ( int4 ( ( vehicle :: json -> 'waitClaim' ) ) ) waitClaim,
SUM ( int4 ( ( vehicle :: json -> 'alreadyClaim' ) ) ) alreadyClaim,
SUM ( int4 ( ( vehicle :: json -> 'refuseClaim' ) ) ) refuseClaim
FROM
biz_jg_equipment_category_data bjecd
WHERE
<if test="level == 'company'">
bjecd."unit_code" LIKE CONCAT('%',#{companyCode},'%')
</if>
<if test="level != 'company'">
bjecd."org_branch_code" LIKE CONCAT('%',#{orgCode},'%')
</if>
) b
) vehicle,
(SELECT
to_json ( b ) :: json
FROM
(SELECT
SUM ( int4 ( ( ropeway :: json -> 'waitClaim' ) ) ) waitClaim,
SUM ( int4 ( ( ropeway :: json -> 'alreadyClaim' ) ) ) alreadyClaim,
SUM ( int4 ( ( ropeway :: json -> 'refuseClaim' ) ) ) refuseClaim
FROM
biz_jg_equipment_category_data bjecd
WHERE
<if test="level == 'company'">
bjecd."unit_code" LIKE CONCAT('%',#{companyCode},'%')
</if>
<if test="level != 'company'">
bjecd."org_branch_code" LIKE CONCAT('%',#{orgCode},'%')
</if>
) b
) ropeway,
(SELECT
to_json ( b ) :: json
FROM
(SELECT
SUM ( int4 ( ( rides :: json -> 'waitClaim' ) ) ) waitClaim,
SUM ( int4 ( ( rides :: json -> 'alreadyClaim' ) ) ) alreadyClaim,
SUM ( int4 ( ( rides :: json -> 'refuseClaim' ) ) ) refuseClaim
FROM
biz_jg_equipment_category_data bjecd
WHERE
<if test="level == 'company'">
bjecd."unit_code" LIKE CONCAT('%',#{companyCode},'%')
</if>
<if test="level != 'company'">
bjecd."org_branch_code" LIKE CONCAT('%',#{orgCode},'%')
</if>
) b
) rides,
(SELECT
to_json ( b ) :: json
FROM
(SELECT
SUM ( int4 ( ( boiler :: json -> 'waitClaim' ) ) ) waitClaim,
SUM ( int4 ( ( boiler :: json -> 'alreadyClaim' ) ) ) alreadyClaim,
SUM ( int4 ( ( boiler :: json -> 'refuseClaim' ) ) ) refuseClaim
FROM
biz_jg_equipment_category_data bjecd
WHERE
<if test="level == 'company'">
bjecd."unit_code" LIKE CONCAT('%',#{companyCode},'%')
</if>
<if test="level != 'company'">
bjecd."org_branch_code" LIKE CONCAT('%',#{orgCode},'%')
</if>
) b
) boiler,
(SELECT
to_json ( b ) :: json
FROM
(SELECT
SUM ( int4 ( ( vessel :: json -> 'waitClaim' ) ) ) waitClaim,
SUM ( int4 ( ( vessel :: json -> 'alreadyClaim' ) ) ) alreadyClaim,
SUM ( int4 ( ( vessel :: json -> 'refuseClaim' ) ) ) refuseClaim
FROM
biz_jg_equipment_category_data bjecd
WHERE
<if test="level == 'company'">
bjecd."unit_code" LIKE CONCAT('%',#{companyCode},'%')
</if>
<if test="level != 'company'">
bjecd."org_branch_code" LIKE CONCAT('%',#{orgCode},'%')
</if>
) b
) vessel,
(SELECT
to_json ( b ) :: json
FROM
(SELECT
SUM ( int4 ( ( pipeline :: json -> 'waitClaim' ) ) ) waitClaim,
SUM ( int4 ( ( pipeline :: json -> 'alreadyClaim' ) ) ) alreadyClaim,
SUM ( int4 ( ( pipeline :: json -> 'refuseClaim' ) ) ) refuseClaim
FROM
biz_jg_equipment_category_data bjecd
WHERE
<if test="level == 'company'">
bjecd."unit_code" LIKE CONCAT('%',#{companyCode},'%')
</if>
<if test="level != 'company'">
bjecd."org_branch_code" LIKE CONCAT('%',#{orgCode},'%')
</if>
) b
) pipeline,
(SELECT
to_json ( b ) :: json
FROM
(SELECT
SUM ( int4 ( ( lifting :: json -> 'waitClaim' ) ) ) waitClaim,
SUM ( int4 ( ( lifting :: json -> 'alreadyClaim' ) ) ) alreadyClaim,
SUM ( int4 ( ( lifting :: json -> 'refuseClaim' ) ) ) refuseClaim
FROM FROM
biz_jg_equipment_category_data bjecd biz_jg_equipment_category_data bjecd
WHERE WHERE
...@@ -196,6 +321,8 @@ ...@@ -196,6 +321,8 @@
<if test="level != 'company'"> <if test="level != 'company'">
bjecd."org_branch_code" LIKE CONCAT('%',#{orgCode},'%') bjecd."org_branch_code" LIKE CONCAT('%',#{orgCode},'%')
</if> </if>
) b
) lifting
</select> </select>
<select id="getUnitCodeByRecord" resultType="java.lang.String"> <select id="getUnitCodeByRecord" resultType="java.lang.String">
......
...@@ -247,7 +247,7 @@ public class EquipmentCategoryController extends BaseController { ...@@ -247,7 +247,7 @@ public class EquipmentCategoryController extends BaseController {
@ApiOperation(httpMethod = "get", value = "初始化一码通总览数据", notes = "初始化一码通总览数据") @ApiOperation(httpMethod = "get", value = "初始化一码通总览数据", notes = "初始化一码通总览数据")
public ResponseModel<Object> createEquipmentCategoryData(){ public ResponseModel<Object> createEquipmentCategoryData(){
return ResponseHelper.buildResponse(equipmentCategoryService.createEquipmentCategoryData(null)); return ResponseHelper.buildResponse(equipmentCategoryService.createEquipmentCategoryData());
} }
/** /**
......
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