任务周期修改

main
dongdingding 9 months ago
parent 03bde76124
commit 5abf9f5aac

@ -0,0 +1,20 @@
package com.mudu.entity.dto.response;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author dong
* @since 2024/5/22 17:07
*/
@Data
@ApiModel("巡查任务检查项xxbh")
public class RwzqUuidResponse {
/**
* xxbh
*/
@ApiModelProperty("xxbh")
private String xxbh;
}

@ -2,6 +2,7 @@ package com.mudu.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mudu.entity.ASafeRwzq; import com.mudu.entity.ASafeRwzq;
import com.mudu.entity.dto.response.RwzqUuidResponse;
/** /**
* (ASafeRwzq)访 * (ASafeRwzq)访
@ -10,6 +11,20 @@ import com.mudu.entity.ASafeRwzq;
* @since 2024-03-18 16:58:08 * @since 2024-03-18 16:58:08
*/ */
public interface ASafeRwzqMapper extends BaseMapper<ASafeRwzq> { public interface ASafeRwzqMapper extends BaseMapper<ASafeRwzq> {
/**
* id
*
* @return
*/
RwzqUuidResponse getXcUuid();
/**
* id
*
* @return
*/
RwzqUuidResponse getZcUuid();
} }

@ -10,6 +10,7 @@ import com.mudu.entity.*;
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.service.*; import com.mudu.service.*;
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;
@ -113,6 +114,9 @@ public class AcheckTaskQuartz {
// @PostMapping("/insert") // @PostMapping("/insert")
// @ApiOperation(value = "新增创建时间为昨天且处于审批通过的工单数据") // @ApiOperation(value = "新增创建时间为昨天且处于审批通过的工单数据")
public AjaxResult selectAll() throws ParseException { public AjaxResult selectAll() throws ParseException {
//巡查任务周期id
RwzqUuidResponse rwzqUuidResponse=aSafeRwzqService.getXcUuid();
String rwzqUuid=rwzqUuidResponse.getXxbh();
String responseList = HttpRequest.post(imUrl).contentType("application/x-www-form-urlencoded;charset=UTF-8").execute().body(); String responseList = HttpRequest.post(imUrl).contentType("application/x-www-form-urlencoded;charset=UTF-8").execute().body();
JSONObject jsonResponseList = JSON.parseObject(responseList); JSONObject jsonResponseList = JSON.parseObject(responseList);
String dataList = jsonResponseList.getString("data"); String dataList = jsonResponseList.getString("data");
@ -124,9 +128,7 @@ public class AcheckTaskQuartz {
return null; return null;
} }
for (ACheckQuatzRequest a : list) { for (ACheckQuatzRequest a : list) {
String rwzqUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
String xcrwuuid = UUID.randomUUID().toString().replace("-", "").toLowerCase(); String xcrwuuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
//获取企业编号 //获取企业编号
ASafeQyjcxx aSafeQyjcxx = aSafeQyjcxxService.findOneByqymcOrXybm(a.getName(), a.getEntCode()); ASafeQyjcxx aSafeQyjcxx = aSafeQyjcxxService.findOneByqymcOrXybm(a.getName(), a.getEntCode());
String enterPriseId = aSafeQyjcxx.getXxbh(); String enterPriseId = aSafeQyjcxx.getXxbh();
@ -162,10 +164,10 @@ public class AcheckTaskQuartz {
svaeZghTp(zgh, xcrwuuid, xxsx); svaeZghTp(zgh, xcrwuuid, xxsx);
} }
/** // /**
*a_safe_rwzq // *新增任务周期a_safe_rwzq
*/ // */
saveRwzq(a, rwzqUuid); // saveRwzq(a, rwzqUuid);
/** /**
* a_safe_xcrw * a_safe_xcrw
*/ */
@ -343,7 +345,7 @@ public class AcheckTaskQuartz {
* @param xcrwuuid id * @param xcrwuuid id
* @param rwzqUuid id * @param rwzqUuid id
*/ */
private void saveXcrwJcx(ACheckQuatzEntity b, String xcrwwzUuid, String yhzgxxUuid, String xcrwjcxUuid, String enterPriseId, String xcrwuuid, String rwzqUuid) { private void saveXcrwJcx(ACheckQuatzEntity b, String xcrwjcxUuid, String yhzgxxUuid, String xcrwwzUuid, String enterPriseId, String xcrwuuid, String rwzqUuid) {
ASafeXcrwjcx aSafeXcrwjcx = new ASafeXcrwjcx(); ASafeXcrwjcx aSafeXcrwjcx = new ASafeXcrwjcx();
//信息编号 //信息编号
aSafeXcrwjcx.setXxbh(xcrwjcxUuid); aSafeXcrwjcx.setXxbh(xcrwjcxUuid);
@ -566,6 +568,9 @@ public class AcheckTaskQuartz {
// @PostMapping("/zicha") // @PostMapping("/zicha")
// @ApiOperation(value = "自查") // @ApiOperation(value = "自查")
public AjaxResult zicha() throws ParseException { public AjaxResult zicha() throws ParseException {
//自己查任务周期id
RwzqUuidResponse rwzqUuidResponse=aSafeRwzqService.getZcUuid();
String rwzqUuid=rwzqUuidResponse.getXxbh();
String responseList = HttpRequest.post(zcXxUrl).contentType("application/x-www-form-urlencoded;charset=UTF-8").execute().body(); String responseList = HttpRequest.post(zcXxUrl).contentType("application/x-www-form-urlencoded;charset=UTF-8").execute().body();
JSONObject jsonResponseList = JSON.parseObject(responseList); JSONObject jsonResponseList = JSON.parseObject(responseList);
String dataList = jsonResponseList.getString("data"); String dataList = jsonResponseList.getString("data");
@ -577,7 +582,6 @@ public class AcheckTaskQuartz {
return null; return null;
} }
for (ACheckQuatzZichaRequest a : list) { for (ACheckQuatzZichaRequest a : list) {
String rwzqUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
String zcrwUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase(); String zcrwUuid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
/** /**
*a_safe_rwzq *a_safe_rwzq

@ -2,6 +2,7 @@ package com.mudu.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.mudu.entity.ASafeRwzq; import com.mudu.entity.ASafeRwzq;
import com.mudu.entity.dto.response.RwzqUuidResponse;
/** /**
* (ASafeRwzq) * (ASafeRwzq)
@ -11,5 +12,22 @@ import com.mudu.entity.ASafeRwzq;
*/ */
public interface ASafeRwzqService extends IService<ASafeRwzq> { public interface ASafeRwzqService extends IService<ASafeRwzq> {
/**
* id
*
* @return
*/
RwzqUuidResponse getXcUuid();
/**
* id
*
* @return
*/
RwzqUuidResponse getZcUuid();
} }

@ -1,11 +1,14 @@
package com.mudu.service.impl; package com.mudu.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mudu.entity.dto.response.RwzqUuidResponse;
import com.mudu.mapper.ASafeRwzqMapper; import com.mudu.mapper.ASafeRwzqMapper;
import com.mudu.entity.ASafeRwzq; import com.mudu.entity.ASafeRwzq;
import com.mudu.service.ASafeRwzqService; import com.mudu.service.ASafeRwzqService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/** /**
* (ASafeRwzq) * (ASafeRwzq)
* *
@ -15,5 +18,16 @@ import org.springframework.stereotype.Service;
@Service("aSafeRwzqService") @Service("aSafeRwzqService")
public class ASafeRwzqServiceImpl extends ServiceImpl<ASafeRwzqMapper, ASafeRwzq> implements ASafeRwzqService { public class ASafeRwzqServiceImpl extends ServiceImpl<ASafeRwzqMapper, ASafeRwzq> implements ASafeRwzqService {
@Resource
private ASafeRwzqMapper aSafeRwzqMapper;
@Override
public RwzqUuidResponse getXcUuid() {
return aSafeRwzqMapper.getXcUuid();
}
@Override
public RwzqUuidResponse getZcUuid() {
return aSafeRwzqMapper.getZcUuid();
}
} }

@ -0,0 +1,21 @@
<?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.mudu.mapper.ASafeRwzqMapper">
<select id="getXcUuid" resultType="com.mudu.entity.dto.response.RwzqUuidResponse">
SELECT xxbh
FROM `a_safe_rwzq`
where RWLX = 'WGXC'
ORDER BY ZQJSSJ desc limit 1
</select>
<select id="getZcUuid" resultType="com.mudu.entity.dto.response.RwzqUuidResponse">
SELECT xxbh
FROM `a_safe_rwzq`
where RWLX = 'QYZC'
ORDER BY ZQJSSJ desc limit 1
</select>
</mapper>
Loading…
Cancel
Save