Commit 59a534bc authored by 廖旭伟's avatar 廖旭伟

申请事项增加审批时间字段

parent ab3d3d1d
...@@ -81,4 +81,6 @@ INSERT INTO `mortals_xhx_param` (`name`, `firstOrganize`, `secondOrganize`, `par ...@@ -81,4 +81,6 @@ INSERT INTO `mortals_xhx_param` (`name`, `firstOrganize`, `secondOrganize`, `par
-- 2024-06-20 -- 2024-06-20
INSERT INTO `mortals_xhx_param` (`name`, `firstOrganize`, `secondOrganize`, `paramKey`, `paramValue`, `validStatus`, `modStatus`, `displayType`, `remark`, `createTime`, `createUserId`, `createUserName`) VALUES ('审批状态', 'MatterApply', 'applyState', '3', '已撤销', '1', '4', '0', 'applyState', NULL, NULL, NULL); INSERT INTO `mortals_xhx_param` (`name`, `firstOrganize`, `secondOrganize`, `paramKey`, `paramValue`, `validStatus`, `modStatus`, `displayType`, `remark`, `createTime`, `createUserId`, `createUserName`) VALUES ('审批状态', 'MatterApply', 'applyState', '3', '已撤销', '1', '4', '0', 'applyState', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` (`name`, `firstOrganize`, `secondOrganize`, `paramKey`, `paramValue`, `validStatus`, `modStatus`, `displayType`, `remark`, `createTime`, `createUserId`, `createUserName`) VALUES ('审批状态', 'MatterApply', 'applyState', '-1', '审批中', '1', '4', '0', 'applyState', NULL, NULL, NULL); INSERT INTO `mortals_xhx_param` (`name`, `firstOrganize`, `secondOrganize`, `paramKey`, `paramValue`, `validStatus`, `modStatus`, `displayType`, `remark`, `createTime`, `createUserId`, `createUserName`) VALUES ('审批状态', 'MatterApply', 'applyState', '-1', '审批中', '1', '4', '0', 'applyState', NULL, NULL, NULL);
\ No newline at end of file
ALTER TABLE mortals_sys_matter_apply ADD COLUMN `examineTime` datetime DEFAULT NULL COMMENT '审批时间' AFTER `applyState`;
...@@ -36,6 +36,7 @@ public class MatterApplyDelayTask implements Runnable, Delayed { ...@@ -36,6 +36,7 @@ public class MatterApplyDelayTask implements Runnable, Delayed {
MatterApplyEntity update = new MatterApplyEntity(); MatterApplyEntity update = new MatterApplyEntity();
update.setId(entity.getId()); update.setId(entity.getId());
update.setApplyState(0); update.setApplyState(0);
update.setApplyTime(new Date());
update.setUpdateTime(new Date()); update.setUpdateTime(new Date());
matterApplyService.update(update); matterApplyService.update(update);
} }
......
...@@ -2,6 +2,9 @@ package com.mortals.xhx.module.apply.model; ...@@ -2,6 +2,9 @@ package com.mortals.xhx.module.apply.model;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.ArrayList; import java.util.ArrayList;
import java.math.BigDecimal;
import cn.hutool.core.date.DateUtil;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel; import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong; import com.mortals.framework.model.BaseEntityLong;
...@@ -11,7 +14,7 @@ import lombok.Data; ...@@ -11,7 +14,7 @@ import lombok.Data;
* 单事项申报实体对象 * 单事项申报实体对象
* *
* @author zxfei * @author zxfei
* @date 2023-06-07 * @date 2024-06-25
*/ */
@Data @Data
public class MatterApplyEntity extends MatterApplyVo { public class MatterApplyEntity extends MatterApplyVo {
...@@ -89,6 +92,10 @@ public class MatterApplyEntity extends MatterApplyVo { ...@@ -89,6 +92,10 @@ public class MatterApplyEntity extends MatterApplyVo {
* 事项申请文件地址 * 事项申请文件地址
*/ */
private String fileUrl; private String fileUrl;
/**
* 审批时间
*/
private Date examineTime;
@Override @Override
public int hashCode() { public int hashCode() {
return this.getId().hashCode(); return this.getId().hashCode();
...@@ -106,41 +113,24 @@ public class MatterApplyEntity extends MatterApplyVo { ...@@ -106,41 +113,24 @@ public class MatterApplyEntity extends MatterApplyVo {
} }
public void initAttrValue(){ public void initAttrValue(){
this.siteId = null; this.siteId = null;
this.singleMatterId = null; this.singleMatterId = null;
this.matterId = null; this.matterId = null;
this.deptCode = ""; this.deptCode = "";
this.matterName = ""; this.matterName = "";
this.applyPerson = ""; this.applyPerson = "";
this.sexual = 1; this.sexual = 1;
this.phoneNum = ""; this.phoneNum = "";
this.idCard = ""; this.idCard = "";
this.address = ""; this.address = "";
this.applyType = 1; this.applyType = 1;
this.applyTime = null; this.applyTime = null;
this.applyState = 0; this.applyState = 0;
this.advisement = ""; this.advisement = "";
this.remarks = ""; this.remarks = "";
this.openId = ""; this.openId = "";
this.filename = ""; this.filename = "";
this.fileUrl = ""; this.fileUrl = "";
this.examineTime = null;
} }
} }
\ No newline at end of file
...@@ -7,7 +7,7 @@ import com.mortals.xhx.module.apply.model.MatterApplyEntity; ...@@ -7,7 +7,7 @@ import com.mortals.xhx.module.apply.model.MatterApplyEntity;
* 单事项申报查询对象 * 单事项申报查询对象
* *
* @author zxfei * @author zxfei
* @date 2023-06-07 * @date 2024-06-25
*/ */
public class MatterApplyQuery extends MatterApplyEntity { public class MatterApplyQuery extends MatterApplyEntity {
/** 开始 序号,主键,自增长 */ /** 开始 序号,主键,自增长 */
...@@ -218,6 +218,12 @@ public class MatterApplyQuery extends MatterApplyEntity { ...@@ -218,6 +218,12 @@ public class MatterApplyQuery extends MatterApplyEntity {
/** 事项申请文件地址排除列表 */ /** 事项申请文件地址排除列表 */
private List <String> fileUrlNotList; private List <String> fileUrlNotList;
/** 开始 审批时间 */
private String examineTimeStart;
/** 结束 审批时间 */
private String examineTimeEnd;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */ /** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<MatterApplyQuery> orConditionList; private List<MatterApplyQuery> orConditionList;
...@@ -1403,6 +1409,38 @@ public class MatterApplyQuery extends MatterApplyEntity { ...@@ -1403,6 +1409,38 @@ public class MatterApplyQuery extends MatterApplyEntity {
this.fileUrlNotList = fileUrlNotList; this.fileUrlNotList = fileUrlNotList;
} }
/**
* 获取 开始 审批时间
* @return examineTimeStart
*/
public String getExamineTimeStart(){
return this.examineTimeStart;
}
/**
* 设置 开始 审批时间
* @param examineTimeStart
*/
public void setExamineTimeStart(String examineTimeStart){
this.examineTimeStart = examineTimeStart;
}
/**
* 获取 结束 审批时间
* @return examineTimeEnd
*/
public String getExamineTimeEnd(){
return this.examineTimeEnd;
}
/**
* 设置 结束 审批时间
* @param examineTimeEnd
*/
public void setExamineTimeEnd(String examineTimeEnd){
this.examineTimeEnd = examineTimeEnd;
}
/** /**
* 设置 序号,主键,自增长 * 设置 序号,主键,自增长
* @param id * @param id
...@@ -2101,6 +2139,7 @@ public class MatterApplyQuery extends MatterApplyEntity { ...@@ -2101,6 +2139,7 @@ public class MatterApplyQuery extends MatterApplyEntity {
return this; return this;
} }
/** /**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) * 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList * @return orConditionList
......
...@@ -79,7 +79,7 @@ public class MatterApplyServiceImpl extends AbstractCRUDServiceImpl<MatterApplyD ...@@ -79,7 +79,7 @@ public class MatterApplyServiceImpl extends AbstractCRUDServiceImpl<MatterApplyD
entity.setMatterName(singleMatterEntity.getMatterName()); entity.setMatterName(singleMatterEntity.getMatterName());
} }
entity.setSiteId(1l); entity.setSiteId(1l);
entity.setApplyTime(entity.getCreateTime()); //entity.setApplyTime(entity.getCreateTime());
entity.setApplyState(-1); entity.setApplyState(-1);
} }
...@@ -275,6 +275,7 @@ public class MatterApplyServiceImpl extends AbstractCRUDServiceImpl<MatterApplyD ...@@ -275,6 +275,7 @@ public class MatterApplyServiceImpl extends AbstractCRUDServiceImpl<MatterApplyD
update.setId(entity.getId()); update.setId(entity.getId());
update.setApplyState(entity.getApplyState()); update.setApplyState(entity.getApplyState());
update.setAdvisement(entity.getAdvisement()); update.setAdvisement(entity.getAdvisement());
update.setExamineTime(new Date());
if(context!=null && context.getUser()!=null){ if(context!=null && context.getUser()!=null){
update.setUpdateUserId(context.getUser().getId()); update.setUpdateUserId(context.getUser().getId());
} }
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
<result property="updateTime" column="updateTime" /> <result property="updateTime" column="updateTime" />
<result property="filename" column="filename" /> <result property="filename" column="filename" />
<result property="fileUrl" column="fileUrl" /> <result property="fileUrl" column="fileUrl" />
<result property="examineTime" column="examineTime" />
</resultMap> </resultMap>
...@@ -104,23 +105,26 @@ ...@@ -104,23 +105,26 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('fileUrl') or colPickMode == 1 and data.containsKey('fileUrl')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('fileUrl') or colPickMode == 1 and data.containsKey('fileUrl')))">
a.fileUrl, a.fileUrl,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('examineTime') or colPickMode == 1 and data.containsKey('examineTime')))">
a.examineTime,
</if>
</trim> </trim>
</sql> </sql>
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="MatterApplyEntity" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="MatterApplyEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_sys_matter_apply insert into mortals_sys_matter_apply
(siteId,singleMatterId,matterId,deptCode,matterName,applyPerson,sexual,phoneNum,idCard,address,applyType,applyTime,applyState,advisement,remarks,openId,createUserId,createTime,updateUserId,updateTime,filename,fileUrl) (siteId,singleMatterId,matterId,deptCode,matterName,applyPerson,sexual,phoneNum,idCard,address,applyType,applyTime,applyState,advisement,remarks,openId,createUserId,createTime,updateUserId,updateTime,filename,fileUrl,examineTime)
VALUES VALUES
(#{siteId},#{singleMatterId},#{matterId},#{deptCode},#{matterName},#{applyPerson},#{sexual},#{phoneNum},#{idCard},#{address},#{applyType},#{applyTime},#{applyState},#{advisement},#{remarks},#{openId},#{createUserId},#{createTime},#{updateUserId},#{updateTime},#{filename},#{fileUrl}) (#{siteId},#{singleMatterId},#{matterId},#{deptCode},#{matterName},#{applyPerson},#{sexual},#{phoneNum},#{idCard},#{address},#{applyType},#{applyTime},#{applyState},#{advisement},#{remarks},#{openId},#{createUserId},#{createTime},#{updateUserId},#{updateTime},#{filename},#{fileUrl},#{examineTime})
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto"> <insert id="insertBatch" parameterType="paramDto">
insert into mortals_sys_matter_apply insert into mortals_sys_matter_apply
(siteId,singleMatterId,matterId,deptCode,matterName,applyPerson,sexual,phoneNum,idCard,address,applyType,applyTime,applyState,advisement,remarks,openId,createUserId,createTime,updateUserId,updateTime,filename,fileUrl) (siteId,singleMatterId,matterId,deptCode,matterName,applyPerson,sexual,phoneNum,idCard,address,applyType,applyTime,applyState,advisement,remarks,openId,createUserId,createTime,updateUserId,updateTime,filename,fileUrl,examineTime)
VALUES VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," > <foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.siteId},#{item.singleMatterId},#{item.matterId},#{item.deptCode},#{item.matterName},#{item.applyPerson},#{item.sexual},#{item.phoneNum},#{item.idCard},#{item.address},#{item.applyType},#{item.applyTime},#{item.applyState},#{item.advisement},#{item.remarks},#{item.openId},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime},#{item.filename},#{item.fileUrl}) (#{item.siteId},#{item.singleMatterId},#{item.matterId},#{item.deptCode},#{item.matterName},#{item.applyPerson},#{item.sexual},#{item.phoneNum},#{item.idCard},#{item.address},#{item.applyType},#{item.applyTime},#{item.applyState},#{item.advisement},#{item.remarks},#{item.openId},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime},#{item.filename},#{item.fileUrl},#{item.examineTime})
</foreach> </foreach>
</insert> </insert>
...@@ -220,6 +224,9 @@ ...@@ -220,6 +224,9 @@
<if test="(colPickMode==0 and data.containsKey('fileUrl')) or (colPickMode==1 and !data.containsKey('fileUrl'))"> <if test="(colPickMode==0 and data.containsKey('fileUrl')) or (colPickMode==1 and !data.containsKey('fileUrl'))">
a.fileUrl=#{data.fileUrl}, a.fileUrl=#{data.fileUrl},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('examineTime')) or (colPickMode==1 and !data.containsKey('examineTime'))">
a.examineTime=#{data.examineTime},
</if>
</trim> </trim>
<trim suffixOverrides="where" suffix=""> <trim suffixOverrides="where" suffix="">
where where
...@@ -426,6 +433,13 @@ ...@@ -426,6 +433,13 @@
</if> </if>
</foreach> </foreach>
</trim> </trim>
<trim prefix="examineTime=(case" suffix="ELSE examineTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('examineTime')) or (colPickMode==1 and !item.containsKey('examineTime'))">
when a.id=#{item.id} then #{item.examineTime}
</if>
</foreach>
</trim>
</trim> </trim>
where id in where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")"> <foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
...@@ -1061,18 +1075,159 @@ ...@@ -1061,18 +1075,159 @@
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('examineTime')">
<if test="conditionParamRef.examineTime != null ">
${_conditionType_} a.examineTime = #{${_conditionParam_}.examineTime}
</if>
<if test="conditionParamRef.examineTime == null">
${_conditionType_} a.examineTime is null
</if>
</if>
<if test="conditionParamRef.containsKey('examineTimeStart') and conditionParamRef.examineTimeStart != null and conditionParamRef.examineTimeStart!=''">
${_conditionType_} a.examineTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.examineTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('examineTimeEnd') and conditionParamRef.examineTimeEnd != null and conditionParamRef.examineTimeEnd!=''">
${_conditionType_} a.examineTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.examineTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
</sql> </sql>
<sql id="_orderCols_"> <sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()"> <if test="orderColList != null and !orderColList.isEmpty()">
order by order by
<if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0">
field(a.id,
<foreach collection="conditionParamRef.idList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('siteIdList') and conditionParamRef.siteIdList.size() > 0">
field(a.siteId,
<foreach collection="conditionParamRef.siteIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('singleMatterIdList') and conditionParamRef.singleMatterIdList.size() > 0">
field(a.singleMatterId,
<foreach collection="conditionParamRef.singleMatterIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('matterIdList') and conditionParamRef.matterIdList.size() > 0">
field(a.matterId,
<foreach collection="conditionParamRef.matterIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('sexualList') and conditionParamRef.sexualList.size() > 0">
field(a.sexual,
<foreach collection="conditionParamRef.sexualList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('applyTypeList') and conditionParamRef.applyTypeList.size() > 0">
field(a.applyType,
<foreach collection="conditionParamRef.applyTypeList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('applyStateList') and conditionParamRef.applyStateList.size() > 0">
field(a.applyState,
<foreach collection="conditionParamRef.applyStateList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('createUserIdList') and conditionParamRef.createUserIdList.size() > 0">
field(a.createUserId,
<foreach collection="conditionParamRef.createUserIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('updateUserIdList') and conditionParamRef.updateUserIdList.size() > 0">
field(a.updateUserId,
<foreach collection="conditionParamRef.updateUserIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<trim suffixOverrides="," suffix=""> <trim suffixOverrides="," suffix="">
<foreach collection="orderColList" open="" close="" index="index" item="item" separator=","> <foreach collection="orderColList" open="" close="" index="index" item="item" separator=",">
${item.colName} ${item.sortKind} a.${item.colName} ${item.sortKind}
</foreach> </foreach>
</trim> </trim>
</if> </if>
<if test="(orderColList == null or orderColList.isEmpty()) and orderCol != null and !orderCol.isEmpty()"> <if test="(orderColList == null or orderColList.isEmpty()) and orderCol != null and !orderCol.isEmpty()">
order by order by
<if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0">
field(a.id,
<foreach collection="conditionParamRef.idList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('siteIdList') and conditionParamRef.siteIdList.size() > 0">
field(a.siteId,
<foreach collection="conditionParamRef.siteIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('singleMatterIdList') and conditionParamRef.singleMatterIdList.size() > 0">
field(a.singleMatterId,
<foreach collection="conditionParamRef.singleMatterIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('matterIdList') and conditionParamRef.matterIdList.size() > 0">
field(a.matterId,
<foreach collection="conditionParamRef.matterIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('sexualList') and conditionParamRef.sexualList.size() > 0">
field(a.sexual,
<foreach collection="conditionParamRef.sexualList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('applyTypeList') and conditionParamRef.applyTypeList.size() > 0">
field(a.applyType,
<foreach collection="conditionParamRef.applyTypeList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('applyStateList') and conditionParamRef.applyStateList.size() > 0">
field(a.applyState,
<foreach collection="conditionParamRef.applyStateList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('createUserIdList') and conditionParamRef.createUserIdList.size() > 0">
field(a.createUserId,
<foreach collection="conditionParamRef.createUserIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('updateUserIdList') and conditionParamRef.updateUserIdList.size() > 0">
field(a.updateUserId,
<foreach collection="conditionParamRef.updateUserIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<trim suffixOverrides="," suffix=""> <trim suffixOverrides="," suffix="">
<if test="orderCol.containsKey('id')"> <if test="orderCol.containsKey('id')">
a.id a.id
...@@ -1189,8 +1344,15 @@ ...@@ -1189,8 +1344,15 @@
<if test='orderCol.fileUrl != null and "DESC".equalsIgnoreCase(orderCol.fileUrl)'>DESC</if> <if test='orderCol.fileUrl != null and "DESC".equalsIgnoreCase(orderCol.fileUrl)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('examineTime')">
a.examineTime
<if test='orderCol.examineTime != null and "DESC".equalsIgnoreCase(orderCol.examineTime)'>DESC</if>
,
</if>
</trim> </trim>
</if> </if>
</sql> </sql>
<sql id="_group_by_"> <sql id="_group_by_">
<if test="groupList != null and !groupList.isEmpty()"> <if test="groupList != null and !groupList.isEmpty()">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment