接口修改

main
dongdingding 9 months ago
parent d2aa94a286
commit ea73448d84

@ -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.ASafeXcrw; import com.mudu.entity.ASafeXcrw;
import org.apache.ibatis.annotations.Select;
/** /**
* (ASafeXcrw)访 * (ASafeXcrw)访
@ -11,5 +12,12 @@ import com.mudu.entity.ASafeXcrw;
*/ */
public interface ASafeXcrwMapper extends BaseMapper<ASafeXcrw> { public interface ASafeXcrwMapper extends BaseMapper<ASafeXcrw> {
/**
* 2
*/
@Select("select count(*) from a_safe_xcrw where rksj BETWEEN DATE_SUB( CURDATE(), INTERVAL 2 MONTH ) AND CURDATE()")
Integer xcrwNum();
} }

@ -2,6 +2,8 @@ package com.mudu.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mudu.entity.ASafeZcrw; import com.mudu.entity.ASafeZcrw;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;
/** /**
* (ASafeZcrw)访 * (ASafeZcrw)访
@ -11,5 +13,13 @@ import com.mudu.entity.ASafeZcrw;
*/ */
public interface ASafeZcrwMapper extends BaseMapper<ASafeZcrw> { public interface ASafeZcrwMapper extends BaseMapper<ASafeZcrw> {
/**
* 1
*/
@Select("select count(*) from a_safe_zcrw where rksj BETWEEN DATE_SUB( CURDATE(), INTERVAL 1 MONTH ) AND CURDATE() ")
Integer zcrwNum();
} }

