金筑工实名制同步数据
This commit is contained in:
parent
ee0f0377ce
commit
d78537bd28
@ -72,6 +72,7 @@ public class QualityInspectionRecordController {
|
|||||||
@ApiImplicitParam(name = "operatorId", value = "操作人(整改、复查、核验:changeId、reviewId、verifyManId)", paramType = "query", required = false, dataType = "String"),
|
@ApiImplicitParam(name = "operatorId", value = "操作人(整改、复查、核验:changeId、reviewId、verifyManId)", paramType = "query", required = false, dataType = "String"),
|
||||||
@ApiImplicitParam(name = "inspectStartTime", value = "检查开始时间", paramType = "query", required = false, dataType = "String"),
|
@ApiImplicitParam(name = "inspectStartTime", value = "检查开始时间", paramType = "query", required = false, dataType = "String"),
|
||||||
@ApiImplicitParam(name = "inspectEndTime", value = "检查结束时间", paramType = "query", required = false, dataType = "String"),
|
@ApiImplicitParam(name = "inspectEndTime", value = "检查结束时间", paramType = "query", required = false, dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "search", value = "搜索(检查部位、问题分类、问题描述、补充说明、整改要求)", paramType = "query", required = false, dataType = "String"),
|
||||||
@ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"),
|
@ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"),
|
||||||
@ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"),
|
@ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"),
|
||||||
})
|
})
|
||||||
|
|||||||
@ -126,6 +126,14 @@
|
|||||||
<if test="param.recordStatus == '7'.toString()">
|
<if test="param.recordStatus == '7'.toString()">
|
||||||
and a.status = 4
|
and a.status = 4
|
||||||
</if>
|
</if>
|
||||||
|
<if test="param.search != null and param.search != ''">
|
||||||
|
and (
|
||||||
|
a.region_name like concat('%',#{param.search},'%')
|
||||||
|
or a.danger_item_content like concat('%',#{param.search},'%')
|
||||||
|
or a.danger_desc like concat('%',#{param.search},'%')
|
||||||
|
or a.remark like concat('%',#{param.search},'%')
|
||||||
|
)
|
||||||
|
</if>
|
||||||
order by a.inspect_time desc
|
order by a.inspect_time desc
|
||||||
</select>
|
</select>
|
||||||
<select id="selectQualityInspectionRecordPageTotal"
|
<select id="selectQualityInspectionRecordPageTotal"
|
||||||
@ -204,6 +212,14 @@
|
|||||||
<if test="regionId != null and regionId != ''">
|
<if test="regionId != null and regionId != ''">
|
||||||
and a.region_id = #{regionId}
|
and a.region_id = #{regionId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="search != null and search != ''">
|
||||||
|
and (
|
||||||
|
a.region_name like concat('%',#{search},'%')
|
||||||
|
or a.danger_item_content like concat('%',#{search},'%')
|
||||||
|
or a.danger_desc like concat('%',#{search},'%')
|
||||||
|
or a.remark like concat('%',#{search},'%')
|
||||||
|
)
|
||||||
|
</if>
|
||||||
) tp
|
) tp
|
||||||
</select>
|
</select>
|
||||||
<select id="selectQualityInspectionRecordCountByDay" resultType="java.util.Map" parameterType="java.util.Map">
|
<select id="selectQualityInspectionRecordCountByDay" resultType="java.util.Map" parameterType="java.util.Map">
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package com.zhgd.xmgl.task;
|
|||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.io.FileUtil;
|
||||||
import cn.hutool.core.util.RandomUtil;
|
import cn.hutool.core.util.RandomUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.hutool.http.HttpRequest;
|
import cn.hutool.http.HttpRequest;
|
||||||
@ -30,6 +31,7 @@ import net.javacrumbs.shedlock.core.SchedulerLock;
|
|||||||
import org.apache.commons.codec.binary.Hex;
|
import org.apache.commons.codec.binary.Hex;
|
||||||
import org.apache.commons.collections.MapUtils;
|
import org.apache.commons.collections.MapUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.scheduling.annotation.Scheduled;
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
@ -38,6 +40,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
import javax.crypto.Mac;
|
import javax.crypto.Mac;
|
||||||
import javax.crypto.SecretKey;
|
import javax.crypto.SecretKey;
|
||||||
import javax.crypto.spec.SecretKeySpec;
|
import javax.crypto.spec.SecretKeySpec;
|
||||||
|
import java.io.File;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.security.InvalidKeyException;
|
import java.security.InvalidKeyException;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.NoSuchAlgorithmException;
|
||||||
@ -55,6 +58,8 @@ import static com.zhgd.xmgl.util.EncryptUtils.decryptAes;
|
|||||||
@RequestMapping("/xmgl/jzg")
|
@RequestMapping("/xmgl/jzg")
|
||||||
@RestController
|
@RestController
|
||||||
public class JzgTask {
|
public class JzgTask {
|
||||||
|
@Value("${basePath}")
|
||||||
|
private String path;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ProjectEnterpriseMapper projectEnterpriseMapper;
|
private ProjectEnterpriseMapper projectEnterpriseMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
@ -98,7 +103,7 @@ public class JzgTask {
|
|||||||
* 实名制同步
|
* 实名制同步
|
||||||
*/
|
*/
|
||||||
@SchedulerLock(name = "realNameSystem", lockAtMostFor = 1000 * 60 * 60, lockAtLeastFor = 1000 * 60 * 5)
|
@SchedulerLock(name = "realNameSystem", lockAtMostFor = 1000 * 60 * 60, lockAtLeastFor = 1000 * 60 * 5)
|
||||||
@Scheduled(cron = "0 0 0/12 * * ?")
|
@Scheduled(cron = "0 0 0/1 * * ?")
|
||||||
@RequestMapping("/sync")
|
@RequestMapping("/sync")
|
||||||
public void realNameSystem() {
|
public void realNameSystem() {
|
||||||
List<Project> projects = projectMapper.selectList(null);
|
List<Project> projects = projectMapper.selectList(null);
|
||||||
@ -270,15 +275,31 @@ public class JzgTask {
|
|||||||
wi.setSex(Integer.valueOf(jzg.getGender()));
|
wi.setSex(Integer.valueOf(jzg.getGender()));
|
||||||
wi.setNation(getNation(jzg.getNation()));
|
wi.setNation(getNation(jzg.getNation()));
|
||||||
if (StrUtil.isNotBlank(jzg.getIssueCardPicUrl())) {
|
if (StrUtil.isNotBlank(jzg.getIssueCardPicUrl())) {
|
||||||
|
String file = owi.getFieldAcquisitionUrl();
|
||||||
|
if (StrUtil.isNotBlank(file)) {
|
||||||
|
FileUtil.del(new File(path, file));
|
||||||
|
}
|
||||||
wi.setFieldAcquisitionUrl(uploadFileService.uploadUrlResourceRtName(jzg.getIssueCardPicUrl()));
|
wi.setFieldAcquisitionUrl(uploadFileService.uploadUrlResourceRtName(jzg.getIssueCardPicUrl()));
|
||||||
}
|
}
|
||||||
if (StrUtil.isNotBlank(jzg.getHeadImageUrl())) {
|
if (StrUtil.isNotBlank(jzg.getHeadImageUrl())) {
|
||||||
|
String file = owi.getIdCardBigPhotoUrl();
|
||||||
|
if (StrUtil.isNotBlank(file)) {
|
||||||
|
FileUtil.del(new File(path, file));
|
||||||
|
}
|
||||||
wi.setIdCardBigPhotoUrl(uploadFileService.uploadUrlResourceRtName(jzg.getHeadImageUrl()));
|
wi.setIdCardBigPhotoUrl(uploadFileService.uploadUrlResourceRtName(jzg.getHeadImageUrl()));
|
||||||
}
|
}
|
||||||
if (StrUtil.isNotBlank(jzg.getPositiveIdCardImageUrl())) {
|
if (StrUtil.isNotBlank(jzg.getPositiveIdCardImageUrl())) {
|
||||||
|
String file = owi.getIdCardUpPhotoUrl();
|
||||||
|
if (StrUtil.isNotBlank(file)) {
|
||||||
|
FileUtil.del(new File(path, file));
|
||||||
|
}
|
||||||
wi.setIdCardUpPhotoUrl(uploadFileService.uploadUrlResourceRtName(jzg.getPositiveIdCardImageUrl()));
|
wi.setIdCardUpPhotoUrl(uploadFileService.uploadUrlResourceRtName(jzg.getPositiveIdCardImageUrl()));
|
||||||
}
|
}
|
||||||
if (StrUtil.isNotBlank(jzg.getNegativeIdCardImageUrl())) {
|
if (StrUtil.isNotBlank(jzg.getNegativeIdCardImageUrl())) {
|
||||||
|
String file = owi.getIdCardDownPhotoUrl();
|
||||||
|
if (StrUtil.isNotBlank(file)) {
|
||||||
|
FileUtil.del(new File(path, file));
|
||||||
|
}
|
||||||
wi.setIdCardDownPhotoUrl(uploadFileService.uploadUrlResourceRtName(jzg.getNegativeIdCardImageUrl()));
|
wi.setIdCardDownPhotoUrl(uploadFileService.uploadUrlResourceRtName(jzg.getNegativeIdCardImageUrl()));
|
||||||
}
|
}
|
||||||
wi.setPhoneNumber(jzg.getCellPhone());
|
wi.setPhoneNumber(jzg.getCellPhone());
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user