总表时间修改
This commit is contained in:
parent
b1f1e1fc14
commit
b4c2d7cb68
|
|
@ -1,7 +1,9 @@
|
|||
package com.bonus.imgTool.backstage.entity;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
|
@ -55,6 +57,7 @@ public class ComprehensiveQueryVo {
|
|||
/**
|
||||
* 违章时间/检查时间/时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
|
||||
private Date vioDate;
|
||||
|
||||
/**
|
||||
|
|
@ -70,6 +73,7 @@ public class ComprehensiveQueryVo {
|
|||
/**
|
||||
* 整改期限
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
|
||||
private Date rectDate;
|
||||
|
||||
/**
|
||||
|
|
@ -80,6 +84,7 @@ public class ComprehensiveQueryVo {
|
|||
/**
|
||||
* 整改时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
|
||||
private Date rectTime;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ import javax.annotation.Resource;
|
|||
import javax.servlet.ServletOutputStream;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.net.URLEncoder;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
|
@ -37,6 +39,8 @@ public class QualityInspectionServiceImpl implements QualityInspectionService {
|
|||
|
||||
private static final Logger log = LoggerFactory.getLogger("SafetyViolationServiceImpl");
|
||||
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
@Resource
|
||||
private QualityInspectionDao dao;
|
||||
|
||||
|
|
@ -70,9 +74,23 @@ public class QualityInspectionServiceImpl implements QualityInspectionService {
|
|||
});
|
||||
int j = safetyViolationDao.insertImgPhoto(bean.getFileList());
|
||||
}
|
||||
//存入总库 TODO
|
||||
//存入总库
|
||||
ComprehensiveQueryVo comprehensiveQueryVo = new ComprehensiveQueryVo();
|
||||
BeanUtils.copyProperties(bean,comprehensiveQueryVo);
|
||||
try {
|
||||
// 检查vioDate是否既不是null也不是空字符串
|
||||
if (bean.getVioDate() != null && !bean.getVioDate().trim().isEmpty()) {
|
||||
comprehensiveQueryVo.setVioDate(dateFormat.parse(bean.getVioDate()));
|
||||
}
|
||||
if (bean.getRectDate() != null && !bean.getRectDate().trim().isEmpty()) {
|
||||
comprehensiveQueryVo.setRectDate(dateFormat.parse(bean.getRectDate()));
|
||||
}
|
||||
if (bean.getRectTime() != null && !bean.getRectTime().trim().isEmpty()) {
|
||||
comprehensiveQueryVo.setRectTime(dateFormat.parse(bean.getRectTime()));
|
||||
}
|
||||
} catch (ParseException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
synthesisQueryService.addComprehensiveQuery(comprehensiveQueryVo);
|
||||
return ServerResponse.createSuccess("新增成功");
|
||||
}
|
||||
|
|
@ -119,6 +137,20 @@ public class QualityInspectionServiceImpl implements QualityInspectionService {
|
|||
}
|
||||
ComprehensiveQueryVo comprehensiveQueryVo = new ComprehensiveQueryVo();
|
||||
BeanUtils.copyProperties(bean,comprehensiveQueryVo);
|
||||
try {
|
||||
// 检查vioDate是否既不是null也不是空字符串
|
||||
if (bean.getVioDate() != null && !bean.getVioDate().trim().isEmpty()) {
|
||||
comprehensiveQueryVo.setVioDate(dateFormat.parse(bean.getVioDate()));
|
||||
}
|
||||
if (bean.getRectDate() != null && !bean.getRectDate().trim().isEmpty()) {
|
||||
comprehensiveQueryVo.setRectDate(dateFormat.parse(bean.getRectDate()));
|
||||
}
|
||||
if (bean.getRectTime() != null && !bean.getRectTime().trim().isEmpty()) {
|
||||
comprehensiveQueryVo.setRectTime(dateFormat.parse(bean.getRectTime()));
|
||||
}
|
||||
} catch (ParseException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
synthesisQueryService.updateComprehensiveQuery(comprehensiveQueryVo);
|
||||
return ServerResponse.createSuccess("修改成功");
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -26,6 +26,9 @@ import javax.annotation.Resource;
|
|||
import javax.servlet.ServletOutputStream;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.net.URLEncoder;
|
||||
import java.text.DateFormat;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
|
@ -36,6 +39,9 @@ public class SafetyViolationServiceImpl implements SafetyViolationService {
|
|||
|
||||
private static final Logger log = LoggerFactory.getLogger("SafetyViolationServiceImpl");
|
||||
|
||||
// 定义日期格式
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
@Resource
|
||||
private SafetyViolationDao dao;
|
||||
|
||||
|
|
@ -68,6 +74,20 @@ public class SafetyViolationServiceImpl implements SafetyViolationService {
|
|||
}
|
||||
ComprehensiveQueryVo comprehensiveQueryVo = new ComprehensiveQueryVo();
|
||||
BeanUtils.copyProperties(bean,comprehensiveQueryVo);
|
||||
try {
|
||||
// 检查vioDate是否既不是null也不是空字符串
|
||||
if (bean.getVioDate() != null && !bean.getVioDate().trim().isEmpty()) {
|
||||
comprehensiveQueryVo.setVioDate(dateFormat.parse(bean.getVioDate()));
|
||||
}
|
||||
if (bean.getRectDate() != null && !bean.getRectDate().trim().isEmpty()) {
|
||||
comprehensiveQueryVo.setRectDate(dateFormat.parse(bean.getRectDate()));
|
||||
}
|
||||
if (bean.getRectTime() != null && !bean.getRectTime().trim().isEmpty()) {
|
||||
comprehensiveQueryVo.setRectTime(dateFormat.parse(bean.getRectTime()));
|
||||
}
|
||||
} catch (ParseException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
synthesisQueryService.addComprehensiveQuery(comprehensiveQueryVo);
|
||||
return ServerResponse.createSuccess("新增成功");
|
||||
}
|
||||
|
|
@ -114,6 +134,20 @@ public class SafetyViolationServiceImpl implements SafetyViolationService {
|
|||
}
|
||||
ComprehensiveQueryVo comprehensiveQueryVo = new ComprehensiveQueryVo();
|
||||
BeanUtils.copyProperties(bean,comprehensiveQueryVo);
|
||||
try {
|
||||
// 检查vioDate是否既不是null也不是空字符串
|
||||
if (bean.getVioDate() != null && !bean.getVioDate().trim().isEmpty()) {
|
||||
comprehensiveQueryVo.setVioDate(dateFormat.parse(bean.getVioDate()));
|
||||
}
|
||||
if (bean.getRectDate() != null && !bean.getRectDate().trim().isEmpty()) {
|
||||
comprehensiveQueryVo.setRectDate(dateFormat.parse(bean.getRectDate()));
|
||||
}
|
||||
if (bean.getRectTime() != null && !bean.getRectTime().trim().isEmpty()) {
|
||||
comprehensiveQueryVo.setRectTime(dateFormat.parse(bean.getRectTime()));
|
||||
}
|
||||
} catch (ParseException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
synthesisQueryService.updateComprehensiveQuery(comprehensiveQueryVo);
|
||||
return ServerResponse.createSuccess("修改成功");
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -19,5 +19,5 @@ public interface ProPullDao {
|
|||
|
||||
List<FileStorageDto> getNotHaveWatermarkPhoto();
|
||||
|
||||
void updateHaveWatermarkPhoto(List<FileStorageDto> fileList);
|
||||
void updateHaveWatermarkPhoto(List<FileStorageDto> list);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,12 +13,12 @@
|
|||
<if test="gxId != null and gxId != ''">gx_id,</if>
|
||||
<if test="gxName != null and gxName != ''">gx_name,</if>
|
||||
<if test="checkUserName != null and checkUserName != ''">check_user_name,</if>
|
||||
<if test="vioDate != null and vioDate != ''">vio_date,</if>
|
||||
<if test="vioDate != null">vio_date,</if>
|
||||
<if test="vioPlace != null and vioPlace != ''" >vio_place,</if>
|
||||
<if test="vioDesc != null and vioDesc != ''" >vio_desc,</if>
|
||||
<if test="rectDate != null and rectDate != ''">rect_date,</if>
|
||||
<if test="rectDate != null">rect_date,</if>
|
||||
<if test="rectUserName != null and rectUserName != ''">rect_user_name,</if>
|
||||
<if test="rectTime != null and rectTime != ''">rect_time,</if>
|
||||
<if test="rectTime != null">rect_time,</if>
|
||||
<if test="rectDesc != null and rectDesc != ''" >rect_desc,</if>
|
||||
<if test="rectStatus != null">rect_status,</if>
|
||||
<if test="buildBeforeDesc != null">build_before_desc,</if>
|
||||
|
|
@ -45,12 +45,12 @@
|
|||
<if test="gxId != null and gxId != ''">#{gxId},</if>
|
||||
<if test="gxName != null and gxName != ''">#{gxName},</if>
|
||||
<if test="checkUserName != null and checkUserName != ''">#{checkUserName},</if>
|
||||
<if test="vioDate != null and vioDate != ''">#{vioDate},</if>
|
||||
<if test="vioDate != null">#{vioDate},</if>
|
||||
<if test="vioPlace != null and vioPlace != ''">#{vioPlace},</if>
|
||||
<if test="vioDesc != null and vioDesc != ''">#{vioDesc},</if>
|
||||
<if test="rectDate != null and rectDate != ''">#{rectDate},</if>
|
||||
<if test="rectDate != null">#{rectDate},</if>
|
||||
<if test="rectUserName != null and rectUserName != ''">#{rectUserName},</if>
|
||||
<if test="rectTime != null and rectTime != ''">#{rectTime},</if>
|
||||
<if test="rectTime != null">#{rectTime},</if>
|
||||
<if test="rectDesc != null and rectDesc != ''">#{rectDesc},</if>
|
||||
<if test="rectStatus != null">#{rectStatus},</if>
|
||||
<if test="buildBeforeDesc != null">#{buildBeforeDesc},</if>
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@
|
|||
id = #{proId}
|
||||
</update>
|
||||
<update id="updateHaveWatermarkPhoto">
|
||||
<foreach collection="item" separator=";">
|
||||
<foreach collection="list" item="item" separator=";">
|
||||
<if test="item.id != null">
|
||||
UPDATE
|
||||
sys_file_resource
|
||||
|
|
|
|||
Loading…
Reference in New Issue