@ -114,10 +114,11 @@ public class AcheckTaskQuartz {
// @PostMapping("/insert") // @PostMapping("/insert")
// @ApiOperation(value = "新增创建时间为昨天且处于审批通过的工单数据") // @ApiOperation(value = "新增创建时间为昨天且处于审批通过的工单数据")
public AjaxResult selectAll() throws ParseException { public AjaxResult selectAll() throws ParseException {
// todo 查询巡查任务主表2月是否有记录就不推
// todo 查询巡查任务主表本月是否有记录就不推 Integer xcrwNum = aSafeXcrwService.xcrwNum();
if (xcrwNum > 0) {
// todo 查询自查任务主表本月是否有记录 有就不推 throw new IllegalArgumentException("已存在数据");
}
//巡查任务周期id //巡查任务周期id
RwzqUuidResponse rwzqUuidResponse = aSafeRwzqService.getXcUuid(); RwzqUuidResponse rwzqUuidResponse = aSafeRwzqService.getXcUuid();
String rwzqUuid = rwzqUuidResponse.getXxbh(); String rwzqUuid = rwzqUuidResponse.getXxbh();
@ -359,7 +360,8 @@ public class AcheckTaskQuartz {
//任务编号对应a_safe_xcrw的信息编号 //任务编号对应a_safe_xcrw的信息编号
aSafeXcrwjcx.setRwbh(xcrwuuid); aSafeXcrwjcx.setRwbh(xcrwuuid);
//企业风险点编号 对应a_safe_fxd的信息编号 //企业风险点编号 对应a_safe_fxd的信息编号
aSafeXcrwjcx.setQyfxdbh(b.getCheckId()); //todo
aSafeXcrwjcx.setQyfxdbh(b.getFxdxxbh());
//周期编号 //周期编号
aSafeXcrwjcx.setZqbh(rwzqUuid); aSafeXcrwjcx.setZqbh(rwzqUuid);
//完成状态 //完成状态
@ -403,11 +405,11 @@ public class AcheckTaskQuartz {
//复查信息 //复查信息
aSafeXcrwjcx.setFcxx(b.getReviewContent()); aSafeXcrwjcx.setFcxx(b.getReviewContent());
//位置编号 //位置编号
aSafeXcrwjcx.setWzbh(b.getWzxxbh()); aSafeXcrwjcx.setWzbh(xcrwuuid);
//巡查位置编号 //巡查位置编号
aSafeXcrwjcx.setXcwzbh(xcrwwzUuid); aSafeXcrwjcx.setXcwzbh(xcrwwzUuid);
//巡查风险点编号 //巡查风险点编号
aSafeXcrwjcx.setXcfxdbh(yhzgxxUuid); aSafeXcrwjcx.setXcfxdbh(b.getFxdxxbh());
//任务类型 //任务类型
aSafeXcrwjcx.setRwlx(3); aSafeXcrwjcx.setRwlx(3);
//入库人员 //入库人员
@ -573,6 +575,11 @@ public class AcheckTaskQuartz {
// @PostMapping("/zicha") // @PostMapping("/zicha")
// @ApiOperation(value = "自查") // @ApiOperation(value = "自查")
public AjaxResult zicha() throws ParseException { public AjaxResult zicha() throws ParseException {
// todo 查询自查任务主表本月是否有记录 有就不推
Integer zcrwNum = aSafeZcrwService.zcrwNum();
if (zcrwNum > 0) {
throw new IllegalArgumentException("已存在数据");
}
//自己查任务周期id //自己查任务周期id
RwzqUuidResponse rwzqUuidResponse = aSafeRwzqService.getZcUuid(); RwzqUuidResponse rwzqUuidResponse = aSafeRwzqService.getZcUuid();
String rwzqUuid = rwzqUuidResponse.getXxbh(); String rwzqUuid = rwzqUuidResponse.getXxbh();
@ -877,7 +884,7 @@ public class AcheckTaskQuartz {
//任务编号 //任务编号
aSafeYhzgxx.setRwbh(zcrwUuid); aSafeYhzgxx.setRwbh(zcrwUuid);
//位置编号 //位置编号
// aSafeYhzgxx.setWzbh(); aSafeYhzgxx.setWzbh(b.getWzbh());
//企业编号 //企业编号
aSafeYhzgxx.setQybh(b.getEnterpriseID()); aSafeYhzgxx.setQybh(b.getEnterpriseID());
//周期编号 //周期编号
@ -895,7 +902,7 @@ public class AcheckTaskQuartz {
//是否展示 //是否展示
aSafeYhzgxx.setSfzs(1); aSafeYhzgxx.setSfzs(1);
//巡查位置编号 //巡查位置编号
// aSafeYhzgxx.setXcwzbh(xcrwwzUuid); aSafeYhzgxx.setXcwzbh(xcrwwzUuid);
//复查是否合格 //复查是否合格
aSafeYhzgxx.setFcsfhg(1); aSafeYhzgxx.setFcsfhg(1);
//隐患描述 //隐患描述

@ -11,5 +11,12 @@ import com.mudu.entity.ASafeXcrw;
*/ */
public interface ASafeXcrwService extends IService<ASafeXcrw> { public interface ASafeXcrwService extends IService<ASafeXcrw> {
/**
* 2
*/
Integer xcrwNum();
} }

@ -11,5 +11,11 @@ import com.mudu.entity.ASafeZcrw;
*/ */
public interface ASafeZcrwService extends IService<ASafeZcrw> { public interface ASafeZcrwService extends IService<ASafeZcrw> {
/**
* 1
*/
Integer zcrwNum();
} }

@ -6,6 +6,8 @@ import com.mudu.entity.ASafeXcrw;
import com.mudu.service.ASafeXcrwService; import com.mudu.service.ASafeXcrwService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/** /**
* (ASafeXcrw) * (ASafeXcrw)
* *
@ -15,5 +17,11 @@ import org.springframework.stereotype.Service;
@Service("aSafeXcrwService") @Service("aSafeXcrwService")
public class ASafeXcrwServiceImpl extends ServiceImpl<ASafeXcrwMapper, ASafeXcrw> implements ASafeXcrwService { public class ASafeXcrwServiceImpl extends ServiceImpl<ASafeXcrwMapper, ASafeXcrw> implements ASafeXcrwService {
@Resource
private ASafeXcrwMapper aSafeXcrwMapper;
@Override
public Integer xcrwNum() {
return aSafeXcrwMapper.xcrwNum();
}
} }

@ -1,11 +1,13 @@
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.mapper.ASafeZcrwMapper;
import com.mudu.entity.ASafeZcrw; import com.mudu.entity.ASafeZcrw;
import com.mudu.mapper.ASafeZcrwMapper;
import com.mudu.service.ASafeZcrwService; import com.mudu.service.ASafeZcrwService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/** /**
* (ASafeZcrw) * (ASafeZcrw)
* *
@ -15,5 +17,12 @@ import org.springframework.stereotype.Service;
@Service("aSafeZcrwService") @Service("aSafeZcrwService")
public class ASafeZcrwServiceImpl extends ServiceImpl<ASafeZcrwMapper, ASafeZcrw> implements ASafeZcrwService { public class ASafeZcrwServiceImpl extends ServiceImpl<ASafeZcrwMapper, ASafeZcrw> implements ASafeZcrwService {
@Resource
private ASafeZcrwMapper aSafeZcrwMapper;
@Override
public Integer zcrwNum() {
return aSafeZcrwMapper.zcrwNum();
}
} }

Loading…
Cancel
Save