diff --git a/src/main/java/com/cm/inspection/controller/app/apis/check/CheckApp2Controller.java b/src/main/java/com/cm/inspection/controller/app/apis/check/CheckApp2Controller.java index f14708e..af60a15 100644 --- a/src/main/java/com/cm/inspection/controller/app/apis/check/CheckApp2Controller.java +++ b/src/main/java/com/cm/inspection/controller/app/apis/check/CheckApp2Controller.java @@ -59,5 +59,7 @@ public class CheckApp2Controller extends AbstractController { checkService.saveRe(token, checkId, check2VO); return new SuccessResult(); } + + } \ No newline at end of file diff --git a/src/main/java/com/cm/inspection/pojo/vos/gridpersonnel/GridPersonnelVO.java b/src/main/java/com/cm/inspection/pojo/vos/gridpersonnel/GridPersonnelVO.java index b77fcf4..d8b17af 100644 --- a/src/main/java/com/cm/inspection/pojo/vos/gridpersonnel/GridPersonnelVO.java +++ b/src/main/java/com/cm/inspection/pojo/vos/gridpersonnel/GridPersonnelVO.java @@ -18,15 +18,6 @@ public class GridPersonnelVO { @ApiModelProperty(name = "userId", value = "用户ID") @CheckEmptyAnnotation(name = "用户ID") private String userId; - @ApiModelProperty(name = "userName", value = "用户昵称") - @CheckEmptyAnnotation(name = "用户昵称") - private String userName; - @ApiModelProperty(name = "departmentId", value = "部门ID") - @CheckEmptyAnnotation(name = "部门ID") - private String departmentId; - @ApiModelProperty(name = "departmentName", value = "部门名称") - @CheckEmptyAnnotation(name = "部门名称") - private String departmentName; @ApiModelProperty(name = "area1", value = "1级区域") private String area1; @ApiModelProperty(name = "area2", value = "2级区域") @@ -39,12 +30,6 @@ public class GridPersonnelVO { private String area5; @ApiModelProperty(name = "leaderUserId", value = "领导ID") private String leaderUserId; - @ApiModelProperty(name = "leaderUserName", value = "领导用户昵称") - private String leaderUserName; - @ApiModelProperty(name = "leaderDepartmentId", value = "领导部门ID") - private String leaderDepartmentId; - @ApiModelProperty(name = "leaderDepartmentName", value = "领导部门名称") - private String leaderDepartmentName; @ApiModelProperty(name = "personType", value = "人员类型") @CheckEmptyAnnotation(name = "人员类型") private String personType; @@ -62,30 +47,6 @@ public class GridPersonnelVO { this.userId = userId; } - public String getUserName() { - return userName == null ? "" : userName; - } - - public void setUserName(String userName) { - this.userName = userName; - } - - public String getDepartmentId() { - return departmentId == null ? "" : departmentId; - } - - public void setDepartmentId(String departmentId) { - this.departmentId = departmentId; - } - - public String getDepartmentName() { - return departmentName == null ? "" : departmentName; - } - - public void setDepartmentName(String departmentName) { - this.departmentName = departmentName; - } - public String getArea1() { return area1 == null ? "" : area1; } @@ -134,30 +95,6 @@ public class GridPersonnelVO { this.leaderUserId = leaderUserId; } - public String getLeaderUserName() { - return leaderUserName == null ? "" : leaderUserName; - } - - public void setLeaderUserName(String leaderUserName) { - this.leaderUserName = leaderUserName; - } - - public String getLeaderDepartmentId() { - return leaderDepartmentId == null ? "" : leaderDepartmentId; - } - - public void setLeaderDepartmentId(String leaderDepartmentId) { - this.leaderDepartmentId = leaderDepartmentId; - } - - public String getLeaderDepartmentName() { - return leaderDepartmentName == null ? "" : leaderDepartmentName; - } - - public void setLeaderDepartmentName(String leaderDepartmentName) { - this.leaderDepartmentName = leaderDepartmentName; - } - public String getPersonType() { return personType == null ? "" : personType; } @@ -167,7 +104,7 @@ public class GridPersonnelVO { } public String getGridType() { - return gridType; + return gridType == null ? "" : gridType; } public void setGridType(String gridType) { diff --git a/src/main/java/com/cm/inspection/service/check/ICheck2Service.java b/src/main/java/com/cm/inspection/service/check/ICheck2Service.java index 1529b1d..d9ebe94 100644 --- a/src/main/java/com/cm/inspection/service/check/ICheck2Service.java +++ b/src/main/java/com/cm/inspection/service/check/ICheck2Service.java @@ -11,7 +11,7 @@ import com.cm.inspection.pojo.vos.check.Check2VO; **/ public interface ICheck2Service { - String BUSINESS_KEY_PREFIX = "checkV2"; + String BUSINESS_KEY_PREFIX = "check2"; /** diff --git a/src/main/java/com/cm/inspection/service/check/impl/Check2ServiceImpl.java b/src/main/java/com/cm/inspection/service/check/impl/Check2ServiceImpl.java index 040bfdb..98453e2 100644 --- a/src/main/java/com/cm/inspection/service/check/impl/Check2ServiceImpl.java +++ b/src/main/java/com/cm/inspection/service/check/impl/Check2ServiceImpl.java @@ -68,6 +68,7 @@ public class Check2ServiceImpl extends BaseService implements ICheck2Service { // 新增检查记录 String checkId = UUIDUtil.getUUID(); Map params = HashMapUtil.beanToMap(check2VO); + params.put("checkId", checkId); setSaveInfo(token, params); LOG.debug("保存检查记录"); check2Dao.saveCheck(params); @@ -107,7 +108,7 @@ public class Check2ServiceImpl extends BaseService implements ICheck2Service { params.put(GridPersonnelTypeEnum.GRID.getValue(), grid); processService.startProcess(IProcessService.BT_CHECK_REPORT_V2, businessKey, params); // 得到当前任务 - Task task = processService.getTaskByAssigneeAndProcessId(grid, businessKey); + Task task = processService.getTaskByAssigneeAndBusinessKey(grid, businessKey); LOG.debug("检查结果是否全部通过"); int isAllPass = saveCheckResult(token, checkId, check2VO); params.put(CheckProcessParamsEnum.IS_ALL_PASS.getValue(), isAllPass); diff --git a/src/main/java/com/cm/inspection/service/data/impl/DataHandleImpl.java b/src/main/java/com/cm/inspection/service/data/impl/DataHandleImpl.java index d327de7..808d8a7 100644 --- a/src/main/java/com/cm/inspection/service/data/impl/DataHandleImpl.java +++ b/src/main/java/com/cm/inspection/service/data/impl/DataHandleImpl.java @@ -54,16 +54,10 @@ public class DataHandleImpl extends BaseService implements IDataHandle { String[] userIdArray = userIds.split("\\|"); gridPersonnelVO.setUserId(userIdArray[0]); - gridPersonnelVO.setDepartmentId(userIdArray[1]); - gridPersonnelVO.setUserName(userIdArray[2]); - gridPersonnelVO.setDepartmentName(userIdArray[3].split("】")[0].split("【")[1]); String leaderUserIds = gridPersonnelDTO.getLeaderUserId(); if (!StringUtils.isBlank(leaderUserIds)) { String[] leaderUserIdArray = leaderUserIds.split("\\|"); gridPersonnelVO.setLeaderUserId(leaderUserIdArray[0]); - gridPersonnelVO.setLeaderDepartmentId(leaderUserIdArray[1]); - gridPersonnelVO.setLeaderUserName(leaderUserIdArray[2]); - gridPersonnelVO.setLeaderDepartmentName(leaderUserIdArray[3].split("】")[0].substring(1)); } Integer level = gridPersonnelDTO.getLevel(); if (level == 1) { diff --git a/src/main/resources/application-test.yml b/src/main/resources/application-test.yml index e25a9ee..fbc856a 100644 --- a/src/main/resources/application-test.yml +++ b/src/main/resources/application-test.yml @@ -20,14 +20,14 @@ spring: max-request-size: 1GB datasource: druid: -# url: jdbc:mysql://49.233.36.36:6688/db_cloud_inspection?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false - url: jdbc:mysql://127.0.0.1:3306/db_cloud_inspection?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false + url: jdbc:mysql://49.233.36.36:6688/db_cloud_inspection?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false +# url: jdbc:mysql://127.0.0.1:3306/db_cloud_inspection?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false db-type: mysql driver-class-name: com.mysql.jdbc.Driver -# username: wanggeng - username: root -# password: WenG>2132997 - password: root + username: wanggeng +# username: root + password: WenG>2132997 +# password: root initial-size: 2 min-idle: 2 max-active: 5 @@ -84,10 +84,10 @@ security: oauth-server: http://192.168.0.103:7001/usercenter oauth-logout: ${security.oauth2.oauth-server}/logout?redirect_uri=${server.url} client: -# client-id: 44a8dc867f7f4465b7ba6065d87e30d7 - client-id: 32ec344a5fd04fd9911586df5d1dc36b -# client-secret: bTRCTEw1TEZkL284bVhLOXJ2NDYrSUlGdU1DSlNGaGdLTWhEb1l1VHZHMG1ac2wwZTJHWk5NbXh3L3h3U2c4Rg== - client-secret: a2NORTAyZmthdTNtVHNwLytGVVo0ckFhNktHQU9JWVFmUks0TGw5L2hQRW1ac2wwZTJHWk5NbXh3L3h3U2c4Rg== + client-id: 44a8dc867f7f4465b7ba6065d87e30d7 +# client-id: 32ec344a5fd04fd9911586df5d1dc36b + client-secret: bTRCTEw1TEZkL284bVhLOXJ2NDYrSUlGdU1DSlNGaGdLTWhEb1l1VHZHMG1ac2wwZTJHWk5NbXh3L3h3U2c4Rg== +# client-secret: a2NORTAyZmthdTNtVHNwLytGVVo0ckFhNktHQU9JWVFmUks0TGw5L2hQRW1ac2wwZTJHWk5NbXh3L3h3U2c4Rg== user-authorization-uri: ${security.oauth2.oauth-server}/oauth_client/authorize access-token-uri: ${security.oauth2.oauth-server}/oauth_client/token grant-type: authorization_code @@ -101,7 +101,7 @@ security: api-path: user-center: ${security.oauth2.oauth-server} - notice-url: http://192.168.0.103:7001/usercenter + notice-url: http://127.0.0.1:7001/usercenter version: 2 report-form: check-detail: false diff --git a/src/main/resources/mybatis/mapper/check/check2-mapper.xml b/src/main/resources/mybatis/mapper/check/check2-mapper.xml new file mode 100644 index 0000000..25aa1ca --- /dev/null +++ b/src/main/resources/mybatis/mapper/check/check2-mapper.xml @@ -0,0 +1,632 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO gen_check( + check_id, + enterprise_id, + check_type, + task_check_id, + is_coordination, + is_complete, + rectification_type, + immediately_change_type, + rectification_days, + summary, + check_lng, + check_lat, + creator, + gmt_create, + modifier, + gmt_modified, + is_delete + ) VALUES( + #{checkId}, + #{enterpriseId}, + #{checkType}, + #{taskCheckId}, + #{isCoordination}, + #{isComplete}, + #{rectificationType}, + #{immediatelyChangeType}, + #{rectificationDays}, + #{summary}, + #{checkLng}, + #{checkLat}, + #{creator}, + #{gmtCreate}, + #{modifier}, + #{gmtModified}, + #{isDelete} + ) + + + + + UPDATE + gen_check + SET + is_delete = 1, + modifier = #{modifier}, + gmt_modified = #{gmtModified} + WHERE + check_id IN + + #{checkIds[${index}]} + + + + + + UPDATE + gen_check + SET + + enterprise_id = #{enterpriseId}, + + + check_type = #{checkType}, + + + task_check_id = #{taskCheckId}, + + + is_coordination = #{isCoordination}, + + + is_complete = #{isComplete}, + + + rectification_type = #{rectificationType}, + + + immediately_change_type = #{immediatelyChangeType}, + + + rectification_days = #{rectificationDays}, + + + summary = #{summary}, + + + check_lng = #{checkLng}, + + + check_lat = #{checkLat}, + + modifier = #{modifier}, + gmt_modified = #{gmtModified} + WHERE + check_id = #{checkId} + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/static/route/gridpersonnel/list-gridpersonnel-area.html b/src/main/resources/static/route/gridpersonnel/list-gridpersonnel-area.html index 2c7b3a0..880af18 100644 --- a/src/main/resources/static/route/gridpersonnel/list-gridpersonnel-area.html +++ b/src/main/resources/static/route/gridpersonnel/list-gridpersonnel-area.html @@ -218,7 +218,7 @@ {field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '{{d.LAY_INDEX}}'}, {field: 'user', width: 200, title: '网格员', align:'center', templet: function(row) { - return '【'+ row.departmentName +'】'+ row.userName; + return row.userName; } }, {field: 'userPhone', width: 150, title: '联系方式', align:'center', @@ -280,7 +280,7 @@ if(!row.leaderUserId) { return '-'; } - return '【'+ row.leaderDepartmentName +'】'+ row.leaderUserName;; + return row.leaderUserName;; } }, {field: 'personType', width: 100, title: '人员类型', align:'center', @@ -348,7 +348,7 @@ }); } function initAreaData(callback) { - top.restAjax.get(top.restAjax.path('api/gridpersonnel/listgridpersonnelareaofmine', []), {}, null, function(code, data) { + top.restAjax.get(top.restAjax.path('api/gridpersonnel/listareaofmine', []), {}, null, function(code, data) { // initArea1Select(data.data[0]); initArea2Select(data.data[0], data.data[1]); initArea3Select(data.data[1], data.data[2]); diff --git a/src/main/resources/static/route/gridpersonnel/list-gridpersonnel-mine.html b/src/main/resources/static/route/gridpersonnel/list-gridpersonnel-mine.html index 6140451..3d80cc7 100644 --- a/src/main/resources/static/route/gridpersonnel/list-gridpersonnel-mine.html +++ b/src/main/resources/static/route/gridpersonnel/list-gridpersonnel-mine.html @@ -83,7 +83,7 @@ {field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '{{d.LAY_INDEX}}'}, {field: 'user', width: 200, title: '网格员', align:'center', templet: function(row) { - return '【'+ row.departmentName +'】'+ row.userName; + return row.userName; } }, {field: 'userPhone', width: 150, title: '联系方式', align:'center', @@ -196,7 +196,7 @@ if(!row.leaderUserId) { return '-'; } - return '【'+ row.leaderDepartmentName +'】'+ row.leaderUserName;; + return row.leaderUserName;; } }, {field: 'personType', width: 100, title: '人员类型', align:'center', diff --git a/src/main/resources/static/route/gridpersonnel/list-gridpersonnel.html b/src/main/resources/static/route/gridpersonnel/list-gridpersonnel.html index 2f7edcd..4e6f41d 100644 --- a/src/main/resources/static/route/gridpersonnel/list-gridpersonnel.html +++ b/src/main/resources/static/route/gridpersonnel/list-gridpersonnel.html @@ -200,7 +200,7 @@ {field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '{{d.LAY_INDEX}}'}, {field: 'user', width: 200, title: '网格员', align:'center', templet: function(row) { - return '【'+ row.departmentName +'】'+ row.userName; + return row.userName; } }, {field: 'userPhone', width: 150, title: '联系方式', align:'center', @@ -262,7 +262,7 @@ if(!row.leaderUserId) { return '-'; } - return '【'+ row.leaderDepartmentName +'】'+ row.leaderUserName;; + return row.leaderUserName;; } }, {field: 'personType', width: 100, title: '人员类型', align:'center',