检/复查
This commit is contained in:
parent
7b22636da0
commit
77cf6624f6
@ -59,5 +59,7 @@ public class CheckApp2Controller extends AbstractController {
|
||||
checkService.saveRe(token, checkId, check2VO);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -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) {
|
||||
|
@ -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";
|
||||
|
||||
|
||||
/**
|
||||
|
@ -68,6 +68,7 @@ public class Check2ServiceImpl extends BaseService implements ICheck2Service {
|
||||
// 新增检查记录
|
||||
String checkId = UUIDUtil.getUUID();
|
||||
Map<String, Object> 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);
|
||||
|
@ -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) {
|
||||
|
@ -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
|
||||
|
632
src/main/resources/mybatis/mapper/check/check2-mapper.xml
Normal file
632
src/main/resources/mybatis/mapper/check/check2-mapper.xml
Normal file
@ -0,0 +1,632 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.cm.inspection.dao.check.ICheck2Dao">
|
||||
|
||||
<cache flushInterval="3600000"/>
|
||||
|
||||
<resultMap id="checkDTO" type="com.cm.inspection.pojo.dtos.check.CheckDTO">
|
||||
<id column="check_id" property="checkId"/>
|
||||
<result column="enterprise_id" property="enterpriseId"/>
|
||||
<result column="name_join_by_enterprise_id" property="nameJoinByEnterpriseId"/>
|
||||
<result column="type_join_by_enterprise_id" property="typeJoinByEnterpriseId"/>
|
||||
<result column="type_dictionary_name" property="typeDictionaryName"/>
|
||||
<result column="area1_join_by_enterprise_id" property="area1JoinByEnterpriseId"/>
|
||||
<result column="area1_dictionary_name" property="area1DictionaryName"/>
|
||||
<result column="area2_join_by_enterprise_id" property="area2JoinByEnterpriseId"/>
|
||||
<result column="area2_dictionary_name" property="area2DictionaryName"/>
|
||||
<result column="area3_join_by_enterprise_id" property="area3JoinByEnterpriseId"/>
|
||||
<result column="area3_dictionary_name" property="area3DictionaryName"/>
|
||||
<result column="area4_join_by_enterprise_id" property="area4JoinByEnterpriseId"/>
|
||||
<result column="area4_dictionary_name" property="area4DictionaryName"/>
|
||||
<result column="area5_join_by_enterprise_id" property="area5JoinByEnterpriseId"/>
|
||||
<result column="area5_dictionary_name" property="area5DictionaryName"/>
|
||||
<result column="address_join_by_enterprise_id" property="addressJoinByEnterpriseId"/>
|
||||
<result column="industry_join_by_enterprise_id" property="industryJoinByEnterpriseId"/>
|
||||
<result column="industry_dictionary_name" property="industryDictionaryName"/>
|
||||
<result column="engaged_count_join_by_enterprise_id" property="engagedCountJoinByEnterpriseId"/>
|
||||
<result column="risk_operation_join_by_enterprise_id" property="riskOperationJoinByEnterpriseId"/>
|
||||
<result column="risk_operation_dictionary_name" property="riskOperationDictionaryName"/>
|
||||
<result column="master_join_by_enterprise_id" property="masterJoinByEnterpriseId"/>
|
||||
<result column="phone_join_by_enterprise_id" property="phoneJoinByEnterpriseId"/>
|
||||
<result column="enterprise_lng_by_enterprise_id" property="enterpriseLngByEnterpriseId"/>
|
||||
<result column="enterprise_lat_by_enterprise_id" property="enterpriseLatByEnterpriseId"/>
|
||||
<result column="factory_gate_by_enterprise_id" property="factoryGateByEnterpriseId"/>
|
||||
<result column="workplace_by_enterprise_id" property="workplaceByEnterpriseId"/>
|
||||
<result column="check_type" property="checkType"/>
|
||||
<result column="task_check_id" property="taskCheckId"/>
|
||||
<result column="rectification_type" property="rectificationType"/>
|
||||
<result column="immediately_change_type" property="immediatelyChangeType"/>
|
||||
<result column="rectification_days" property="rectificationDays"/>
|
||||
<result column="summary" property="summary"/>
|
||||
<result column="is_coordination" property="isCoordination"/>
|
||||
<result column="gmt_create" property="gmtCreate"/>
|
||||
<result column="is_complete" property="isComplete"/>
|
||||
<result column="check_lng" property="checkLng"/>
|
||||
<result column="check_lat" property="checkLat"/>
|
||||
<result column="creator" property="creator"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="checkSimpleWithEnterpriseDTO" type="com.cm.inspection.pojo.dtos.check.CheckSimpleWithEnterpriseDTO">
|
||||
<id column="check_id" property="checkId"/>
|
||||
<result column="enterprise_id" property="enterpriseId"/>
|
||||
<result column="enterprise_name" property="enterpriseName"/>
|
||||
<result column="enterprise_area1" property="enterpriseArea1"/>
|
||||
<result column="enterprise_area2" property="enterpriseArea2"/>
|
||||
<result column="enterprise_area3" property="enterpriseArea3"/>
|
||||
<result column="enterprise_area4" property="enterpriseArea4"/>
|
||||
<result column="enterprise_area5" property="enterpriseArea5"/>
|
||||
<result column="enterprise_industry_type" property="enterpriseIndustryType"/>
|
||||
<result column="enterprise_industry" property="enterpriseIndustry"/>
|
||||
<result column="enterprise_risk_operation" property="enterpriseRiskOperation"/>
|
||||
<result column="enterprise_master" property="enterpriseMaster"/>
|
||||
<result column="enterprise_phone" property="enterprisePhone"/>
|
||||
<result column="enterprise_lng" property="enterpriseLng"/>
|
||||
<result column="enterprise_lat" property="enterpriseLat"/>
|
||||
<result column="enterprise_factory_gate" property="enterpriseFactoryGate"/>
|
||||
<result column="enterprise_workplace" property="enterpriseWorkplace"/>
|
||||
<result column="check_type" property="checkType"/>
|
||||
<result column="gmt_create" property="gmtCreate"/>
|
||||
<result column="is_complete" property="isComplete"/>
|
||||
<result column="check_lng" property="checkLng"/>
|
||||
<result column="check_lat" property="checkLat"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 新增检查表 -->
|
||||
<insert id="saveCheck" parameterType="map" flushCache="true">
|
||||
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}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 删除检查表 -->
|
||||
<update id="removeCheck" parameterType="map" flushCache="true">
|
||||
UPDATE
|
||||
gen_check
|
||||
SET
|
||||
is_delete = 1,
|
||||
modifier = #{modifier},
|
||||
gmt_modified = #{gmtModified}
|
||||
WHERE
|
||||
check_id IN
|
||||
<foreach collection="checkIds" index="index" open="(" separator="," close=")">
|
||||
#{checkIds[${index}]}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<!-- 修改检查表 -->
|
||||
<update id="updateCheck" parameterType="map" flushCache="true">
|
||||
UPDATE
|
||||
gen_check
|
||||
SET
|
||||
<if test="enterpriseId != null and enterpriseId != ''">
|
||||
enterprise_id = #{enterpriseId},
|
||||
</if>
|
||||
<if test="checkType != null">
|
||||
check_type = #{checkType},
|
||||
</if>
|
||||
<if test="taskCheckId != null and taskCheckId != ''">
|
||||
task_check_id = #{taskCheckId},
|
||||
</if>
|
||||
<if test="isCoordination != null">
|
||||
is_coordination = #{isCoordination},
|
||||
</if>
|
||||
<if test="isComplete != null">
|
||||
is_complete = #{isComplete},
|
||||
</if>
|
||||
<if test="rectificationType != null">
|
||||
rectification_type = #{rectificationType},
|
||||
</if>
|
||||
<if test="immediatelyChangeType != null">
|
||||
immediately_change_type = #{immediatelyChangeType},
|
||||
</if>
|
||||
<if test="rectificationDays != null">
|
||||
rectification_days = #{rectificationDays},
|
||||
</if>
|
||||
<if test="summary != null">
|
||||
summary = #{summary},
|
||||
</if>
|
||||
<if test="checkLng != null">
|
||||
check_lng = #{checkLng},
|
||||
</if>
|
||||
<if test="checkLat != null">
|
||||
check_lat = #{checkLat},
|
||||
</if>
|
||||
modifier = #{modifier},
|
||||
gmt_modified = #{gmtModified}
|
||||
WHERE
|
||||
check_id = #{checkId}
|
||||
</update>
|
||||
|
||||
<!-- 检查表详情 -->
|
||||
<select id="getCheck" parameterType="map" resultMap="checkDTO" useCache="true">
|
||||
SELECT
|
||||
t1.enterprise_id,
|
||||
jt1.name name_join_by_enterprise_id,
|
||||
t1.check_type,
|
||||
t1.task_check_id,
|
||||
t1.is_coordination,
|
||||
t1.is_complete,
|
||||
t1.rectification_type,
|
||||
t1.immediately_change_type,
|
||||
t1.rectification_days,
|
||||
t1.summary,
|
||||
t1.check_lng,
|
||||
t1.check_lat,
|
||||
LEFT(t1.gmt_create, 19) gmt_create,
|
||||
t1.check_id
|
||||
FROM
|
||||
gen_check t1
|
||||
INNER JOIN
|
||||
gen_enterprise jt1
|
||||
ON
|
||||
t1.enterprise_id = jt1.enterprise_id
|
||||
AND
|
||||
jt1.is_delete = 0
|
||||
WHERE
|
||||
t1.is_delete = 0
|
||||
<if test="checkId != null and checkId != ''">
|
||||
AND
|
||||
t1.check_id = #{checkId}
|
||||
</if>
|
||||
ORDER BY
|
||||
t1.gmt_create DESC
|
||||
</select>
|
||||
|
||||
<!-- 检查表列表 -->
|
||||
<select id="listCheck" parameterType="map" resultMap="checkDTO" useCache="true">
|
||||
SELECT
|
||||
t1.enterprise_id,
|
||||
jt1.name name_join_by_enterprise_id,
|
||||
jt1.type type_join_by_enterprise_id,
|
||||
dt1.dictionary_name type_dictionary_name,
|
||||
jt1.area1 area1_join_by_enterprise_id,
|
||||
jt1.area1_dictionary_name area1_dictionary_name,
|
||||
jt1.area2 area2_join_by_enterprise_id,
|
||||
jt1.area2_dictionary_name area2_dictionary_name,
|
||||
jt1.area3 area3_join_by_enterprise_id,
|
||||
jt1.area3_dictionary_name area3_dictionary_name,
|
||||
jt1.area4 area4_join_by_enterprise_id,
|
||||
jt1.area4_dictionary_name area4_dictionary_name,
|
||||
jt1.area5 area5_join_by_enterprise_id,
|
||||
jt1.area5_dictionary_name area5_dictionary_name,
|
||||
jt1.address address_join_by_enterprise_id,
|
||||
jt1.industry industry_join_by_enterprise_id,
|
||||
dt2.dictionary_name industry_dictionary_name,
|
||||
jt1.engaged_count engaged_count_join_by_enterprise_id,
|
||||
jt1.risk_operation risk_operation_join_by_enterprise_id,
|
||||
dt3.dictionary_name risk_operation_dictionary_name,
|
||||
jt1.master master_join_by_enterprise_id,
|
||||
jt1.phone phone_join_by_enterprise_id,
|
||||
jt1.enterprise_lng enterprise_lng_by_enterprise_id,
|
||||
jt1.enterprise_lat enterprise_lat_by_enterprise_id,
|
||||
jt1.factory_gate factory_gate_by_enterprise_id,
|
||||
jt1.workplace workplace_by_enterprise_id,
|
||||
t1.check_type,
|
||||
t1.task_check_id,
|
||||
t1.is_coordination,
|
||||
t1.is_complete,
|
||||
t1.rectification_type,
|
||||
t1.immediately_change_type,
|
||||
t1.rectification_days,
|
||||
t1.summary,
|
||||
t1.check_lng,
|
||||
t1.check_lat,
|
||||
LEFT(t1.gmt_create, 19) gmt_create,
|
||||
t1.check_id
|
||||
FROM
|
||||
gen_check t1
|
||||
INNER JOIN
|
||||
gen_enterprise jt1
|
||||
ON
|
||||
t1.enterprise_id = jt1.enterprise_id
|
||||
AND
|
||||
jt1.is_delete = 0
|
||||
LEFT JOIN
|
||||
data_dictionary dt1
|
||||
ON
|
||||
dt1.dictionary_id = jt1.type
|
||||
AND
|
||||
dt1.is_delete = 0
|
||||
LEFT JOIN
|
||||
data_dictionary dt2
|
||||
ON
|
||||
dt2.dictionary_id = jt1.industry
|
||||
AND
|
||||
dt2.is_delete = 0
|
||||
LEFT JOIN
|
||||
data_dictionary dt3
|
||||
ON
|
||||
dt3.dictionary_id = jt1.risk_operation
|
||||
AND
|
||||
dt3.is_delete = 0
|
||||
WHERE
|
||||
t1.is_delete = 0
|
||||
<if test="keywords != null and keywords != ''">
|
||||
AND
|
||||
jt1.name LIKE CONCAT('%', #{keywords}, '%')
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND
|
||||
LEFT(t1.gmt_create, 10) <![CDATA[ >= ]]> #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
AND
|
||||
LEFT(t1.gmt_create, 10) <![CDATA[ <= ]]> #{endTime}
|
||||
</if>
|
||||
<if test="area1 != null and area1 != ''">
|
||||
AND
|
||||
jt1.area1 = #{area1}
|
||||
</if>
|
||||
<if test="area2 != null and area2 != ''">
|
||||
AND
|
||||
jt1.area2 = #{area2}
|
||||
</if>
|
||||
<if test="area3 != null and area3 != ''">
|
||||
AND
|
||||
jt1.area3 = #{area3}
|
||||
</if>
|
||||
<if test="area4 != null and area4 != ''">
|
||||
AND
|
||||
jt1.area4 = #{area4}
|
||||
</if>
|
||||
<if test="area5 != null and area5 != ''">
|
||||
AND
|
||||
jt1.area5 = #{area5}
|
||||
</if>
|
||||
<if test="type != null and type != ''">
|
||||
AND
|
||||
jt1.type = #{type}
|
||||
</if>
|
||||
<if test="industry != null and industry != ''">
|
||||
AND
|
||||
jt1.industry = #{industry}
|
||||
</if>
|
||||
<if test="checkType != null and checkType != ''">
|
||||
AND
|
||||
t1.check_type = #{checkType}
|
||||
</if>
|
||||
<if test="isCoordination != null and isCoordination != ''">
|
||||
AND
|
||||
t1.is_coordination = #{isCoordination}
|
||||
</if>
|
||||
<if test="isComplete != null and isComplete != ''">
|
||||
AND
|
||||
t1.is_complete = #{isComplete}
|
||||
</if>
|
||||
<if test="checkIds != null and checkIds.size > 0">
|
||||
AND
|
||||
t1.check_id IN
|
||||
<foreach collection="checkIds" index="index" open="(" separator="," close=")">
|
||||
#{checkIds[${index}]}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="creator != null and creator != ''">
|
||||
AND
|
||||
t1.creator = #{creator}
|
||||
</if>
|
||||
<if test="checkMonth != null">
|
||||
AND
|
||||
LEFT(t1.gmt_create, 7) = #{checkMonth}
|
||||
</if>
|
||||
ORDER BY
|
||||
t1.gmt_create DESC
|
||||
</select>
|
||||
|
||||
<!-- 统计检查 -->
|
||||
<select id="countCheck" parameterType="map" resultType="java.lang.Integer" useCache="true">
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
gen_check
|
||||
WHERE
|
||||
is_delete = 0
|
||||
<if test="enterpriseId != null and enterpriseId != ''">
|
||||
AND
|
||||
enterprise_id = #{enterpriseId}
|
||||
</if>
|
||||
<if test="creator != null and creator != ''">
|
||||
AND
|
||||
creator = #{creator}
|
||||
</if>
|
||||
<if test="taskCheckId != null and taskCheckId != ''">
|
||||
AND
|
||||
task_check_id = #{taskCheckId}
|
||||
</if>
|
||||
<if test="rectificationType != null">
|
||||
<if test="rectificationType == 0">
|
||||
AND (
|
||||
is_complete = 0
|
||||
OR
|
||||
creator != modifier
|
||||
)
|
||||
</if>
|
||||
<if test="rectificationType == 1">
|
||||
AND (
|
||||
is_complete = 1
|
||||
AND
|
||||
creator = modifier
|
||||
)
|
||||
</if>
|
||||
</if>
|
||||
<if test="checkType != null">
|
||||
AND
|
||||
check_type = #{checkType}
|
||||
</if>
|
||||
<if test="isCoordination != null">
|
||||
AND
|
||||
is_coordination = #{isCoordination}
|
||||
</if>
|
||||
<if test="isComplete != null and isComplete != ''">
|
||||
AND
|
||||
is_complete = #{isComplete}
|
||||
</if>
|
||||
<if test="checkDay != null and checkDay != ''">
|
||||
AND
|
||||
LEFT(gmt_create, 10) = #{checkDay}
|
||||
</if>
|
||||
<if test="checkMonth != null and checkMonth != ''">
|
||||
AND
|
||||
LEFT(gmt_create, 7) = #{checkMonth}
|
||||
</if>
|
||||
<if test="startDate != null and startDate != ''">
|
||||
AND
|
||||
LEFT(gmt_create, 7) <![CDATA[ >= ]]> #{startDate}
|
||||
</if>
|
||||
<if test="endDate != null and endDate != ''">
|
||||
AND
|
||||
LEFT(gmt_create, 7) <![CDATA[ <= ]]> #{endDate}
|
||||
</if>
|
||||
<if test="year != null and year != ''">
|
||||
AND
|
||||
LEFT(gmt_create, 4) = #{year}
|
||||
</if>
|
||||
<if test="userIdList != null">
|
||||
AND
|
||||
creator IN
|
||||
<foreach collection="userIdList" index="index" open="(" separator="," close=")">
|
||||
#{userIdList[${index}]}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="checkIdList != null and checkIdList.size > 0">
|
||||
AND
|
||||
check_id IN
|
||||
<foreach collection="checkIdList" index="index" open="(" separator="," close=")">
|
||||
#{checkIds[${index}]}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 检查列表(简单格式) -->
|
||||
<select id="listCheckSimple" parameterType="map" resultMap="checkDTO" useCache="true">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
gen_check
|
||||
WHERE
|
||||
is_delete = 0
|
||||
<if test="checkType != null and checkType != ''">
|
||||
AND
|
||||
check_type = #{checkType}
|
||||
</if>
|
||||
<if test="rectificationType != null and rectificationType != ''">
|
||||
AND
|
||||
rectification_type = #{rectificationType}
|
||||
</if>
|
||||
<if test="year != null and year != ''">
|
||||
AND
|
||||
LEFT(gmt_create, 4) = #{year}
|
||||
</if>
|
||||
<if test="checkIdList != null and checkIdList.size > 0">
|
||||
AND
|
||||
check_id IN
|
||||
<foreach collection="checkIdList" index="index" open="(" separator="," close=")">
|
||||
#{checkIdList[${index}]}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="currentDate != null and currentDate != ''">
|
||||
AND
|
||||
LEFT(gmt_create, 10) <![CDATA[ <= ]]> #{currentDate}
|
||||
</if>
|
||||
<if test="isComplete != null and isComplete != ''">
|
||||
AND
|
||||
is_complete = #{isComplete}
|
||||
</if>
|
||||
<if test="userIdList != null and userIdList.size > 0">
|
||||
AND
|
||||
creator IN
|
||||
<foreach collection="userIdList" index="index" open="(" separator="," close=")">
|
||||
#{userIdList[${index}]}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 企业检查情况 -->
|
||||
<select id="countEnterpriseCheck" parameterType="map" resultType="java.lang.Integer" useCache="true">
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM (
|
||||
SELECT
|
||||
enterprise_id
|
||||
FROM
|
||||
gen_check
|
||||
WHERE
|
||||
is_delete = 0
|
||||
<if test="year != null and year != ''">
|
||||
AND
|
||||
LEFT(gmt_create, 4) = #{year}
|
||||
</if>
|
||||
<if test="yearMonth != null and yearMonth != ''">
|
||||
AND
|
||||
LEFT(gmt_create, 7) = #{yearMonth}
|
||||
</if>
|
||||
<if test="checkType != null">
|
||||
AND
|
||||
check_type = #{checkType}
|
||||
</if>
|
||||
<if test="userId != null and userId != ''">
|
||||
AND
|
||||
creator = #{userId}
|
||||
</if>
|
||||
<if test="userIdList != null and userIdList.size > 0">
|
||||
AND
|
||||
creator IN
|
||||
<foreach collection="userIdList" index="index" open="(" separator="," close=")">
|
||||
#{userIdList[${index}]}
|
||||
</foreach>
|
||||
</if>
|
||||
GROUP BY
|
||||
enterprise_id
|
||||
) temp
|
||||
</select>
|
||||
|
||||
<!-- 检查表列表(简单格式和企业信息) -->
|
||||
<select id="listCheckSimpleWithEnterprise" resultMap="checkSimpleWithEnterpriseDTO" useCache="true">
|
||||
SELECT
|
||||
t1.enterprise_id,
|
||||
jt1.name enterprise_name,
|
||||
jt1.area1 enterprise_area1,
|
||||
jt1.area2 enterprise_area2,
|
||||
jt1.area3 enterprise_area3,
|
||||
jt1.area4 enterprise_area4,
|
||||
jt1.area5 enterprise_area5,
|
||||
jt1.address enterprise_address,
|
||||
jt1.industry_type enterprise_industry_type,
|
||||
jt1.industry enterprise_industry,
|
||||
jt1.engaged_count enterprise_engaged_count,
|
||||
jt1.risk_operation enterprise_risk_operation,
|
||||
jt1.master enterprise_master,
|
||||
jt1.phone enterprise_phone,
|
||||
jt1.enterprise_lng enterprise_lng,
|
||||
jt1.enterprise_lat enterprise_lat,
|
||||
jt1.factory_gate enterprise_factory_gate,
|
||||
jt1.workplace enterprise_workplace,
|
||||
t1.check_type,
|
||||
t1.task_check_id,
|
||||
t1.is_coordination,
|
||||
t1.is_complete,
|
||||
t1.rectification_type,
|
||||
t1.immediately_change_type,
|
||||
t1.rectification_days,
|
||||
t1.summary,
|
||||
t1.check_lng,
|
||||
t1.check_lat,
|
||||
LEFT(t1.gmt_create, 19) gmt_create,
|
||||
t1.check_id
|
||||
FROM
|
||||
gen_check t1
|
||||
INNER JOIN
|
||||
gen_enterprise jt1
|
||||
ON
|
||||
t1.enterprise_id = jt1.enterprise_id
|
||||
AND
|
||||
jt1.is_delete = 0
|
||||
WHERE
|
||||
t1.is_delete = 0
|
||||
<if test="keywords != null and keywords != ''">
|
||||
AND
|
||||
jt1.name LIKE CONCAT('%', #{keywords}, '%')
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND
|
||||
LEFT(t1.gmt_create, 10) <![CDATA[ >= ]]> #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
AND
|
||||
LEFT(t1.gmt_create, 10) <![CDATA[ <= ]]> #{endTime}
|
||||
</if>
|
||||
<if test="area1 != null and area1 != ''">
|
||||
AND
|
||||
jt1.area1 = #{area1}
|
||||
</if>
|
||||
<if test="area2 != null and area2 != ''">
|
||||
AND
|
||||
jt1.area2 = #{area2}
|
||||
</if>
|
||||
<if test="area3 != null and area3 != ''">
|
||||
AND
|
||||
jt1.area3 = #{area3}
|
||||
</if>
|
||||
<if test="area4 != null and area4 != ''">
|
||||
AND
|
||||
jt1.area4 = #{area4}
|
||||
</if>
|
||||
<if test="area5 != null and area5 != ''">
|
||||
AND
|
||||
jt1.area5 = #{area5}
|
||||
</if>
|
||||
<if test="type != null and type != ''">
|
||||
AND
|
||||
jt1.type = #{type}
|
||||
</if>
|
||||
<if test="industryType != null and industryType != ''">
|
||||
AND
|
||||
jt1.industry_type = #{industryType}
|
||||
</if>
|
||||
<if test="industry != null and industry != ''">
|
||||
AND
|
||||
jt1.industry = #{industry}
|
||||
</if>
|
||||
<if test="checkType != null and checkType != ''">
|
||||
AND
|
||||
t1.check_type = #{checkType}
|
||||
</if>
|
||||
<if test="isCoordination != null and isCoordination != ''">
|
||||
AND
|
||||
t1.is_coordination = #{isCoordination}
|
||||
</if>
|
||||
<if test="isComplete != null and isComplete != ''">
|
||||
AND
|
||||
t1.is_complete = #{isComplete}
|
||||
</if>
|
||||
<if test="checkIds != null and checkIds.size > 0">
|
||||
AND
|
||||
t1.check_id IN
|
||||
<foreach collection="checkIds" index="index" open="(" separator="," close=")">
|
||||
#{checkIds[${index}]}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="creator != null and creator != ''">
|
||||
AND
|
||||
t1.creator = #{creator}
|
||||
</if>
|
||||
<if test="checkMonth != null">
|
||||
AND
|
||||
LEFT(t1.gmt_create, 7) = #{checkMonth}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -218,7 +218,7 @@
|
||||
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||
{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]);
|
||||
|
@ -83,7 +83,7 @@
|
||||
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||
{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',
|
||||
|
@ -200,7 +200,7 @@
|
||||
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||
{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',
|
||||
|
Loading…
Reference in New Issue
Block a user