Commit 747c9ec3 authored by tangwei's avatar tangwei

解决冲突

parents 0159d832 69d10e90
......@@ -69,8 +69,8 @@ public class ESEquipmentCategoryDto {
@Field(type = FieldType.Text)
private String STATUS;
@Field(type = FieldType.Date, format = DateFormat.basic_date_time, index = false)
private Date REC_DATE;
@Field(type = FieldType.Long)
private Long REC_DATE;
}
......@@ -38,7 +38,7 @@ public interface IEquipmentCategoryService {
void checkEsData(String id);
List<EquipmentCategoryData> createEquipmentCategoryData(String unitCode);
List<EquipmentCategoryData> createEquipmentCategoryData();
EquipmentCategoryData updateEquipmentCategoryData(String id);
}
......@@ -179,23 +179,150 @@
<select id="getCategoryData" resultType="java.util.Map">
SELECT
elevator,
lifting,
vehicle,
boiler,
vessel,
pipeline,
rides,
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>
(SELECT
to_json ( b ) :: json
FROM
(SELECT
SUM ( int4 ( ( elevator :: json -> 'waitClaim' ) ) ) waitClaim,
SUM ( int4 ( ( elevator :: json -> 'alreadyClaim' ) ) ) alreadyClaim,
SUM ( int4 ( ( elevator :: 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
) 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
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
) lifting
</select>
<select id="getUnitCodeByRecord" resultType="java.lang.String">
......
......@@ -247,7 +247,7 @@ public class EquipmentCategoryController extends BaseController {
@ApiOperation(httpMethod = "get", value = "初始化一码通总览数据", notes = "初始化一码通总览数据")
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