|
|
@ -5,41 +5,22 @@ import cn.hutool.core.util.StrUtil;
|
|
|
|
import cn.hutool.http.HttpRequest;
|
|
|
|
import cn.hutool.http.HttpRequest;
|
|
|
|
import com.alibaba.fastjson2.JSON;
|
|
|
|
import com.alibaba.fastjson2.JSON;
|
|
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
|
|
import com.mudu.entity.ACheckQuatzEntity;
|
|
|
|
import com.mudu.entity.*;
|
|
|
|
import com.mudu.entity.ACheckQuatzZichaEntity;
|
|
|
|
|
|
|
|
import com.mudu.entity.ASafeQyjcxx;
|
|
|
|
|
|
|
|
import com.mudu.entity.ASafeRwfj;
|
|
|
|
|
|
|
|
import com.mudu.entity.ASafeRwzq;
|
|
|
|
|
|
|
|
import com.mudu.entity.ASafeXcrw;
|
|
|
|
|
|
|
|
import com.mudu.entity.ASafeXcrwjcx;
|
|
|
|
|
|
|
|
import com.mudu.entity.ASafeXcrwjcxzgxx;
|
|
|
|
|
|
|
|
import com.mudu.entity.ASafeXcrwwz;
|
|
|
|
|
|
|
|
import com.mudu.entity.ASafeYhzgxx;
|
|
|
|
|
|
|
|
import com.mudu.entity.ASafeZcrw;
|
|
|
|
|
|
|
|
import com.mudu.entity.ASafeZcrwjl;
|
|
|
|
|
|
|
|
import com.mudu.entity.ASafeZcrwwz;
|
|
|
|
|
|
|
|
import com.mudu.entity.SzsASafeZcyhxx;
|
|
|
|
|
|
|
|
import com.mudu.entity.dto.request.ACheckQuatzRequest;
|
|
|
|
import com.mudu.entity.dto.request.ACheckQuatzRequest;
|
|
|
|
import com.mudu.entity.dto.request.ACheckQuatzZichaRequest;
|
|
|
|
import com.mudu.entity.dto.request.ACheckQuatzZichaRequest;
|
|
|
|
import com.mudu.entity.dto.response.ACheckXcTpResponse;
|
|
|
|
import com.mudu.entity.dto.response.ACheckXcTpResponse;
|
|
|
|
import com.mudu.entity.dto.response.RwzqUuidResponse;
|
|
|
|
import com.mudu.entity.dto.response.RwzqUuidResponse;
|
|
|
|
import com.mudu.service.ASafeQyjcxxService;
|
|
|
|
import com.mudu.service.*;
|
|
|
|
import com.mudu.service.ASafeRwfjService;
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
import com.mudu.service.ASafeRwzqService;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
import com.mudu.service.ASafeXcrwService;
|
|
|
|
|
|
|
|
import com.mudu.service.ASafeXcrwjcxService;
|
|
|
|
|
|
|
|
import com.mudu.service.ASafeXcrwjcxzgxxService;
|
|
|
|
|
|
|
|
import com.mudu.service.ASafeXcrwwzService;
|
|
|
|
|
|
|
|
import com.mudu.service.ASafeYhzgxxService;
|
|
|
|
|
|
|
|
import com.mudu.service.ASafeZcrwService;
|
|
|
|
|
|
|
|
import com.mudu.service.ASafeZcrwjlService;
|
|
|
|
|
|
|
|
import com.mudu.service.ASafeZcrwwzService;
|
|
|
|
|
|
|
|
import com.mudu.service.SzsASafeZcyhxxService;
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
|
|
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
import java.text.ParseException;
|
|
|
|
import java.text.ParseException;
|
|
|
@ -136,8 +117,8 @@ public class AcheckTaskQuartz {
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @Param qymc 企业名称
|
|
|
|
* @Param qymc 企业名称
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
// @Scheduled(cron = "0 0 4 * * ? ")
|
|
|
|
@Scheduled(cron = "0 0 4 * * ? ")
|
|
|
|
@Scheduled(cron = "0 0/5 * * * ?")
|
|
|
|
// @Scheduled(cron = "0 0/5 * * * ?")
|
|
|
|
// @PostMapping("/insert")
|
|
|
|
// @PostMapping("/insert")
|
|
|
|
// @ApiOperation(value = "新增创建时间为昨天且处于审批通过的工单数据")
|
|
|
|
// @ApiOperation(value = "新增创建时间为昨天且处于审批通过的工单数据")
|
|
|
|
public void selectAll() throws ParseException {
|
|
|
|
public void selectAll() throws ParseException {
|
|
|
@ -165,10 +146,13 @@ public class AcheckTaskQuartz {
|
|
|
|
String enterPriseId = aSafeQyjcxx.getXxbh();
|
|
|
|
String enterPriseId = aSafeQyjcxx.getXxbh();
|
|
|
|
// todo 来自新表查询 根据企业xxbh 以及周期编号
|
|
|
|
// todo 来自新表查询 根据企业xxbh 以及周期编号
|
|
|
|
JSONObject xcjsonObject = new JSONObject();
|
|
|
|
JSONObject xcjsonObject = new JSONObject();
|
|
|
|
xcjsonObject.put("xxbh", aSafeQyjcxx.getXxbh());
|
|
|
|
xcjsonObject.put("qybh", aSafeQyjcxx.getXxbh());
|
|
|
|
xcjsonObject.put("zqbh", rwzqUuid);
|
|
|
|
xcjsonObject.put("zqbh", rwzqUuid);
|
|
|
|
String xcresponse = HttpRequest.post(xczqUrl).contentType("application/x-www-form-urlencoded;charset=UTF-8").body(xcjsonObject.toJSONString()).execute().body();
|
|
|
|
String xcresponse = HttpRequest.post(xczqUrl).contentType("application/x-www-form-urlencoded;charset=UTF-8").body(xcjsonObject.toJSONString()).execute().body();
|
|
|
|
JSONObject xcjsonResponse = JSON.parseObject(xcresponse);
|
|
|
|
JSONObject xcjsonResponse = JSON.parseObject(xcresponse);
|
|
|
|
|
|
|
|
if (xcjsonResponse.getString("msg") == null) {
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
}
|
|
|
|
String xcrwuuid = xcjsonResponse.getString("msg");
|
|
|
|
String xcrwuuid = xcjsonResponse.getString("msg");
|
|
|
|
|
|
|
|
|
|
|
|
//根据工单获取数据
|
|
|
|
//根据工单获取数据
|
|
|
@ -601,8 +585,8 @@ public class AcheckTaskQuartz {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// @Scheduled(cron = "0 0 4 * * ? ")
|
|
|
|
@Scheduled(cron = "0 0 4 * * ? ")
|
|
|
|
@Scheduled(cron = "0 0/5 * * * ?")
|
|
|
|
// @Scheduled(cron = "0 0/5 * * * ?")
|
|
|
|
//@Scheduled(cron = "0 58 18 * * ?")
|
|
|
|
//@Scheduled(cron = "0 58 18 * * ?")
|
|
|
|
// @PostMapping("/zicha")
|
|
|
|
// @PostMapping("/zicha")
|
|
|
|
// @ApiOperation(value = "自查")
|
|
|
|
// @ApiOperation(value = "自查")
|
|
|
@ -627,10 +611,13 @@ public class AcheckTaskQuartz {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for (ACheckQuatzZichaRequest a : list) {
|
|
|
|
for (ACheckQuatzZichaRequest a : list) {
|
|
|
|
JSONObject zcjsonObject = new JSONObject();
|
|
|
|
JSONObject zcjsonObject = new JSONObject();
|
|
|
|
zcjsonObject.put("xxbh", a.getEnterpriseID());
|
|
|
|
zcjsonObject.put("qybh", a.getEnterpriseID());
|
|
|
|
zcjsonObject.put("zqbh", rwzqUuid);
|
|
|
|
zcjsonObject.put("zqbh", rwzqUuid);
|
|
|
|
String zcresponse = HttpRequest.post(zczqUrl).contentType("application/x-www-form-urlencoded;charset=UTF-8").body(zcjsonObject.toJSONString()).execute().body();
|
|
|
|
String zcresponse = HttpRequest.post(zczqUrl).contentType("application/x-www-form-urlencoded;charset=UTF-8").body(zcjsonObject.toJSONString()).execute().body();
|
|
|
|
JSONObject zcjsonResponse = JSON.parseObject(zcresponse);
|
|
|
|
JSONObject zcjsonResponse = JSON.parseObject(zcresponse);
|
|
|
|
|
|
|
|
if (zcjsonResponse.getString("msg") == null) {
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
}
|
|
|
|
String zcrwUuid = zcjsonResponse.getString("msg");
|
|
|
|
String zcrwUuid = zcjsonResponse.getString("msg");
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|