Merge branch 'develop_master' of http://gitlab.91isoft.com:90/LiuChao/foton-slrs-system-rest into develop_master

This commit is contained in:
zhangyanduan
2022-06-27 14:57:22 +08:00
11 changed files with 70 additions and 11 deletions
@@ -6,7 +6,6 @@ import com.adc.da.scheduled.dao.SarStandardItemDao;
import com.adc.da.scheduled.dao.SarStandardWarningDao; import com.adc.da.scheduled.dao.SarStandardWarningDao;
import com.adc.da.scheduled.entity.TermDTO; import com.adc.da.scheduled.entity.TermDTO;
import com.adc.da.slrs.ActivityDatas.entity.DataList;
import com.adc.da.slrs.processModel.utils.TrainFormDate; import com.adc.da.slrs.processModel.utils.TrainFormDate;
import com.adc.da.slrs.sarStandAttrInfo.dao.SarStandAttrInfoDao; import com.adc.da.slrs.sarStandAttrInfo.dao.SarStandAttrInfoDao;
import com.adc.da.slrs.sarStandAttrInfo.entity.SarStandAttrInfo; import com.adc.da.slrs.sarStandAttrInfo.entity.SarStandAttrInfo;
@@ -22,8 +21,6 @@ import com.adc.da.sys.service.IDicTypeEOService;
import com.adc.da.util.UUIDUtils; import com.adc.da.util.UUIDUtils;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.sf.json.JSONObject; import net.sf.json.JSONObject;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
@@ -35,17 +32,12 @@ import org.springframework.scheduling.annotation.Async;
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.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.PostConstruct;
import java.lang.reflect.InvocationTargetException;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.LocalDate; import java.time.LocalDate;
import java.util.*; import java.util.*;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import java.util.stream.Collectors;
@EnableScheduling @EnableScheduling
@@ -133,6 +125,13 @@ public class ScheduledJob {
logger.info("========================================================================================================"); logger.info("========================================================================================================");
//删除不在预警范围的标准 //删除不在预警范围的标准
int remove = sarStandardWarningDao.autoCancelWarning(); int remove = sarStandardWarningDao.autoCancelWarning();
log.info("开始修整"+new Date()+"!");
try {
Thread.sleep(20000);
} catch (InterruptedException e) {
e.printStackTrace();
}
log.info("结束修整"+new Date()+"!");
logger.info("取消" + remove + "条预警"); logger.info("取消" + remove + "条预警");
//预警期限(当前日期至3个月后) //预警期限(当前日期至3个月后)
@@ -95,4 +95,8 @@ public class StandWarningEO extends EarlyWarningEO {
@ApiModelProperty("范围查询发布日期结束") @ApiModelProperty("范围查询发布日期结束")
@DateTimeFormat(pattern = "YYYY-MM-dd") @DateTimeFormat(pattern = "YYYY-MM-dd")
private String endIssueTime; private String endIssueTime;
@ExcelIgnore
@ApiModelProperty("stand标准 item条款")
private String mark;
} }
@@ -15,8 +15,11 @@ import com.adc.da.slrs.wgCommittee.entity.WgCommittee;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import com.adc.da.base.web.BaseController; import com.adc.da.base.web.BaseController;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@@ -43,6 +46,7 @@ public class WgCommitteeController extends BaseController<WgCommittee> {
@PostMapping("/insert") @PostMapping("/insert")
public ResponseMessage addWorkCommitter(WgCommittee wgCommittee) { public ResponseMessage addWorkCommitter(WgCommittee wgCommittee) {
wgCommittee.setCreateTime(new Date());
if (isDistinct(wgCommittee.getCommitteeName(),null)){ if (isDistinct(wgCommittee.getCommitteeName(),null)){
if (iWgCommitteeService.add(wgCommittee)){ if (iWgCommitteeService.add(wgCommittee)){
return Result.success("200","新增成功"); return Result.success("200","新增成功");
@@ -9,6 +9,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import java.util.Date;
import java.util.List; import java.util.List;
/** /**
@@ -45,6 +46,9 @@ public class WgCommittee extends BasePage {
@ApiModelProperty(value = "委员关联表") @ApiModelProperty(value = "委员关联表")
private String committeer; private String committeer;
@ApiModelProperty(value = "创建时间")
private Date createTime;
@ApiModelProperty(value = "委员") @ApiModelProperty(value = "委员")
@TableField(exist = false) @TableField(exist = false)
private String committeeIds; private String committeeIds;
@@ -209,7 +209,12 @@
LEFT JOIN sar_stand_attr_info AS attr on attr.STAND_ID=warning.STAND_ID LEFT JOIN sar_stand_attr_info AS attr on attr.STAND_ID=warning.STAND_ID
<where> <where>
POWER = '1' POWER = '1'
AND (MARK = 'stand') <if test="waringEO.mark != null and waringEO.mark != ''">
AND (MARK = #{mark})
</if>
<if test="waringEO.mark == null or waringEO.mark == ''">
AND (MARK = 'stand')
</if>
AND sarInfo.VALID_FLAG='0' AND sarInfo.VALID_FLAG='0'
<include refid="stand_where"/> <include refid="stand_where"/>
<if test="waringEO.applyType != null and waringEO.applyType != ''">AND attr.CLLX LIKE CONCAT('%', <if test="waringEO.applyType != null and waringEO.applyType != ''">AND attr.CLLX LIKE CONCAT('%',
@@ -255,7 +260,12 @@
LEFT JOIN sar_stand_items AS items ON items.ID = warning.ITEM_ID LEFT JOIN sar_stand_items AS items ON items.ID = warning.ITEM_ID
<where> <where>
POWER = '1' POWER = '1'
AND (MARK = 'item') <if test="waringEO.mark != null and waringEO.mark != ''">
AND (MARK = #{mark})
</if>
<if test="waringEO.mark == null or waringEO.mark == ''">
AND (MARK = 'item')
</if>
AND sarInfo.VALID_FLAG='0' AND sarInfo.VALID_FLAG='0'
<include refid="stand_where"/> <include refid="stand_where"/>
<if test="waringEO.applyType != null and waringEO.applyType != ''"> <if test="waringEO.applyType != null and waringEO.applyType != ''">
@@ -16,6 +16,7 @@
<if test="committeeName != null and ''!=committeeName"> <if test="committeeName != null and ''!=committeeName">
and wg_committee.committee_name like concat(concat('%',#{committeeName}),'%') and wg_committee.committee_name like concat(concat('%',#{committeeName}),'%')
</if> </if>
order by create_time desc
limit ${(page-1)*pageSize},${pageSize} limit ${(page-1)*pageSize},${pageSize}
</select> </select>
@@ -45,6 +46,7 @@
<if test="committeeName != null and ''!=committeeName"> <if test="committeeName != null and ''!=committeeName">
and wg_committee.committee_name like concat(concat('%',#{committeeName}),'%') and wg_committee.committee_name like concat(concat('%',#{committeeName}),'%')
</if> </if>
order by create_time desc
limit ${(page-1)*pageSize},${pageSize} limit ${(page-1)*pageSize},${pageSize}
</select> </select>
@@ -17,6 +17,7 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.annotations.Param;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@@ -752,4 +753,12 @@ public class AttFileEOController {
} }
} }
@ApiOperation(value = "修改文件名称")
@GetMapping("/updateFileName")
public ResponseMessage<AttFileEO> updateFileName(@Param("fileId") String fileId,@Param("fileName") String fileName) {
AttFileEO attFileEO = attFileEOService.updateFileInfo(fileId,fileName);
return Result.success(attFileEO);
}
} }
@@ -20,6 +20,8 @@ public interface AttFileEODao extends BaseMapper<AttFileEO> {
public AttFileEO selectFileInfoById(AttFileEO attFileEO); public AttFileEO selectFileInfoById(AttFileEO attFileEO);
public int updateFileInfoById(AttFileEO attFileEO);
public int insertData(AttFileEO attFileEO); public int insertData(AttFileEO attFileEO);
} }
@@ -20,6 +20,8 @@ public interface IAttFileEOService extends IService<AttFileEO> {
public AttFileEO getFileInfo(String attId); public AttFileEO getFileInfo(String attId);
public AttFileEO updateFileInfo(String attId,String name);
public List<AttFileEO> getMultiFileInfos(String fileIds); public List<AttFileEO> getMultiFileInfos(String fileIds);
public List<AttFileEO> getMultiFileInfosOrderByDateDesc(String fileIds); public List<AttFileEO> getMultiFileInfosOrderByDateDesc(String fileIds);
@@ -333,6 +333,26 @@ public class AttFileEOServiceImpl extends ServiceImpl<AttFileEODao, AttFileEO> i
return attFileEO; return attFileEO;
} }
@Override
public AttFileEO updateFileInfo(String attId,String name) {
/**
* 根据ID获取文件信息
*/
AttFileEO attFileEO = new AttFileEO();
AttFileEO attFileInfo=null;
Integer flag=0;
try {
attFileEO.setId(attId);
attFileInfo = this.baseMapper.selectFileInfoById(attFileEO);
attFileInfo.setOldFileName(name);
this.baseMapper.updateFileInfoById(attFileEO);
return attFileInfo;
} catch (Exception e) {
log.error(e.getMessage(),e);
}
return attFileInfo;
}
/** /**
* @Author super_liu * @Author super_liu
* @Description 多文件查询 * @Description 多文件查询
@@ -96,5 +96,8 @@
where id = #{id} where id = #{id}
</select> </select>
<update id="updateFileInfoById">
update ${tableName} set OLD_FILE_NAME = #{oldFileName} where id = #{id}
</update>
</mapper> </mapper>