Commit b1255a14 by Administrator

Merge branch 'lal' into 'develop'

Lal

See merge request 8timerv2/8timerapiv200!91
parents 834c5689 4ad4f63f
...@@ -60,8 +60,11 @@ public class KqglAssoLeaveBalance extends Model<KqglAssoLeaveBalance> { ...@@ -60,8 +60,11 @@ public class KqglAssoLeaveBalance extends Model<KqglAssoLeaveBalance> {
@ApiModelProperty(value = "修改序号 修改序号", example = "101") @ApiModelProperty(value = "修改序号 修改序号", example = "101")
private Integer modifyNumber; private Integer modifyNumber;
@ApiModelProperty(value="企业组织代码 企业组织代码",example="101") @ApiModelProperty(value = "企业组织代码 企业组织代码", example = "101")
private Integer orgCode; private Integer orgCode;
@ApiModelProperty(value = "是否为系统自动 0:否;1:是", example = "101")
private Integer isAutomatic;
} }
\ No newline at end of file
...@@ -47,7 +47,7 @@ public class KqglAssoTeshu extends Model<KqglAssoTeshu> { ...@@ -47,7 +47,7 @@ public class KqglAssoTeshu extends Model<KqglAssoTeshu> {
private Integer bcid; private Integer bcid;
@ApiModelProperty(value = "录入时间 录入时间", example = "101") @ApiModelProperty(value = "录入时间 录入时间", example = "101")
private Integer lusjTime; private Long lusjTime;
@ApiModelProperty(value = "录入人员 录入人员", example = "101") @ApiModelProperty(value = "录入人员 录入人员", example = "101")
private Integer luryid; private Integer luryid;
......
...@@ -44,7 +44,7 @@ import cn.timer.api.utils.ResultUtil; ...@@ -44,7 +44,7 @@ import cn.timer.api.utils.ResultUtil;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
@Api(tags = "3.0考勤打卡") @Api(tags = "3.0[3]考勤打卡")
@RestController @RestController
@Transactional @Transactional
@RequestMapping(value = "/kqdk", produces = { "application/json", "multipart/form-data" }) @RequestMapping(value = "/kqdk", produces = { "application/json", "multipart/form-data" })
......
...@@ -4,15 +4,128 @@ import java.text.DateFormat; ...@@ -4,15 +4,128 @@ import java.text.DateFormat;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar; import java.util.Calendar;
import java.util.Date; import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Locale; import java.util.Locale;
import java.util.Set;
/** /**
* @author Yl123 2020-05-11 * @author Yl123 2020-05-11
* *
*/ */
public class ClockInTool { public class ClockInTool {
static SimpleDateFormat famt = new SimpleDateFormat("yyyy-MM-dd");
/**
* 根据 年、月 获取对应的月份 的 天数
*/
public static int getDaysByYearMonth(int year, int month)
{
Calendar a = Calendar.getInstance();
a.set(Calendar.YEAR, year);
a.set(Calendar.MONTH, month - 1);
a.set(Calendar.DATE, 1);
a.roll(Calendar.DATE, -1);
int maxDate = a.get(Calendar.DATE);
return maxDate;
}
/**
* 获取月份起始日期
*
* @param date
* @return
* @throws ParseException
*/
public static String getMinMonthDate(String date) throws ParseException {
Calendar calendar = Calendar.getInstance();
calendar.setTime(famt.parse(date));
calendar.set(Calendar.DAY_OF_MONTH,
calendar.getActualMinimum(Calendar.DAY_OF_MONTH));
return famt.format(calendar.getTime());
}
/**
* 获取月份最后日期
*
* @param date
* @return
* @throws ParseException
*/
public static String getMaxMonthDate(String date) throws ParseException {
Calendar calendar = Calendar.getInstance();
calendar.setTime(famt.parse(date));
calendar.set(Calendar.DAY_OF_MONTH,
calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
return famt.format(calendar.getTime());
}
/**
* 对比两个字符串数组
* @param t1
* @param t2
* @return
*/
public static <T> List<T> compare(T[] t1, T[] t2) {
List<T> list1 = Arrays.asList(t1); //将t1数组转成list数组
List<T> list2 = new ArrayList<T>();//用来存放2个数组中不相同的元素
for (T t : t2) {
if (!list1.contains(t)) {
list2.add(t);
}
}
return list2;
}
public static String[] array_unique(String[] ss) {
Set<String> set=new HashSet<String>(Arrays.asList(ss));
return set.toArray(new String[set.size()]);
//或者return new HashSet<String>(Arrays.asList(ss)).toArray(new String[0]);
}
public static byte[] CreateBSCommBufferFromString(String sCmdParam,byte[] bytCmd) {
try{
if (sCmdParam.length() == 0){
return bytCmd;
}
byte[] bytText = sCmdParam.getBytes("UTF-8");
byte[] bytTextLen = int2byte(bytText.length + 1);
bytCmd=new byte[4 + bytText.length + 1];
System.arraycopy(bytTextLen,0,bytCmd,0,bytTextLen.length);
System.arraycopy(bytText,0,bytCmd,4,bytText.length);
bytCmd[4 + bytText.length] = 0;
return bytCmd;
}catch(Exception e){
e.printStackTrace();
bytCmd=new byte[0];
return bytCmd;
}
}
public static byte[] int2byte(int res) {
byte[] targets = new byte[4];
targets[0] = (byte) (res & 0xff);
targets[1] = (byte) ((res >> 8) & 0xff);
targets[2] = (byte) ((res >> 16) & 0xff);
targets[3] = (byte) (res >>> 24);
return targets;
}
public static byte[] ConcateByteArray(byte[] abytDest, byte[] abytSrc) {
int len_dest = abytDest.length + abytSrc.length;
if (abytSrc.length == 0)
return abytDest;
byte[] bytTmp = new byte[len_dest];
System.arraycopy(abytDest, 0, bytTmp, 0, abytDest.length);
System.arraycopy(abytSrc, 0, bytTmp, abytDest.length, abytSrc.length);
return bytTmp;
}
public static String dateToWeek2(String datetime) { public static String dateToWeek2(String datetime) {
......
package cn.timer.api.dao.kqmk; package cn.timer.api.dao.kqmk;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import java.util.List;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.bean.kqmk.KqglAssoBcsz; import cn.timer.api.bean.kqmk.KqglAssoBcsz;
import cn.timer.api.dto.kqmk.KqzAttendanceGroupSearchDto;
/** /**
...@@ -17,4 +19,6 @@ public interface KqglAssoBcszMapper extends BaseMapper<KqglAssoBcsz> { ...@@ -17,4 +19,6 @@ public interface KqglAssoBcszMapper extends BaseMapper<KqglAssoBcsz> {
int insert(KqglAssoBcsz kqglassobcsz); int insert(KqglAssoBcsz kqglassobcsz);
int update(KqglAssoBcsz kqglassobcsz); int update(KqglAssoBcsz kqglassobcsz);
List<KqglAssoBcsz> selectRosterByKqzid(KqzAttendanceGroupSearchDto kqzattendancegroupsearchdto);
} }
package cn.timer.api.dao.kqmk; package cn.timer.api.dao.kqmk;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import java.util.List;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import cn.timer.api.bean.kqmk.KqglAssoKqzdkfs; import cn.timer.api.bean.kqmk.KqglAssoKqzdkfs;
...@@ -12,5 +15,7 @@ import cn.timer.api.bean.kqmk.KqglAssoKqzdkfs; ...@@ -12,5 +15,7 @@ import cn.timer.api.bean.kqmk.KqglAssoKqzdkfs;
*/ */
@Repository @Repository
public interface KqglAssoKqzdkfsMapper extends BaseMapper<KqglAssoKqzdkfs> { public interface KqglAssoKqzdkfsMapper extends BaseMapper<KqglAssoKqzdkfs> {
int insertKqglAssokqzdKfsList(List<KqglAssoKqzdkfs> kqglassokqzdkfs);
} }
package cn.timer.api.dao.kqmk; package cn.timer.api.dao.kqmk;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import cn.timer.api.bean.kqmk.KqglAssoLeaveBalance; import cn.timer.api.bean.kqmk.KqglAssoLeaveBalance;
import cn.timer.api.dto.kqmk.AttqueryCriteriaDto;
import cn.timer.api.dto.kqmk.EmployeeLeaveBalanceDto;
/** /**
* 员工假期余额 * 员工假期余额
...@@ -12,5 +17,6 @@ import cn.timer.api.bean.kqmk.KqglAssoLeaveBalance; ...@@ -12,5 +17,6 @@ import cn.timer.api.bean.kqmk.KqglAssoLeaveBalance;
*/ */
@Repository @Repository
public interface KqglAssoLeaveBalanceMapper extends BaseMapper<KqglAssoLeaveBalance> { public interface KqglAssoLeaveBalanceMapper extends BaseMapper<KqglAssoLeaveBalance> {
IPage<EmployeeLeaveBalanceDto> selectPageByQueryLeaveBalance(IPage<EmployeeLeaveBalanceDto> page,@Param("param") AttqueryCriteriaDto attquerycriteriadto);
} }
package cn.timer.api.dao.kqmk; package cn.timer.api.dao.kqmk;
import java.util.List;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.bean.kqmk.KqglAssoPbmx; import cn.timer.api.bean.kqmk.KqglAssoPbmx;
import cn.timer.api.dto.kqmk.AttSchedulingDto;
import cn.timer.api.dto.kqmk.KqglAssoPbmxDto; import cn.timer.api.dto.kqmk.KqglAssoPbmxDto;
/** /**
...@@ -16,4 +19,8 @@ import cn.timer.api.dto.kqmk.KqglAssoPbmxDto; ...@@ -16,4 +19,8 @@ import cn.timer.api.dto.kqmk.KqglAssoPbmxDto;
public interface KqglAssoPbmxMapper extends BaseMapper<KqglAssoPbmx> { public interface KqglAssoPbmxMapper extends BaseMapper<KqglAssoPbmx> {
KqglAssoPbmxDto getScheduleSpecificAttendance(Integer kqzid, Integer userid, String date); KqglAssoPbmxDto getScheduleSpecificAttendance(Integer kqzid, Integer userid, String date);
int insertKqglAssoPbmxList(List<KqglAssoPbmxDto> kqglassopbmxdto);
List<KqglAssoPbmxDto> selectAttGroupScheduling(AttSchedulingDto attschedulingdto);
} }
package cn.timer.api.dao.kqmk; package cn.timer.api.dao.kqmk;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import java.util.List;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.bean.kqmk.KqglAssoTeshu; import cn.timer.api.bean.kqmk.KqglAssoTeshu;
/** /**
...@@ -12,5 +15,7 @@ import cn.timer.api.bean.kqmk.KqglAssoTeshu; ...@@ -12,5 +15,7 @@ import cn.timer.api.bean.kqmk.KqglAssoTeshu;
*/ */
@Repository @Repository
public interface KqglAssoTeshuMapper extends BaseMapper<KqglAssoTeshu> { public interface KqglAssoTeshuMapper extends BaseMapper<KqglAssoTeshu> {
int insertKqglAssoTeshuList(List<KqglAssoTeshu> kqglassoteshu);
} }
package cn.timer.api.dao.kqmk; package cn.timer.api.dao.kqmk;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import java.util.List;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.bean.kqmk.KqglAssoYhkqz; import cn.timer.api.bean.kqmk.KqglAssoYhkqz;
/** /**
...@@ -12,5 +15,6 @@ import cn.timer.api.bean.kqmk.KqglAssoYhkqz; ...@@ -12,5 +15,6 @@ import cn.timer.api.bean.kqmk.KqglAssoYhkqz;
*/ */
@Repository @Repository
public interface KqglAssoYhkqzMapper extends BaseMapper<KqglAssoYhkqz> { public interface KqglAssoYhkqzMapper extends BaseMapper<KqglAssoYhkqz> {
int insertKqglAssoKqzdkfsList(List<KqglAssoYhkqz> kqglassoyhkqz);
} }
package cn.timer.api.dao.kqmk; package cn.timer.api.dao.kqmk;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import java.util.List;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.bean.kqmk.KqglAssoZhoupaiban; import cn.timer.api.bean.kqmk.KqglAssoZhoupaiban;
/** /**
...@@ -12,5 +15,6 @@ import cn.timer.api.bean.kqmk.KqglAssoZhoupaiban; ...@@ -12,5 +15,6 @@ import cn.timer.api.bean.kqmk.KqglAssoZhoupaiban;
*/ */
@Repository @Repository
public interface KqglAssoZhoupaibanMapper extends BaseMapper<KqglAssoZhoupaiban> { public interface KqglAssoZhoupaibanMapper extends BaseMapper<KqglAssoZhoupaiban> {
int insertKqglAssoZhoupaibanList(List<KqglAssoZhoupaiban> kqglassozhoupaiban);
} }
package cn.timer.api.dto.kqmk;
import java.io.Serializable;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class AttSchedulingDto implements Serializable{
private static final long serialVersionUID = 5519260557957197035L;
private Integer qyid;
private String date;
private Integer kqzid;
}
package cn.timer.api.dto.kqmk;
import java.io.Serializable;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class AttendanceAssistantDto implements Serializable{
private static final long serialVersionUID = -3561517817976805144L;
String name;// 考勤组名称 *
String remarks;// 备注 *
String[] attmachines;// 考勤机
String[] attadds;// 办公地点考勤
String[] attwifis;// WiFi考勤
String[] attuserids;// 考勤成员
int atttype;// 考勤类型:1-固定排班、2-排班制、3-自由工时 *
int legalholidays;// 是否开启法定节假日:0-否、1-是 *
String[] attWeekdays;// 周工作日【固定排班】
String[] attWeekdaysShifts;// 周工作日班次【固定排班】
String[] attMustPunchData;// 必须打卡的日期【固定排班】
String[] attMustPunchShifid;// 必须打卡的班次id【固定排班】
String[] attNonPunchData;// 不用打卡的日期【固定排班】
String[] attShifts;// 排班制 选择的班次【排班制】
int attRemind;// 是否开启提醒:0-否、1-是【排班制】
String[] attRemindUserids;// 提醒人员【排班制】
int advanceDays;// 提前多少天数提醒【排班制】
int remCycleDays;// 提醒循环天数【排班制】
String reminderTime;// 提醒时间【排班制】
String[] promptingMode;// 提醒方式:PC端、APP客户端、短信、邮件【排班制】
KqglAssoPbmxDto[] schedules;// 排班日期【排班制】--班次id、日期
// SchedulesUserids[] schedulesUserids;// 排班【排班制】----用户id
int optscheduling;// 未排班时,员工可选择班次打卡
String newAttTime;// 每天几点开始新的考勤【自由工时】
String[] attFreeWorkdays;// 周工作日【自由工时】
String leastworkTime;// 至少需工作时间【自由工时】
String normalWorkTime;// 正常工作时长【自由工时】
String maxOvertimeTime;// 加班最大时长【自由工时】
String attgroupid;
int overtimeRulesId;//加班id
int fieldpersonnel;//外勤
}
package cn.timer.api.dto.kqmk;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class BalanceSheetDataDto {
@ApiModelProperty(value = "假期规则id", example = "字段说明")
private Integer leaverulesid;
@ApiModelProperty(value = "余额天数 ", example = "字段说明")
private Integer balancedays;
}
package cn.timer.api.dto.kqmk;
import java.util.List;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class EmployeeLeaveBalanceDto {
@ApiModelProperty(value = "员工工号 ", example = "字段说明")
private Integer empnum;
@ApiModelProperty(value = "员工名称 ", example = "字段说明")
private String empname;
@ApiModelProperty(value = "部门 ", example = "字段说明")
private String department;
@ApiModelProperty(value = "入职日期 ", example = "字段说明")
private String rztime;
@ApiModelProperty(value = "表数据", example = "字段说明")
List<BalanceSheetDataDto> balanceTo;
}
package cn.timer.api.dto.kqmk;
import java.io.Serializable;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class KqzAttendanceGroupSearchDto implements Serializable {
private static final long serialVersionUID = 4927912739465404926L;
private String overall;
private Integer qyid;
}
package cn.timer.api.dto.kqmk;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SetConditionsDto {
private Integer id;
private Integer parameters;
}
...@@ -147,6 +147,17 @@ ...@@ -147,6 +147,17 @@
luryid KqglAssoBcsz_luryid luryid KqglAssoBcsz_luryid
</sql> </sql>
<select id="selectRosterByKqzid" resultMap="BaseResultMap">
select bcsz.* from kqgl_asso_bcsz bcsz
where bcsz.id in (
select pbmx.bcid from kqgl_asso_pbmx pbmx
where pbmx.kqzid = #{qyid,jdbcType=INTEGER}
<if test="overall != null" >
and SUBSTR(pbmx.`data`,1,7) = #{overall,jdbcType=VARCHAR}
</if>
GROUP BY pbmx.bcid
)
</select>
<insert id="insert" useGeneratedKeys="true" keyProperty="id" parameterType="cn.timer.api.bean.kqmk.KqglAssoBcsz"> <insert id="insert" useGeneratedKeys="true" keyProperty="id" parameterType="cn.timer.api.bean.kqmk.KqglAssoBcsz">
......
...@@ -29,6 +29,29 @@ ...@@ -29,6 +29,29 @@
qyid KqglAssoKqzdkfs_qyid, qyid KqglAssoKqzdkfs_qyid,
state KqglAssoKqzdkfs_state state KqglAssoKqzdkfs_state
</sql> </sql>
<insert id="insertKqglAssokqzdKfsList" parameterType="java.util.List" >
insert into kqgl_asso_kqzdkfs (dkfsid, kqz_id, type, qyid, state)
<foreach collection="list" item="item" index="index" open="values " close="" separator=",">
(
<if test="item.dkfsid != null" >
#{item.dkfsid,jdbcType=INTEGER},
</if>
<if test="item.kqzId != null" >
#{item.kqzId,jdbcType=INTEGER},
</if>
<if test="item.type != null" >
#{item.type,jdbcType=INTEGER},
</if>
<if test="item.qyid != null" >
#{item.qyid,jdbcType=INTEGER},
</if>
<if test="item.state != null" >
#{item.state,jdbcType=INTEGER}
</if>
)
</foreach>
</insert>
<!-- <!--
......
...@@ -14,6 +14,18 @@ ...@@ -14,6 +14,18 @@
<result column="modify_timer" property="modifyTimer" /> <result column="modify_timer" property="modifyTimer" />
<result column="modify_number" property="modifyNumber" /> <result column="modify_number" property="modifyNumber" />
<result column="org_code" property="orgCode" /> <result column="org_code" property="orgCode" />
<result column="is_automatic" property="isAutomatic" />
</resultMap>
<resultMap id="LeaveBalanceMap" type="cn.timer.api.dto.kqmk.EmployeeLeaveBalanceDto" >
<result column="empnum" property="empnum" />
<result column="empname" property="empname" />
<result column="department" property="department" />
<result column="rztime" property="rztime" />
<collection property="balanceTo" ofType="cn.timer.api.dto.kqmk.BalanceSheetDataDto">
<result column="leaverulesid" property="leaverulesid"/>
<result column="balancedays" property="balancedays"/>
</collection>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
...@@ -26,7 +38,8 @@ ...@@ -26,7 +38,8 @@
modify_userid, modify_userid,
modify_timer, modify_timer,
modify_number, modify_number,
org_code org_code,
is_automatic
</sql> </sql>
<sql id="Base_Column_List_Alias"> <sql id="Base_Column_List_Alias">
...@@ -39,8 +52,32 @@ ...@@ -39,8 +52,32 @@
modify_userid KqglAssoLeaveBalance_modify_userid, modify_userid KqglAssoLeaveBalance_modify_userid,
modify_timer KqglAssoLeaveBalance_modify_timer, modify_timer KqglAssoLeaveBalance_modify_timer,
modify_number KqglAssoLeaveBalance_modify_number, modify_number KqglAssoLeaveBalance_modify_number,
org_code KqglAssoLeaveBalance_org_code org_code KqglAssoLeaveBalance_org_code,
is_automatic KqglAssoLeaveBalance_is_automatic
</sql> </sql>
<select id="selectPageByQueryLeaveBalance" resultMap="LeaveBalanceMap">
SELECT emp.emp_num as empnum,
emp.`name` as empname,
IFNULL(c.name,'') as department,
IFNULL(emp.rz_time,'') as rztime,
yz.leave_rules_id as leaverulesid,
yz.balancedays
from yggl_main_emp emp
LEFT JOIN zzgl_bmgw_m as gw on gw.id = emp.bmgw_id
LEFT JOIN zzgl_bmgw_m as c ON c.id = gw.up_id
LEFT JOIN (select bal.leave_rules_id,bal.userid,SUM(bal.balance_days) as balancedays
from kqgl_asso_leave_balance bal
where bal.org_code = #{param.orgCode}
GROUP BY bal.userid,bal.leave_rules_id) as yz on yz.userid = emp.emp_num
where emp.org_code = #{param.orgCode}
<if test="param.query != null and param.query != ''">
and ( emp.`name` like CONCAT('%',#{param.query},'%') or
emp.emp_num like CONCAT('%',#{param.query},'%') or
c.name like CONCAT('%',#{param.query},'%'))
</if>
ORDER BY emp.emp_num DESC
</select>
<!-- <!--
...@@ -72,7 +109,10 @@ ...@@ -72,7 +109,10 @@
modify_number, modify_number,
</if> </if>
<if test ='null != orgCode'> <if test ='null != orgCode'>
org_code org_code,
</if>
<if test ='null != isAutomatic'>
is_automatic
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
...@@ -101,7 +141,10 @@ ...@@ -101,7 +141,10 @@
#{modifyNumber}, #{modifyNumber},
</if> </if>
<if test ='null != orgCode'> <if test ='null != orgCode'>
#{orgCode} #{orgCode},
</if>
<if test ='null != isAutomatic'>
#{isAutomatic}
</if> </if>
</trim> </trim>
</insert> </insert>
...@@ -122,7 +165,8 @@ ...@@ -122,7 +165,8 @@
<if test ='null != modifyUserid'>modify_userid = #{modifyUserid},</if> <if test ='null != modifyUserid'>modify_userid = #{modifyUserid},</if>
<if test ='null != modifyTimer'>modify_timer = #{modifyTimer},</if> <if test ='null != modifyTimer'>modify_timer = #{modifyTimer},</if>
<if test ='null != modifyNumber'>modify_number = #{modifyNumber},</if> <if test ='null != modifyNumber'>modify_number = #{modifyNumber},</if>
<if test ='null != orgCode'>org_code = #{orgCode}</if> <if test ='null != orgCode'>org_code = #{orgCode},</if>
<if test ='null != isAutomatic'>is_automatic = #{isAutomatic}</if>
</set> </set>
WHERE id = #{id} WHERE id = #{id}
</update> </update>
......
...@@ -93,7 +93,42 @@ ...@@ -93,7 +93,42 @@
and pbmx.userid = #{userid} and pbmx.userid = #{userid}
and pbmx.`data` = #{date} and pbmx.`data` = #{date}
</select> </select>
<insert id="insertKqglAssoPbmxList" parameterType="java.util.List" >
insert into kqgl_asso_pbmx (userid, data, bcid, kqzid)
<foreach collection="list" item="item" index="index" open="values " close="" separator=",">
(
<if test="item.userid != null" >
#{item.userid,jdbcType=INTEGER},
</if>
<if test="item.data != null" >
#{item.data,jdbcType=DATE},
</if>
<if test="item.bcid != null" >
#{item.bcid,jdbcType=INTEGER},
</if>
<if test="item.kqzid != null" >
#{item.kqzid,jdbcType=INTEGER}
</if>
)
</foreach>
</insert>
<select id="selectAttGroupScheduling" resultMap="AssoPbmxMap">
select pbmx.*,
info.`name` as username,
bcsz.`name` bcname,
SUBSTR(pbmx.`data`,1,7) as yemo,
SUBSTR(pbmx.`data`,9,10) as xsrq
from kqgl_asso_pbmx pbmx
LEFT JOIN yggl_main_emp as info on info.emp_num = pbmx.userid
LEFT JOIN kqgl_asso_bcsz as bcsz on bcsz.id = pbmx.bcid
where info.org_code = #{qyid,jdbcType=INTEGER}
<if test="date != null" >
and SUBSTR(pbmx.`data`,1,7) = #{date,jdbcType=VARCHAR}
</if>
and pbmx.kqzid = #{kqzid,jdbcType=INTEGER}
</select>
<!-- <!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglAssoPbmx"> <insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglAssoPbmx">
......
...@@ -33,6 +33,31 @@ ...@@ -33,6 +33,31 @@
type KqglAssoTeshu_type type KqglAssoTeshu_type
</sql> </sql>
<insert id="insertKqglAssoTeshuList" parameterType="java.util.List" >
insert into kqgl_asso_teshu (kqzid, tsrq, bcid, lusj_time, luryid, type)
<foreach collection="list" item="item" index="index" open="values " close="" separator=",">
(
<if test="item.kqzid != null" >
#{item.kqzid,jdbcType=INTEGER},
</if>
<if test="item.tsrq != null" >
#{item.tsrq,jdbcType=VARCHAR},
</if>
<if test="item.bcid != null" >
#{item.bcid,jdbcType=INTEGER},
</if>
<if test="item.lusjTime != null" >
#{item.lusjTime,jdbcType=BIGINT},
</if>
<if test="item.luryid != null" >
#{item.luryid,jdbcType=INTEGER},
</if>
<if test="item.type != null" >
#{item.type,jdbcType=INTEGER}
</if>
)
</foreach>
</insert>
<!-- <!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglAssoTeshu"> <insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglAssoTeshu">
......
...@@ -24,6 +24,22 @@ ...@@ -24,6 +24,22 @@
qyid KqglAssoYhkqz_qyid qyid KqglAssoYhkqz_qyid
</sql> </sql>
<insert id="insertKqglAssoKqzdkfsList" parameterType="java.util.List" >
insert into kqgl_asso_yhkqz (kqzid, userid, qyid)
<foreach collection="list" item="item" index="index" open="values " close="" separator=",">
(
<if test="item.kqzid != null" >
#{item.kqzid,jdbcType=INTEGER},
</if>
<if test="item.userid != null" >
#{item.userid,jdbcType=INTEGER},
</if>
<if test="item.qyid != null" >
#{item.qyid,jdbcType=INTEGER}
</if>
)
</foreach>
</insert>
<!-- <!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglAssoYhkqz"> <insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglAssoYhkqz">
......
...@@ -23,6 +23,23 @@ ...@@ -23,6 +23,23 @@
type KqglAssoZhoupaiban_type, type KqglAssoZhoupaiban_type,
bcid KqglAssoZhoupaiban_bcid bcid KqglAssoZhoupaiban_bcid
</sql> </sql>
<insert id="insertKqglAssoZhoupaibanList" parameterType="java.util.List" >
insert into kqgl_asso_zhoupaiban (kqzid, type, bcid)
<foreach collection="list" item="item" index="index" open="values " close="" separator=",">
(
<if test="item.kqzid != null" >
#{item.kqzid,jdbcType=INTEGER},
</if>
<if test="item.type != null" >
#{item.type,jdbcType=INTEGER},
</if>
<if test="item.bcid != null" >
#{item.bcid,jdbcType=INTEGER}
</if>
)
</foreach>
</insert>
<!-- <!--
......
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