Commit 61617741b7abca189ff2f7aeb8bd48e4d6e9b2f5

Authored by 陈威
1 parent 91ed1eef
Exists in dev

工程维护添加总状态

zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/domain/McConstruction.java
... ... @@ -135,6 +135,17 @@ public class McConstruction extends BaseEntity implements Cloneable
135 135 @ExcelProperty(value = "删除标志")
136 136 private String defFlag;
137 137  
  138 +
  139 + /**
  140 + * 状态名称
  141 + */
  142 + private String statusName;
  143 +
  144 + /**
  145 + * 状态代码
  146 + */
  147 + private String statusCode;
  148 +
138 149 public void setId(Long id)
139 150 {
140 151 this.id = id;
... ... @@ -388,45 +399,21 @@ public class McConstruction extends BaseEntity implements Cloneable
388 399 return defFlag;
389 400 }
390 401  
391   - @Override
392   - public String toString() {
393   - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
394   - .append("id", getId())
395   - .append("cmtyId", getCmtyId())
396   - .append("regionName", getRegionName())
397   - .append("groupName", getGroupName())
398   - .append("companyName", getCompanyName())
399   - .append("companyCode", getCompanyCode())
400   - .append("province", getProvince())
401   - .append("city", getCity())
402   - .append("district", getDistrict())
403   - .append("street", getStreet())
404   - .append("vlgOrCmty", getVlgOrCmty())
405   - .append("urbRurCls", getUrbRurCls())
406   - .append("projectTypeName", getProjectTypeName())
407   - .append("projectTypeCode", getProjectTypeCode())
408   - .append("assignmentTime", getAssignmentTime())
409   - .append("isCompleted", getIsCompleted())
410   - .append("completionTime", getCompletionTime())
411   - .append("nonNcmpRsn", getNonNcmpRsn())
412   - .append("projectPersonId", getProjectPersonId())
413   - .append("projectPersonName", getProjectPersonName())
414   - .append("projectPersonAccount", getProjectPersonAccount())
415   - .append("gasConnMtrRis", getGasConnMtrRis())
416   - .append("gctMtrrisTime", getGctMtrrisTime())
417   - .append("gctNcmpRsn", getGctNcmpRsn())
418   - .append("operatePersonId", getOperatePersonId())
419   - .append("operatePersonName", getOperatePersonName())
420   - .append("operatePersonAccount", getOperatePersonAccount())
421   - .append("remark", getRemark())
422   - .append("createTime", getCreateTime())
423   - .append("createBy", getCreateBy())
424   - .append("updateTime", getUpdateTime())
425   - .append("updateBy", getUpdateBy())
426   - .append("defFlag", getDefFlag())
427   - .toString();
  402 + public String getStatusName() {
  403 + return statusName;
428 404 }
429 405  
  406 + public void setStatusName(String statusName) {
  407 + this.statusName = statusName;
  408 + }
  409 +
  410 + public String getStatusCode() {
  411 + return statusCode;
  412 + }
  413 +
  414 + public void setStatusCode(String statusCode) {
  415 + this.statusCode = statusCode;
  416 + }
430 417  
431 418 @Override
432 419 public McConstruction clone() throws CloneNotSupportedException {
... ...
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/enums/IgnitionStatusEnums.java
... ... @@ -5,7 +5,7 @@ package com.chinagas.modules.schsf.enums;
5 5 */
6 6 public enum IgnitionStatusEnums {
7 7  
8   - MAINTENANCE_PENDING("MAINTENANCE_PENDING", "待维护"),
  8 + MAINTENANCE("MAINTENANCE", "待维护"),
9 9 MAINTENANCE_YES("MAINTENANCE_YES", "已维护(是)"),
10 10 MAINTENANCE_NO("MAINTENANCE_NO", "已维护(否)"),
11 11 CANCEL("CANCEL", "已作废");
... ...
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/enums/McConstructionStatusEnums.java 0 → 100644
... ... @@ -0,0 +1,21 @@
  1 +package com.chinagas.modules.schsf.enums;
  2 +
  3 +public enum McConstructionStatusEnums {
  4 + MAINTENANCE_SG("MAINTENANCE_SG", "待工程维护"),
  5 + MAINTENANCE_YY("MAINTENANCE_YY", "待运营维护"),
  6 + MAINTENANCE_END("MAINTENANCE_END", "已维护");
  7 +
  8 + private final String code;
  9 + private final String info;
  10 +
  11 + public String getCode() {
  12 + return code;
  13 + }
  14 + public String getInfo() {
  15 + return info;
  16 + }
  17 + McConstructionStatusEnums(String code, String info) {
  18 + this.code = code;
  19 + this.info = info;
  20 + }
  21 +}
... ...
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/service/impl/McConstructionServiceImpl.java
... ... @@ -6,6 +6,7 @@ import com.chinagas.common.core.utils.StringUtils;
6 6 import com.chinagas.common.security.utils.SecurityUtils;
7 7 import com.chinagas.modules.schsf.domain.McBasicCmty;
8 8 import com.chinagas.modules.schsf.domain.McConstruction;
  9 +import com.chinagas.modules.schsf.enums.McConstructionStatusEnums;
9 10 import com.chinagas.modules.schsf.mapper.McConstructionMapper;
10 11 import com.chinagas.modules.schsf.service.IMcConstructionService;
11 12 import com.chinagas.modules.schsf.service.IMcOperationLogService;
... ... @@ -137,7 +138,8 @@ public class McConstructionServiceImpl implements IMcConstructionService {
137 138 mcConstruction.setUpdateTime(time);
138 139 mcConstruction.setUpdateBy(userId);
139 140 mcConstruction.setCmtyId(mcBasicCmty.getId());
140   -
  141 + mcConstruction.setStatusCode(McConstructionStatusEnums.MAINTENANCE_SG.getCode());
  142 + mcConstruction.setStatusName(McConstructionStatusEnums.MAINTENANCE_SG.getInfo());
141 143 int i = mcConstructionMapper.insertMcConstruction(mcConstruction);
142 144 //1:添加记录
143 145 iMcOperationLogService.insertMcOperationLog("mc_construction", mcConstruction.getId(), "schsf:mcBasicCmty:importData",
... ... @@ -193,6 +195,8 @@ public class McConstructionServiceImpl implements IMcConstructionService {
193 195 mcConstruction_new.setProjectPersonAccount(userAccount);
194 196 mcConstruction_new.setUpdateBy(userId.toString());
195 197 mcConstruction_new.setUpdateTime(time);
  198 + mcConstruction_new.setStatusCode(McConstructionStatusEnums.MAINTENANCE_YY.getCode());
  199 + mcConstruction_new.setStatusName(McConstructionStatusEnums.MAINTENANCE_YY.getInfo());
196 200 int i = mcConstructionMapper.updateMcConstruction(mcConstruction_new);
197 201  
198 202 iMcOperationLogService.insertMcOperationLog("mc_construction", mcConstruction_param.getId(), "schsf:mcConstruction:engineering",
... ... @@ -230,6 +234,8 @@ public class McConstructionServiceImpl implements IMcConstructionService {
230 234 mcConstruction_new.setProjectPersonAccount(userAccount);
231 235 mcConstruction_new.setUpdateBy(userId.toString());
232 236 mcConstruction_new.setUpdateTime(time);
  237 + mcConstruction_new.setStatusCode(McConstructionStatusEnums.MAINTENANCE_END.getCode());
  238 + mcConstruction_new.setStatusName(McConstructionStatusEnums.MAINTENANCE_END.getInfo());
233 239 int i = mcConstructionMapper.updateMcConstruction(mcConstruction_new);
234 240 iMcOperationLogService.insertMcOperationLog("mc_construction", mcConstruction_param.getId(), "schsf:mcConstruction:operations",
235 241 "运营维护", "1", null, JSON.toJSONString(mcConstruction_old), JSON.toJSONString(mcConstruction_new));
... ...
zr-cloud/zr-modules/zr-schsf/src/main/java/com/chinagas/modules/schsf/service/impl/McIgnitionServiceImpl.java
... ... @@ -83,8 +83,8 @@ public class McIgnitionServiceImpl implements IMcIgnitionService {
83 83 mcIgnition.setUpdateTime(time);
84 84 mcIgnition.setUpdateBy(userId);
85 85  
86   - mcIgnition.setStatusCode(IgnitionStatusEnums.MAINTENANCE_PENDING.getCode());
87   - mcIgnition.setStatusName(IgnitionStatusEnums.MAINTENANCE_PENDING.getInfo());
  86 + mcIgnition.setStatusCode(IgnitionStatusEnums.MAINTENANCE.getCode());
  87 + mcIgnition.setStatusName(IgnitionStatusEnums.MAINTENANCE.getInfo());
88 88 int i = mcIgnitionMapper.insertMcIgnition(mcIgnition);
89 89 //1:添加记录
90 90 iMcOperationLogService.insertMcOperationLog("mc_ignition", mcIgnition.getId(), "schsf:mcVisit:ticket_submitAuditTwo",
... ...
zr-cloud/zr-modules/zr-schsf/src/main/resources/mapper/McBasicCmtyMapper.xml
... ... @@ -349,15 +349,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
349 349 <select id="selectMcBasicCmtyByData" resultMap="McBasicCmtyResult" parameterType="com.chinagas.modules.schsf.domain.vo.McBasicCmtyVo">
350 350 <include refid="selectMcBasicCmtyVo"/>
351 351 where 1=1
352   - and fiscal_year = #{fiscalYear}
353   - and region_name = #{regionName}
354   - and group_name = #{groupName}
355   - and company_name = #{companyName}
356   - and company_code = #{companyCode}
357   - and province = #{province}
358   - and city = #{city}
359   - and district = #{district}
360   - and street = #{street}
361   - and vlg_or_cmty = #{vlgOrCmty}
  352 + and m.fiscal_year = #{fiscalYear}
  353 + and m.region_name = #{regionName}
  354 + and m.group_name = #{groupName}
  355 + and m.company_name = #{companyName}
  356 + and m.company_code = #{companyCode}
  357 + and m.province = #{province}
  358 + and m.city = #{city}
  359 + and m.district = #{district}
  360 + and m.street = #{street}
  361 + and m.vlg_or_cmty = #{vlgOrCmty}
362 362 </select>
363 363 </mapper>
... ...
zr-cloud/zr-modules/zr-schsf/src/main/resources/mapper/McBasicMoneyMapper.xml
... ... @@ -261,15 +261,15 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
261 261 <select id="selectMcBasicMoneyByData" resultMap="McBasicMoneyResult" parameterType="com.chinagas.modules.schsf.domain.McBasicMoney">
262 262 <include refid="selectMcBasicMoneyVo"/>
263 263 where 1=1
264   - and fiscal_year = #{fiscalYear}
265   - and region_name = #{regionName}
266   - and group_name = #{groupName}
267   - and company_name = #{companyName}
268   - and company_code = #{companyCode}
269   - and province = #{province}
270   - and city = #{city}
271   - and district = #{district}
272   - and street = #{street}
273   - and vlg_or_cmty = #{vlgOrCmty}
  264 + and t.fiscal_year = #{fiscalYear}
  265 + and t.region_name = #{regionName}
  266 + and t.group_name = #{groupName}
  267 + and t.company_name = #{companyName}
  268 + and t.company_code = #{companyCode}
  269 + and t.province = #{province}
  270 + and t.city = #{city}
  271 + and t.district = #{district}
  272 + and t.street = #{street}
  273 + and t.vlg_or_cmty = #{vlgOrCmty}
274 274 </select>
275 275 </mapper>
... ...
zr-cloud/zr-modules/zr-schsf/src/main/resources/mapper/McConstructionMapper.xml
... ... @@ -38,10 +38,19 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
38 38 <result property="updateTime" column="update_time" />
39 39 <result property="updateBy" column="update_by" />
40 40 <result property="defFlag" column="def_flag" />
  41 + <result property="statusCode" column="status_code" />
  42 + <result property="statusName" column="status_name" />
41 43 </resultMap>
42 44  
43 45 <sql id="selectMcConstructionVo">
44   - select id, cmty_id, region_name, group_name, company_name, company_code, province, city, district, street, vlg_or_cmty, urb_rur_cls, project_type_name, project_type_code, assignment_time, is_completed, completion_time, non_ncmp_rsn, project_person_id, project_person_name, project_person_account, gas_conn_mtr_ris, gct_mtrris_time, gct_ncmp_rsn, operate_person_id, operate_person_name, operate_person_account, remark, create_time, create_by, update_time, update_by, def_flag from mc_construction
  46 + select id, cmty_id, region_name, group_name, company_name, company_code,
  47 + province, city, district, street, vlg_or_cmty, urb_rur_cls, project_type_name,
  48 + project_type_code, assignment_time, is_completed, completion_time, non_ncmp_rsn,
  49 + project_person_id, project_person_name, project_person_account, gas_conn_mtr_ris,
  50 + gct_mtrris_time, gct_ncmp_rsn, operate_person_id, operate_person_name,
  51 + operate_person_account, remark, create_time, create_by, update_time,
  52 + update_by, def_flag , status_code, status_name
  53 + from mc_construction
45 54 </sql>
46 55  
47 56 <select id="selectMcConstructionList" parameterType="com.chinagas.modules.schsf.domain.McConstruction" resultMap="McConstructionResult">
... ... @@ -74,6 +83,8 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
74 83 <if test="operatePersonName != null and operatePersonName != ''"> and operate_person_name like concat('%', #{operatePersonName}, '%')</if>
75 84 <if test="operatePersonAccount != null and operatePersonAccount != ''"> and operate_person_account = #{operatePersonAccount}</if>
76 85 <if test="defFlag != null and defFlag != ''"> and def_flag = #{defFlag}</if>
  86 + <if test="statusCode != null and statusCode != ''"> and status_code = #{statusCode}</if>
  87 + <if test="statusName != null and statusName != ''"> and status_name = #{statusName}</if>
77 88 </where>
78 89 order by update_time desc
79 90 </select>
... ... @@ -119,6 +130,8 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
119 130 <if test="updateTime != null">update_time,</if>
120 131 <if test="updateBy != null and updateBy != ''">update_by,</if>
121 132 <if test="defFlag != null and defFlag != ''">def_flag,</if>
  133 + <if test="statusCode != null">status_code,</if>
  134 + <if test="statusName != null">status_name,</if>
122 135 </trim>
123 136 <trim prefix="values (" suffix=")" suffixOverrides=",">
124 137 <if test="id != null">#{id},</if>
... ... @@ -154,6 +167,8 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
154 167 <if test="updateTime != null">#{updateTime},</if>
155 168 <if test="updateBy != null and updateBy != ''">#{updateBy},</if>
156 169 <if test="defFlag != null and defFlag != ''">#{defFlag},</if>
  170 + <if test="statusCode != null">#{statusCode},</if>
  171 + <if test="statusName != null">#{statusName},</if>
157 172 </trim>
158 173 </insert>
159 174  
... ... @@ -192,6 +207,8 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
192 207 <if test="updateTime != null">update_time = #{updateTime},</if>
193 208 <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
194 209 <if test="defFlag != null and defFlag != ''">def_flag = #{defFlag},</if>
  210 + <if test="statusCode != null">status_code = #{statusCode},</if>
  211 + <if test="statusName != null">status_name = #{statusName},</if>
195 212 </trim>
196 213 where id = #{id}
197 214 </update>
... ...