Commit a02c03d8 authored by 赵啸非's avatar 赵啸非

修改xml sql 映射

parent 0af60546
......@@ -191,7 +191,7 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID
/**
* 根据系统电话查询指定时间的审批表单
* @param processCode 审批流的唯一码(详见doc下 审批表单列表.txt)。 请假:PROC-2E5C0DFF-3615-4409-A614-A2011FED5D38 外出:PROC-56D3ADEE-45A4-47BC-931A-2A0DC067DE32
* @param processCode 审批流的唯一码(详见doc下 审批表单列表.txt)。 请假:PROC-2E5C0DFF-3615-4409-A614-A2011FED5D38 外出:PROC-56D3ADEE-45A4-47BC-931A-2A0DC067DE32 出差 :PROC-578CBDDF-B768-496D-9918-44A3F1D9CAE7
* @param startTime 审批实例开始时间,Unix时间戳,单位毫秒
* @param endTime 审批实例结束时间,Unix时间戳,单位毫秒。
* @param nextToken 分页游标。如果是非首次调用,该参数传上次调用时返回的nextToken。
......
package com.mortals.xhx.module.window.model;
import java.math.BigDecimal;
import java.util.List;
import java.util.Date;
import java.util.List;
import java.util.ArrayList;
......@@ -10,12 +11,13 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.window.model.vo.WindowPerformVo;
import com.mortals.xhx.module.window.model.WindowWorkmanPerformDetailEntity;
import lombok.Data;
/**
* 大厅窗口考核登记信息实体对象
* 窗口考核登记实体对象
*
* @author zxfei
* @date 2024-01-17
* @date 2024-01-26
*/
@Data
public class WindowPerformEntity extends WindowPerformVo {
......@@ -125,6 +127,17 @@ public class WindowPerformEntity extends WindowPerformVo {
* 填报状态0暂存1提交
*/
private Integer fillStatus;
/**
* 窗口人员考核汇总明细信息
*/
private List<WindowWorkmanPerformDetailEntity> windowWorkmanPerformDetailList=new ArrayList<>();;
public List<WindowWorkmanPerformDetailEntity> getWindowWorkmanPerformDetailList(){
return windowWorkmanPerformDetailList;
}
public void setWindowWorkmanPerformDetailList(List<WindowWorkmanPerformDetailEntity> windowWorkmanPerformDetailList){
this.windowWorkmanPerformDetailList = windowWorkmanPerformDetailList;
}
@Override
public int hashCode() {
return this.getId().hashCode();
......
package com.mortals.xhx.module.window.model;
import java.math.BigDecimal;
import java.util.List;
import java.util.Date;
import java.util.List;
import com.mortals.xhx.module.window.model.WindowPerformEntity;
/**
* 大厅窗口考核登记信息查询对象
* 窗口考核登记查询对象
*
* @author zxfei
* @date 2024-01-17
* @date 2024-01-26
*/
public class WindowPerformQuery extends WindowPerformEntity {
/** 开始 序号,主键,自增长 */
......
package com.mortals.xhx.module.window.service.impl;
import com.mortals.xhx.module.dept.model.DeptEntity;
import com.mortals.xhx.module.dept.service.DeptService;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
......@@ -14,75 +11,48 @@ import com.mortals.xhx.module.window.model.WindowOwnerDetailEntity;
import com.mortals.xhx.module.window.model.WindowOwnerDetailQuery;
import com.mortals.xhx.module.window.service.WindowOwnerDetailService;
import org.springframework.util.ObjectUtils;
import java.util.Date;
import java.util.Arrays;
import java.util.List;
import lombok.extern.slf4j.Slf4j;
/**
* WindowOwnerService
* 窗口负责人 service实现
*
* @author zxfei
* @date 2023-07-12
* @date 2024-01-26
*/
@Service("windowOwnerService")
@Slf4j
public class WindowOwnerServiceImpl extends AbstractCRUDServiceImpl<WindowOwnerDao, WindowOwnerEntity, Long> implements WindowOwnerService {
@Autowired
private WindowOwnerDetailService windowOwnerDetailService;
@Autowired
private DeptService deptService;
@Override
protected void saveBefore(WindowOwnerEntity entity, Context context) throws AppException {
if (!ObjectUtils.isEmpty(entity.getWindowOwnerDetailList())) {
entity.setWindowCount(entity.getWindowOwnerDetailList().size());
}
DeptEntity deptEntity = deptService.get(entity.getDeptId());
entity.setDeptName(deptEntity == null ? "" : deptEntity.getDeptName());
}
@Override
protected void updateBefore(WindowOwnerEntity entity, Context context) throws AppException {
if (!ObjectUtils.isEmpty(entity.getWindowOwnerDetailList())) {
entity.setWindowCount(entity.getWindowOwnerDetailList().size());
}
}
@Override
protected void saveAfter(WindowOwnerEntity entity, Context context) throws AppException {
if (!ObjectUtils.isEmpty(entity.getWindowOwnerDetailList())) {
entity.getWindowOwnerDetailList().stream().peek(item -> {
if(!ObjectUtils.isEmpty(entity.getWindowOwnerDetailList())){
entity.getWindowOwnerDetailList().stream().peek(item->{
item.setOwnerId(entity.getId());
item.setCreateUserId(this.getContextUserId(context));
item.setCreateTime(new Date());
}).count();
windowOwnerDetailService.save(entity.getWindowOwnerDetailList());
}
super.saveAfter(entity, context);
}
@Override
protected void updateAfter(WindowOwnerEntity entity, Context context) throws AppException {
if (!ObjectUtils.isEmpty(entity.getWindowOwnerDetailList())) {
if(!ObjectUtils.isEmpty(entity.getWindowOwnerDetailList())){
Long[] windowOwnerDetailIds = windowOwnerDetailService.find(new WindowOwnerDetailQuery().ownerId(entity.getId())).stream().map(WindowOwnerDetailEntity::getId).toArray(Long[]::new);
windowOwnerDetailService.remove(windowOwnerDetailIds, context);
entity.getWindowOwnerDetailList().stream().peek(item -> {
windowOwnerDetailService.remove(windowOwnerDetailIds,context);
entity.getWindowOwnerDetailList().stream().peek(item ->{
item.setOwnerId(entity.getId());
item.setCreateUserId(this.getContextUserId(context));
item.setCreateTime(new Date());
item.setUpdateUserId(this.getContextUserId(context));
item.setUpdateTime(new Date());
}).count();
entity.setNumber(entity.getWindowOwnerDetailList().size() + "");
windowOwnerDetailService.save(entity.getWindowOwnerDetailList());
}
super.updateAfter(entity, context);
......@@ -91,7 +61,7 @@ public class WindowOwnerServiceImpl extends AbstractCRUDServiceImpl<WindowOwnerD
@Override
protected void removeAfter(Long[] ids, Context context, int result) throws AppException {
List<WindowOwnerDetailEntity> windowOwnerDetaillist = windowOwnerDetailService.find(new WindowOwnerDetailQuery().ownerIdList(Arrays.asList(ids)));
windowOwnerDetailService.removeList(windowOwnerDetaillist, context);
windowOwnerDetailService.removeList(windowOwnerDetaillist,context);
super.removeAfter(ids, context, result);
}
}
\ No newline at end of file
......@@ -8,10 +8,6 @@
<id property="id" column="id" />
<result property="deptId" column="deptId" />
<result property="deptName" column="deptName" />
<result property="salaId" column="salaId" />
<result property="salaName" column="salaName" />
<result property="staffId" column="staffId" />
<result property="staffName" column="staffName" />
<result property="number" column="number" />
<result property="phone" column="phone" />
<result property="windowCount" column="windowCount" />
......@@ -20,19 +16,30 @@
<result property="createUserId" column="createUserId" />
<result property="updateUserId" column="updateUserId" />
<result property="updateTime" column="updateTime" />
<result property="salaId" column="salaId" />
<result property="salaName" column="salaName" />
<result property="staffId" column="staffId" />
<result property="staffName" column="staffName" />
<result property="systemUserId" column="systemUserId" />
<result property="systemUserName" column="systemUserName" />
<collection property="windowOwnerDetailList" column="id" ofType="WindowOwnerDetailEntity" javaType="ArrayList" select="getWindowOwnerDetailByOwnerId"></collection>
</resultMap>
<resultMap type="WindowOwnerDetailEntity" id="WindowOwnerDetailEntity-Map">
<result property="id" column="id" />
<result property="ownerId" column="ownerId" />
<result property="staffId" column="staffId" />
<result property="remark" column="remark" />
<result property="createTime" column="createTime" />
<result property="createUserId" column="createUserId" />
<result property="updateUserId" column="updateUserId" />
<result property="updateTime" column="updateTime" />
<result property="windowId" column="windowId" />
<result property="windowName" column="windowName" />
<result property="windowCode" column="windowCode" />
<result property="building" column="building" />
<result property="level" column="level" />
</resultMap>
<!-- 表所有列 -->
<sql id="_columns">
<trim suffixOverrides="," suffix="">
......@@ -45,18 +52,6 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('deptName') or colPickMode == 1 and data.containsKey('deptName')))">
a.deptName,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('salaId') or colPickMode == 1 and data.containsKey('salaId')))">
a.salaId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('salaName') or colPickMode == 1 and data.containsKey('salaName')))">
a.salaName,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('staffId') or colPickMode == 1 and data.containsKey('staffId')))">
a.staffId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('staffName') or colPickMode == 1 and data.containsKey('staffName')))">
a.staffName,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('number') or colPickMode == 1 and data.containsKey('number')))">
a.number,
</if>
......@@ -81,29 +76,47 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
a.updateTime,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('salaId') or colPickMode == 1 and data.containsKey('salaId')))">
a.salaId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('salaName') or colPickMode == 1 and data.containsKey('salaName')))">
a.salaName,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('staffId') or colPickMode == 1 and data.containsKey('staffId')))">
a.staffId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('staffName') or colPickMode == 1 and data.containsKey('staffName')))">
a.staffName,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('systemUserId') or colPickMode == 1 and data.containsKey('systemUserId')))">
a.systemUserId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('systemUserName') or colPickMode == 1 and data.containsKey('systemUserName')))">
a.systemUserName,
</if>
</trim>
</sql>
<!-- 子表所有列 -->
<sql id="_columns_sub">
<trim suffixOverrides="," suffix="">
b.id,b.performId,b.staffId,b.staffName,b.discipline,b.specification,b.management,b.evaluation,b.efficiency,b.bonusScore,b.sumScore,b.vexamineLevel,b.remark,b.createUserId,b.createTime,b.updateUserId,b.updateTime,
b.id,b.ownerId,b.remark,b.createTime,b.createUserId,b.updateUserId,b.updateTime,b.windowId,b.windowName,b.windowCode,b.building,b.level,
</trim>
</sql>
<!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="WindowOwnerEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_window_owner
(deptId,deptName,salaId,salaName,staffId,staffName,number,phone,windowCount,remark,createTime,createUserId,updateUserId,updateTime)
(deptId,deptName,number,phone,windowCount,remark,createTime,createUserId,updateUserId,updateTime,salaId,salaName,staffId,staffName,systemUserId,systemUserName)
VALUES
(#{deptId},#{deptName},#{salaId},#{salaName},#{staffId},#{staffName},#{number},#{phone},#{windowCount},#{remark},#{createTime},#{createUserId},#{updateUserId},#{updateTime})
(#{deptId},#{deptName},#{number},#{phone},#{windowCount},#{remark},#{createTime},#{createUserId},#{updateUserId},#{updateTime},#{salaId},#{salaName},#{staffId},#{staffName},#{systemUserId},#{systemUserName})
</insert>
<!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_window_owner
(deptId,deptName,salaId,salaName,staffId,staffName,number,phone,windowCount,remark,createTime,createUserId,updateUserId,updateTime)
(deptId,deptName,number,phone,windowCount,remark,createTime,createUserId,updateUserId,updateTime,salaId,salaName,staffId,staffName,systemUserId,systemUserName)
VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.deptId},#{item.deptName},#{item.salaId},#{item.salaName},#{item.staffId},#{item.staffName},#{item.number},#{item.phone},#{item.windowCount},#{item.remark},#{item.createTime},#{item.createUserId},#{item.updateUserId},#{item.updateTime})
(#{item.deptId},#{item.deptName},#{item.number},#{item.phone},#{item.windowCount},#{item.remark},#{item.createTime},#{item.createUserId},#{item.updateUserId},#{item.updateTime},#{item.salaId},#{item.salaName},#{item.staffId},#{item.staffName},#{item.systemUserId},#{item.systemUserName})
</foreach>
</insert>
......@@ -122,24 +135,6 @@
<if test="(colPickMode==0 and data.containsKey('deptName')) or (colPickMode==1 and !data.containsKey('deptName'))">
a.deptName=#{data.deptName},
</if>
<if test="(colPickMode==0 and data.containsKey('salaId')) or (colPickMode==1 and !data.containsKey('salaId'))">
a.salaId=#{data.salaId},
</if>
<if test="(colPickMode==0 and data.containsKey('salaIdIncrement')) or (colPickMode==1 and !data.containsKey('salaIdIncrement'))">
a.salaId=ifnull(a.salaId,0) + #{data.salaIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('salaName')) or (colPickMode==1 and !data.containsKey('salaName'))">
a.salaName=#{data.salaName},
</if>
<if test="(colPickMode==0 and data.containsKey('staffId')) or (colPickMode==1 and !data.containsKey('staffId'))">
a.staffId=#{data.staffId},
</if>
<if test="(colPickMode==0 and data.containsKey('staffIdIncrement')) or (colPickMode==1 and !data.containsKey('staffIdIncrement'))">
a.staffId=ifnull(a.staffId,0) + #{data.staffIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('staffName')) or (colPickMode==1 and !data.containsKey('staffName'))">
a.staffName=#{data.staffName},
</if>
<if test="(colPickMode==0 and data.containsKey('number')) or (colPickMode==1 and !data.containsKey('number'))">
a.number=#{data.number},
</if>
......@@ -173,6 +168,33 @@
<if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))">
a.updateTime=#{data.updateTime},
</if>
<if test="(colPickMode==0 and data.containsKey('salaId')) or (colPickMode==1 and !data.containsKey('salaId'))">
a.salaId=#{data.salaId},
</if>
<if test="(colPickMode==0 and data.containsKey('salaIdIncrement')) or (colPickMode==1 and !data.containsKey('salaIdIncrement'))">
a.salaId=ifnull(a.salaId,0) + #{data.salaIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('salaName')) or (colPickMode==1 and !data.containsKey('salaName'))">
a.salaName=#{data.salaName},
</if>
<if test="(colPickMode==0 and data.containsKey('staffId')) or (colPickMode==1 and !data.containsKey('staffId'))">
a.staffId=#{data.staffId},
</if>
<if test="(colPickMode==0 and data.containsKey('staffIdIncrement')) or (colPickMode==1 and !data.containsKey('staffIdIncrement'))">
a.staffId=ifnull(a.staffId,0) + #{data.staffIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('staffName')) or (colPickMode==1 and !data.containsKey('staffName'))">
a.staffName=#{data.staffName},
</if>
<if test="(colPickMode==0 and data.containsKey('systemUserId')) or (colPickMode==1 and !data.containsKey('systemUserId'))">
a.systemUserId=#{data.systemUserId},
</if>
<if test="(colPickMode==0 and data.containsKey('systemUserIdIncrement')) or (colPickMode==1 and !data.containsKey('systemUserIdIncrement'))">
a.systemUserId=ifnull(a.systemUserId,0) + #{data.systemUserIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('systemUserName')) or (colPickMode==1 and !data.containsKey('systemUserName'))">
a.systemUserName=#{data.systemUserName},
</if>
</trim>
<trim suffixOverrides="where" suffix="">
where
......@@ -204,44 +226,6 @@
</if>
</foreach>
</trim>
<trim prefix="salaId=(case" suffix="ELSE salaId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('salaId')) or (colPickMode==1 and !item.containsKey('salaId'))">
when a.id=#{item.id} then #{item.salaId}
</when>
<when test="(colPickMode==0 and item.containsKey('salaIdIncrement')) or (colPickMode==1 and !item.containsKey('salaIdIncrement'))">
when a.id=#{item.id} then ifnull(a.salaId,0) + #{item.salaIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="salaName=(case" suffix="ELSE salaName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('salaName')) or (colPickMode==1 and !item.containsKey('salaName'))">
when a.id=#{item.id} then #{item.salaName}
</if>
</foreach>
</trim>
<trim prefix="staffId=(case" suffix="ELSE staffId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('staffId')) or (colPickMode==1 and !item.containsKey('staffId'))">
when a.id=#{item.id} then #{item.staffId}
</when>
<when test="(colPickMode==0 and item.containsKey('staffIdIncrement')) or (colPickMode==1 and !item.containsKey('staffIdIncrement'))">
when a.id=#{item.id} then ifnull(a.staffId,0) + #{item.staffIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="staffName=(case" suffix="ELSE staffName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('staffName')) or (colPickMode==1 and !item.containsKey('staffName'))">
when a.id=#{item.id} then #{item.staffName}
</if>
</foreach>
</trim>
<trim prefix="number=(case" suffix="ELSE number end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('number')) or (colPickMode==1 and !item.containsKey('number'))">
......@@ -313,6 +297,63 @@
</if>
</foreach>
</trim>
<trim prefix="salaId=(case" suffix="ELSE salaId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('salaId')) or (colPickMode==1 and !item.containsKey('salaId'))">
when a.id=#{item.id} then #{item.salaId}
</when>
<when test="(colPickMode==0 and item.containsKey('salaIdIncrement')) or (colPickMode==1 and !item.containsKey('salaIdIncrement'))">
when a.id=#{item.id} then ifnull(a.salaId,0) + #{item.salaIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="salaName=(case" suffix="ELSE salaName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('salaName')) or (colPickMode==1 and !item.containsKey('salaName'))">
when a.id=#{item.id} then #{item.salaName}
</if>
</foreach>
</trim>
<trim prefix="staffId=(case" suffix="ELSE staffId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('staffId')) or (colPickMode==1 and !item.containsKey('staffId'))">
when a.id=#{item.id} then #{item.staffId}
</when>
<when test="(colPickMode==0 and item.containsKey('staffIdIncrement')) or (colPickMode==1 and !item.containsKey('staffIdIncrement'))">
when a.id=#{item.id} then ifnull(a.staffId,0) + #{item.staffIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="staffName=(case" suffix="ELSE staffName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('staffName')) or (colPickMode==1 and !item.containsKey('staffName'))">
when a.id=#{item.id} then #{item.staffName}
</if>
</foreach>
</trim>
<trim prefix="systemUserId=(case" suffix="ELSE systemUserId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('systemUserId')) or (colPickMode==1 and !item.containsKey('systemUserId'))">
when a.id=#{item.id} then #{item.systemUserId}
</when>
<when test="(colPickMode==0 and item.containsKey('systemUserIdIncrement')) or (colPickMode==1 and !item.containsKey('systemUserIdIncrement'))">
when a.id=#{item.id} then ifnull(a.systemUserId,0) + #{item.systemUserIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="systemUserName=(case" suffix="ELSE systemUserName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('systemUserName')) or (colPickMode==1 and !item.containsKey('systemUserName'))">
when a.id=#{item.id} then #{item.systemUserName}
</if>
</foreach>
</trim>
</trim>
where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
......@@ -383,6 +424,7 @@
</select>
<!-- 获取 -->
<select id="getListCount" parameterType="paramDto" resultType="int">
select count(1)
......@@ -511,102 +553,6 @@
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('salaId')">
<if test="conditionParamRef.salaId != null ">
${_conditionType_} a.salaId = #{${_conditionParam_}.salaId}
</if>
<if test="conditionParamRef.salaId == null">
${_conditionType_} a.salaId is null
</if>
</if>
<if test="conditionParamRef.containsKey('salaIdList') and conditionParamRef.salaIdList.size() > 0">
${_conditionType_} a.salaId in
<foreach collection="conditionParamRef.salaIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('salaIdNotList') and conditionParamRef.salaIdNotList.size() > 0">
${_conditionType_} a.salaId not in
<foreach collection="conditionParamRef.salaIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('salaIdStart') and conditionParamRef.salaIdStart != null">
${_conditionType_} a.salaId <![CDATA[ >= ]]> #{${_conditionParam_}.salaIdStart}
</if>
<if test="conditionParamRef.containsKey('salaIdEnd') and conditionParamRef.salaIdEnd != null">
${_conditionType_} a.salaId <![CDATA[ <= ]]> #{${_conditionParam_}.salaIdEnd}
</if>
<if test="conditionParamRef.containsKey('salaName')">
<if test="conditionParamRef.salaName != null and conditionParamRef.salaName != ''">
${_conditionType_} a.salaName like #{${_conditionParam_}.salaName}
</if>
<if test="conditionParamRef.salaName == null">
${_conditionType_} a.salaName is null
</if>
</if>
<if test="conditionParamRef.containsKey('salaNameList') and conditionParamRef.salaNameList.size() > 0">
${_conditionType_} a.salaName in
<foreach collection="conditionParamRef.salaNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('salaNameNotList') and conditionParamRef.salaNameNotList.size() > 0">
${_conditionType_} a.salaName not in
<foreach collection="conditionParamRef.salaNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('staffId')">
<if test="conditionParamRef.staffId != null ">
${_conditionType_} a.staffId = #{${_conditionParam_}.staffId}
</if>
<if test="conditionParamRef.staffId == null">
${_conditionType_} a.staffId is null
</if>
</if>
<if test="conditionParamRef.containsKey('staffIdList') and conditionParamRef.staffIdList.size() > 0">
${_conditionType_} a.staffId in
<foreach collection="conditionParamRef.staffIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('staffIdNotList') and conditionParamRef.staffIdNotList.size() > 0">
${_conditionType_} a.staffId not in
<foreach collection="conditionParamRef.staffIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('staffIdStart') and conditionParamRef.staffIdStart != null">
${_conditionType_} a.staffId <![CDATA[ >= ]]> #{${_conditionParam_}.staffIdStart}
</if>
<if test="conditionParamRef.containsKey('staffIdEnd') and conditionParamRef.staffIdEnd != null">
${_conditionType_} a.staffId <![CDATA[ <= ]]> #{${_conditionParam_}.staffIdEnd}
</if>
<if test="conditionParamRef.containsKey('staffName')">
<if test="conditionParamRef.staffName != null and conditionParamRef.staffName != ''">
${_conditionType_} a.staffName like #{${_conditionParam_}.staffName}
</if>
<if test="conditionParamRef.staffName == null">
${_conditionType_} a.staffName is null
</if>
</if>
<if test="conditionParamRef.containsKey('staffNameList') and conditionParamRef.staffNameList.size() > 0">
${_conditionType_} a.staffName in
<foreach collection="conditionParamRef.staffNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('staffNameNotList') and conditionParamRef.staffNameNotList.size() > 0">
${_conditionType_} a.staffName not in
<foreach collection="conditionParamRef.staffNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('number')">
<if test="conditionParamRef.number != null and conditionParamRef.number != ''">
......@@ -781,6 +727,150 @@
<if test="conditionParamRef.containsKey('updateTimeEnd') and conditionParamRef.updateTimeEnd != null and conditionParamRef.updateTimeEnd!=''">
${_conditionType_} a.updateTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('salaId')">
<if test="conditionParamRef.salaId != null ">
${_conditionType_} a.salaId = #{${_conditionParam_}.salaId}
</if>
<if test="conditionParamRef.salaId == null">
${_conditionType_} a.salaId is null
</if>
</if>
<if test="conditionParamRef.containsKey('salaIdList') and conditionParamRef.salaIdList.size() > 0">
${_conditionType_} a.salaId in
<foreach collection="conditionParamRef.salaIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('salaIdNotList') and conditionParamRef.salaIdNotList.size() > 0">
${_conditionType_} a.salaId not in
<foreach collection="conditionParamRef.salaIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('salaIdStart') and conditionParamRef.salaIdStart != null">
${_conditionType_} a.salaId <![CDATA[ >= ]]> #{${_conditionParam_}.salaIdStart}
</if>
<if test="conditionParamRef.containsKey('salaIdEnd') and conditionParamRef.salaIdEnd != null">
${_conditionType_} a.salaId <![CDATA[ <= ]]> #{${_conditionParam_}.salaIdEnd}
</if>
<if test="conditionParamRef.containsKey('salaName')">
<if test="conditionParamRef.salaName != null and conditionParamRef.salaName != ''">
${_conditionType_} a.salaName like #{${_conditionParam_}.salaName}
</if>
<if test="conditionParamRef.salaName == null">
${_conditionType_} a.salaName is null
</if>
</if>
<if test="conditionParamRef.containsKey('salaNameList') and conditionParamRef.salaNameList.size() > 0">
${_conditionType_} a.salaName in
<foreach collection="conditionParamRef.salaNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('salaNameNotList') and conditionParamRef.salaNameNotList.size() > 0">
${_conditionType_} a.salaName not in
<foreach collection="conditionParamRef.salaNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('staffId')">
<if test="conditionParamRef.staffId != null ">
${_conditionType_} a.staffId = #{${_conditionParam_}.staffId}
</if>
<if test="conditionParamRef.staffId == null">
${_conditionType_} a.staffId is null
</if>
</if>
<if test="conditionParamRef.containsKey('staffIdList') and conditionParamRef.staffIdList.size() > 0">
${_conditionType_} a.staffId in
<foreach collection="conditionParamRef.staffIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('staffIdNotList') and conditionParamRef.staffIdNotList.size() > 0">
${_conditionType_} a.staffId not in
<foreach collection="conditionParamRef.staffIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('staffIdStart') and conditionParamRef.staffIdStart != null">
${_conditionType_} a.staffId <![CDATA[ >= ]]> #{${_conditionParam_}.staffIdStart}
</if>
<if test="conditionParamRef.containsKey('staffIdEnd') and conditionParamRef.staffIdEnd != null">
${_conditionType_} a.staffId <![CDATA[ <= ]]> #{${_conditionParam_}.staffIdEnd}
</if>
<if test="conditionParamRef.containsKey('staffName')">
<if test="conditionParamRef.staffName != null and conditionParamRef.staffName != ''">
${_conditionType_} a.staffName like #{${_conditionParam_}.staffName}
</if>
<if test="conditionParamRef.staffName == null">
${_conditionType_} a.staffName is null
</if>
</if>
<if test="conditionParamRef.containsKey('staffNameList') and conditionParamRef.staffNameList.size() > 0">
${_conditionType_} a.staffName in
<foreach collection="conditionParamRef.staffNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('staffNameNotList') and conditionParamRef.staffNameNotList.size() > 0">
${_conditionType_} a.staffName not in
<foreach collection="conditionParamRef.staffNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('systemUserId')">
<if test="conditionParamRef.systemUserId != null ">
${_conditionType_} a.systemUserId = #{${_conditionParam_}.systemUserId}
</if>
<if test="conditionParamRef.systemUserId == null">
${_conditionType_} a.systemUserId is null
</if>
</if>
<if test="conditionParamRef.containsKey('systemUserIdList') and conditionParamRef.systemUserIdList.size() > 0">
${_conditionType_} a.systemUserId in
<foreach collection="conditionParamRef.systemUserIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('systemUserIdNotList') and conditionParamRef.systemUserIdNotList.size() > 0">
${_conditionType_} a.systemUserId not in
<foreach collection="conditionParamRef.systemUserIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('systemUserIdStart') and conditionParamRef.systemUserIdStart != null">
${_conditionType_} a.systemUserId <![CDATA[ >= ]]> #{${_conditionParam_}.systemUserIdStart}
</if>
<if test="conditionParamRef.containsKey('systemUserIdEnd') and conditionParamRef.systemUserIdEnd != null">
${_conditionType_} a.systemUserId <![CDATA[ <= ]]> #{${_conditionParam_}.systemUserIdEnd}
</if>
<if test="conditionParamRef.containsKey('systemUserName')">
<if test="conditionParamRef.systemUserName != null and conditionParamRef.systemUserName != ''">
${_conditionType_} a.systemUserName like #{${_conditionParam_}.systemUserName}
</if>
<if test="conditionParamRef.systemUserName == null">
${_conditionType_} a.systemUserName is null
</if>
</if>
<if test="conditionParamRef.containsKey('systemUserNameList') and conditionParamRef.systemUserNameList.size() > 0">
${_conditionType_} a.systemUserName in
<foreach collection="conditionParamRef.systemUserNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('systemUserNameNotList') and conditionParamRef.systemUserNameNotList.size() > 0">
${_conditionType_} a.systemUserName not in
<foreach collection="conditionParamRef.systemUserNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
</sql>
<sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()">
......@@ -799,20 +889,6 @@
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('salaIdList') and conditionParamRef.salaIdList.size() > 0">
field(a.salaId,
<foreach collection="conditionParamRef.salaIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('staffIdList') and conditionParamRef.staffIdList.size() > 0">
field(a.staffId,
<foreach collection="conditionParamRef.staffIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('windowCountList') and conditionParamRef.windowCountList.size() > 0">
field(a.windowCount,
<foreach collection="conditionParamRef.windowCountList" open="" close=")" index="index" item="item" separator=",">
......@@ -834,6 +910,27 @@
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('salaIdList') and conditionParamRef.salaIdList.size() > 0">
field(a.salaId,
<foreach collection="conditionParamRef.salaIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('staffIdList') and conditionParamRef.staffIdList.size() > 0">
field(a.staffId,
<foreach collection="conditionParamRef.staffIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('systemUserIdList') and conditionParamRef.systemUserIdList.size() > 0">
field(a.systemUserId,
<foreach collection="conditionParamRef.systemUserIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<trim suffixOverrides="," suffix="">
<foreach collection="orderColList" open="" close="" index="index" item="item" separator=",">
a.${item.colName} ${item.sortKind}
......@@ -856,20 +953,6 @@
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('salaIdList') and conditionParamRef.salaIdList.size() > 0">
field(a.salaId,
<foreach collection="conditionParamRef.salaIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('staffIdList') and conditionParamRef.staffIdList.size() > 0">
field(a.staffId,
<foreach collection="conditionParamRef.staffIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('windowCountList') and conditionParamRef.windowCountList.size() > 0">
field(a.windowCount,
<foreach collection="conditionParamRef.windowCountList" open="" close=")" index="index" item="item" separator=",">
......@@ -891,6 +974,27 @@
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('salaIdList') and conditionParamRef.salaIdList.size() > 0">
field(a.salaId,
<foreach collection="conditionParamRef.salaIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('staffIdList') and conditionParamRef.staffIdList.size() > 0">
field(a.staffId,
<foreach collection="conditionParamRef.staffIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('systemUserIdList') and conditionParamRef.systemUserIdList.size() > 0">
field(a.systemUserId,
<foreach collection="conditionParamRef.systemUserIdList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<trim suffixOverrides="," suffix="">
<if test="orderCol.containsKey('id')">
a.id
......@@ -907,26 +1011,6 @@
<if test='orderCol.deptName != null and "DESC".equalsIgnoreCase(orderCol.deptName)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('salaId')">
a.salaId
<if test='orderCol.salaId != null and "DESC".equalsIgnoreCase(orderCol.salaId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('salaName')">
a.salaName
<if test='orderCol.salaName != null and "DESC".equalsIgnoreCase(orderCol.salaName)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('staffId')">
a.staffId
<if test='orderCol.staffId != null and "DESC".equalsIgnoreCase(orderCol.staffId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('staffName')">
a.staffName
<if test='orderCol.staffName != null and "DESC".equalsIgnoreCase(orderCol.staffName)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('number')">
a.number
<if test='orderCol.number != null and "DESC".equalsIgnoreCase(orderCol.number)'>DESC</if>
......@@ -967,6 +1051,36 @@
<if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('salaId')">
a.salaId
<if test='orderCol.salaId != null and "DESC".equalsIgnoreCase(orderCol.salaId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('salaName')">
a.salaName
<if test='orderCol.salaName != null and "DESC".equalsIgnoreCase(orderCol.salaName)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('staffId')">
a.staffId
<if test='orderCol.staffId != null and "DESC".equalsIgnoreCase(orderCol.staffId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('staffName')">
a.staffName
<if test='orderCol.staffName != null and "DESC".equalsIgnoreCase(orderCol.staffName)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('systemUserId')">
a.systemUserId
<if test='orderCol.systemUserId != null and "DESC".equalsIgnoreCase(orderCol.systemUserId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('systemUserName')">
a.systemUserName
<if test='orderCol.systemUserName != null and "DESC".equalsIgnoreCase(orderCol.systemUserName)'>DESC</if>
,
</if>
</trim>
</if>
......
......@@ -36,7 +36,26 @@
<result property="createTime" column="createTime" />
<result property="updateUserId" column="updateUserId" />
<result property="updateTime" column="updateTime" />
<collection property="windowWorkmanPerformDetailList" column="id" ofType="WindowWorkmanPerformDetailEntity" javaType="ArrayList" select="getWindowWorkmanPerformDetailByPerformId"></collection>
</resultMap>
<resultMap type="WindowWorkmanPerformDetailEntity" id="WindowWorkmanPerformDetailEntity-Map">
<result property="id" column="id" />
<result property="performId" column="performId" />
<result property="staffId" column="staffId" />
<result property="staffName" column="staffName" />
<result property="discipline" column="discipline" />
<result property="specification" column="specification" />
<result property="management" column="management" />
<result property="evaluation" column="evaluation" />
<result property="efficiency" column="efficiency" />
<result property="bonusScore" column="bonusScore" />
<result property="sumScore" column="sumScore" />
<result property="examineLevel" column="examineLevel" />
<result property="remark" column="remark" />
<result property="createUserId" column="createUserId" />
<result property="createTime" column="createTime" />
<result property="updateUserId" column="updateUserId" />
<result property="updateTime" column="updateTime" />
</resultMap>
......@@ -138,6 +157,12 @@
</if>
</trim>
</sql>
<!-- 子表所有列 -->
<sql id="_columns_sub">
<trim suffixOverrides="," suffix="">
b.id,b.performId,b.staffId,b.staffName,b.discipline,b.specification,b.management,b.evaluation,b.efficiency,b.bonusScore,b.sumScore,b.examineLevel,b.remark,b.createUserId,b.createTime,b.updateUserId,b.updateTime,
</trim>
</sql>
<!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="WindowPerformEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_window_perform
......@@ -654,6 +679,14 @@
</trim>
<include refid="_orderCols_"/>
</select>
<!-- 获取子列表 -->
<select id="getWindowWorkmanPerformDetailByPerformId" parameterType="java.lang.Long" resultMap="WindowWorkmanPerformDetailEntity-Map">
select <include refid="_columns_sub"/>
from mortals_xhx_window_workman_perform_detail as b
<trim suffixOverrides="where" suffix="">
where b.performId = #{id}
</trim>
</select>
......
......@@ -38,8 +38,8 @@ Authorization: {{authToken}}
Content-Type: application/json
{
"attendanceDateStart":"2024-01-01",
"attendanceDateEnd":"2024-01-24"
"attendanceDateStart":"2023-12-01",
"attendanceDateEnd":"2024-01-25"
}
###海康考勤打卡记录计算1
......@@ -62,7 +62,7 @@ Content-Type: application/json
{
"attendanceDateStart":"2023-12-01",
"attendanceDateEnd":"2024-01-24"
"attendanceDateEnd":"2024-01-25"
}
......
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