Commit 41a0b8c9 by Administrator

Merge branch 'develop' into 'master'

Develop

See merge request 8timerv2/8timerapiv200!534
parents b30c8dc7 93ddc272
...@@ -80,4 +80,7 @@ public class SbgjjAssoDetailed extends Model<SbgjjAssoDetailed> { ...@@ -80,4 +80,7 @@ public class SbgjjAssoDetailed extends Model<SbgjjAssoDetailed> {
@ApiModelProperty(value = "公积金基数 ", example = "公积金基数") @ApiModelProperty(value = "公积金基数 ", example = "公积金基数")
private String gjjjss; private String gjjjss;
@ApiModelProperty(value = "参保人员id ", example = "参保人员id")
private Integer cbryid;
} }
\ No newline at end of file
...@@ -62,7 +62,7 @@ public class XcglAssoXzdadx extends Model<XcglAssoXzdadx> { ...@@ -62,7 +62,7 @@ public class XcglAssoXzdadx extends Model<XcglAssoXzdadx> {
@ApiModelProperty(value="企业id",example="117") @ApiModelProperty(value="企业id",example="117")
private Integer qyid; private Integer qyid;
@ApiModelProperty(value="使用状态(0:使用中;1:历史)",example="0") @ApiModelProperty(value="使用状态(0:使用中;1:历史, 2: 未生效)",example="0")
private Integer txzt; private Integer txzt;
......
...@@ -1702,16 +1702,28 @@ public class TimeCardController { ...@@ -1702,16 +1702,28 @@ public class TimeCardController {
/** /**
* 考勤原始记录-根据 模糊 + 高級查詢-分页 * 考勤原始记录-根据 模糊 + 高級查詢-分页
* @throws ParseException
*/ */
@PostMapping(value = "/attendancecalendar") @PostMapping(value = "/attendancecalendar")
@ApiOperation(value = "考勤原始记录-根据 模糊 + 高級查詢-分页", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "考勤原始记录-根据 模糊 + 高級查詢-分页", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 34) @ApiOperationSupport(order = 34)
public Result<Object> AttendanceCalendar(@CurrentUser UserBean userBean, @Validated @RequestBody OriginalRecordDto originalrecorddto){ public Result<Object> AttendanceCalendar(@CurrentUser UserBean userBean, @Validated @RequestBody OriginalRecordDto originalrecorddto) throws ParseException{
IPage<PunchRecord> page = new Page<PunchRecord>( IPage<PunchRecord> page = new Page<PunchRecord>(
originalrecorddto.getCurrentPage() == null ? 1 : originalrecorddto.getCurrentPage(), originalrecorddto.getCurrentPage() == null ? 1 : originalrecorddto.getCurrentPage(),
originalrecorddto.getTotalPage() == null ? 10 : originalrecorddto.getTotalPage()); originalrecorddto.getTotalPage() == null ? 10 : originalrecorddto.getTotalPage());
originalrecorddto.setQyid(userBean.getOrgCode()); originalrecorddto.setQyid(userBean.getOrgCode());
if(!originalrecorddto.getStart().equals("") && !originalrecorddto.getEnd().equals("") && originalrecorddto.getStart() != null && originalrecorddto.getEnd() != null) {
String sdaet = originalrecorddto.getStart() + " 00:00:00";
String staapptime = ClockInTool.dateToStamp(sdaet);
originalrecorddto.setStart(staapptime);
String edate = originalrecorddto.getEnd() + " 23:59:59";
String endapptime = ClockInTool.dateToStamp(edate);
originalrecorddto.setEnd(endapptime);
}
IPage<PunchRecord> pageAs = punchrecordmapper.QueryOriginalRecord(page, originalrecorddto); IPage<PunchRecord> pageAs = punchrecordmapper.QueryOriginalRecord(page, originalrecorddto);
List<PunchRecord> listAs = pageAs.getRecords(); List<PunchRecord> listAs = pageAs.getRecords();
...@@ -1719,6 +1731,28 @@ public class TimeCardController { ...@@ -1719,6 +1731,28 @@ public class TimeCardController {
} }
@PostMapping(value = "/exportattendancecalendar")
@ApiOperation(value = "", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 34)
public Result<Object> exportattendancecalendar(@CurrentUser UserBean userBean, @Validated @RequestBody OriginalRecordDto originalrecorddto) throws ParseException{
originalrecorddto.setQyid(userBean.getOrgCode());
if(!originalrecorddto.getStart().equals("") && !originalrecorddto.getEnd().equals("") && originalrecorddto.getStart() != null && originalrecorddto.getEnd() != null) {
String sdaet = originalrecorddto.getStart() + " 00:00:00";
String staapptime = ClockInTool.dateToStamp(sdaet);
originalrecorddto.setStart(staapptime);
String edate = originalrecorddto.getEnd() + " 23:59:59";
String endapptime = ClockInTool.dateToStamp(edate);
originalrecorddto.setEnd(endapptime);
}
List<PunchRecord> listAs = punchrecordmapper.exportQueryOriginalRecord(originalrecorddto);
return ResultUtil.data(listAs,"操作成功!");
}
/** /**
* 获取考勤组所需加班规则 * 获取考勤组所需加班规则
*/ */
......
package cn.timer.api.controller.xcgl.atttimer;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Locale;
import cn.hutool.core.collection.CollectionUtil;
import cn.timer.api.bean.xcgl.XcglAssoXzdadx;
import cn.timer.api.bean.xcgl.XcglAssoXzdaz;
import cn.timer.api.dao.xcgl.XcglAssoXzdadxMapper;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.timer.api.bean.kqgl.AttendanceWeeklySch;
import cn.timer.api.bean.kqgl.PunchCardDetails;
import cn.timer.api.bean.kqgl.PunchRecord;
import cn.timer.api.bean.kqgl.Schedule;
import cn.timer.api.bean.kqmk.KqglAssoBcsz;
import cn.timer.api.bean.kqmk.KqglAssoDkmx;
import cn.timer.api.bean.kqmk.KqglAssoLeaveRules;
import cn.timer.api.bean.kqmk.KqglAssoMonthPunchSummary;
import cn.timer.api.bean.kqmk.KqglAssoOvertimeBasics;
import cn.timer.api.bean.kqmk.KqglAssoPbmx;
import cn.timer.api.bean.kqmk.KqglAssoRelationSummary;
import cn.timer.api.bean.kqmk.KqglAssoTeshu;
import cn.timer.api.bean.kqmk.KqglAssoZhoupaiban;
import cn.timer.api.bean.kqmk.KqglMainKqz;
import cn.timer.api.bean.kqmk.KqmkRedletterDay;
import cn.timer.api.bean.qyzx.QyzxEntInfoM;
import cn.timer.api.bean.yggl.YgglMainLzb;
import cn.timer.api.controller.kqgl.ClockInController;
import cn.timer.api.controller.kqgl.ClockInTool;
import cn.timer.api.controller.kqgl.EmptyUtil;
import cn.timer.api.dao.kqgl.AttendanceWeeklySchMapper;
import cn.timer.api.dao.kqgl.PunchCardDetailsMapper;
import cn.timer.api.dao.kqgl.PunchRecordMapper;
import cn.timer.api.dao.kqgl.ScheduleMapper;
import cn.timer.api.dao.kqmk.KqglAssoDkmxMapper;
import cn.timer.api.dao.kqmk.KqglAssoLeaveBalanceMapper;
import cn.timer.api.dao.kqmk.KqglAssoRelationSummaryMapper;
import cn.timer.api.dao.kqmk.KqglAssoTeshuMapper;
import cn.timer.api.dao.kqmk.KqglMainKqzMapper;
import cn.timer.api.dao.qyzx.QyzxEntInfoMMapper;
import cn.timer.api.dto.kqmk.AdditionalDto;
import cn.timer.api.dto.kqmk.AttSchedule;
import cn.timer.api.dto.kqmk.AttSubsidiaryDto;
import cn.timer.api.dto.kqmk.AttendanceCardListDto;
import cn.timer.api.utils.DateUtil;
import javax.annotation.Resource;
/**
* 调薪记录生效定时任务
*/
//@Component
//@Lazy
@Configuration //1.主要用于标记配置类,兼备Component的效果。
@EnableScheduling // 2.开启定时任务
public class SalaryTaskTiming{
// 薪酬管理-定薪
@Resource
private XcglAssoXzdadxMapper xcglassoxzdadxmapper;
//3.添加定时任务 每天凌晨1点执行一次
@Scheduled(cron = "0 0 1 * * ?")
public void AttendanceTask() throws ParseException {
// 使用状态(0:使用中;1:历史, 2: 未生效)
// 当前日期
String curDate = DateUtil.getStringFormat(new Date().getTime());
// 获取小于等于当前日期的未生效数据
List<XcglAssoXzdadx> xzdxlist = xcglassoxzdadxmapper.listIneffective(curDate);
if (CollectionUtil.isNotEmpty(xzdxlist)) {
xzdxlist.forEach(o -> {
// 将使用中的薪资数据置为历史
XcglAssoXzdadx dadxUsed = new LambdaQueryChainWrapper<XcglAssoXzdadx>(xcglassoxzdadxmapper)
.eq(XcglAssoXzdadx::getUserid, o.getUserid())
.eq(XcglAssoXzdadx::getTxzt, 0).one();
dadxUsed.setTxzt(1);
xcglassoxzdadxmapper.updateById(dadxUsed);
// 将未生效的薪资数据置为使用中
o.setTxzt(0);
xcglassoxzdadxmapper.updateById(o);
});
}
// 处理出现多个使用中的错误数据, list 按工号、生效日期升序
List<XcglAssoXzdadx> listRepeat = xcglassoxzdadxmapper.listRepeatUsed();
if (CollectionUtil.isNotEmpty(listRepeat)) {
for (int i = 0; i < listRepeat.size(); i++) {
XcglAssoXzdadx xzdadx = listRepeat.get(i);
while ((i +1) <listRepeat.size()
&& xzdadx.getUserid().equals(listRepeat.get(i +1).getUserid())) {
xzdadx.setTxzt(1);
xcglassoxzdadxmapper.updateById(xzdadx);
xzdadx = listRepeat.get(i +1);
i = i + 1;
}
}
}
}
}
...@@ -41,5 +41,7 @@ public interface PunchRecordMapper { ...@@ -41,5 +41,7 @@ public interface PunchRecordMapper {
IPage<PunchRecord> QueryOriginalRecord(IPage<PunchRecord> page,@Param("param") OriginalRecordDto originalrecorddto); IPage<PunchRecord> QueryOriginalRecord(IPage<PunchRecord> page,@Param("param") OriginalRecordDto originalrecorddto);
List<PunchRecord> exportQueryOriginalRecord(@Param("param") OriginalRecordDto originalrecorddto);
PunchRecord organizationalStructure(int id); PunchRecord organizationalStructure(int id);
} }
\ No newline at end of file
...@@ -2,6 +2,7 @@ package cn.timer.api.dao.xcgl; ...@@ -2,6 +2,7 @@ package cn.timer.api.dao.xcgl;
import java.util.List; import java.util.List;
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.mapper.BaseMapper;
...@@ -16,4 +17,14 @@ public interface XcglAssoXzdadxMapper extends BaseMapper<XcglAssoXzdadx> { ...@@ -16,4 +17,14 @@ public interface XcglAssoXzdadxMapper extends BaseMapper<XcglAssoXzdadx> {
int xzdadxinsert(XcglAssoXzdadx xcglassoxzdadx); int xzdadxinsert(XcglAssoXzdadx xcglassoxzdadx);
int insertxcglassoxzdadxList(List<XcglAssoXzdadx> xcglassoxzdadx); int insertxcglassoxzdadxList(List<XcglAssoXzdadx> xcglassoxzdadx);
/**
* 获取小于等于当前日期的未生效数据 yyyy-mm-dd
*/
List<XcglAssoXzdadx> listIneffective(@Param("curDate") String curDate);
/**
* 获取使用中多于1条数据的记录
*/
List<XcglAssoXzdadx> listRepeatUsed();
} }
...@@ -25,7 +25,8 @@ public interface XcglAssoXzdazdyMapper extends BaseMapper<XcglAssoXzdazdy> { ...@@ -25,7 +25,8 @@ public interface XcglAssoXzdazdyMapper extends BaseMapper<XcglAssoXzdazdy> {
int dazdyupdate(XcglAssoXzdazdy xcglassoxzdazdy); int dazdyupdate(XcglAssoXzdazdy xcglassoxzdazdy);
IPage<FixedSalaryStaffDto> selectFixedSalaryStaff(IPage<FixedSalaryStaffDto> page, @Param("param")SearchSalariedPeopleDto search); long selectFixedSalaryStaffCount(@Param("param")SearchSalariedPeopleDto search);
List<FixedSalaryStaffDto> selectFixedSalaryStaff(@Param("param")SearchSalariedPeopleDto search);
List<ChangeSalaryDto> AchieveSalaryAdjustment(Integer orgcode,Integer empnum); List<ChangeSalaryDto> AchieveSalaryAdjustment(Integer orgcode,Integer empnum);
......
...@@ -15,6 +15,6 @@ public class CustomDto implements Serializable { ...@@ -15,6 +15,6 @@ public class CustomDto implements Serializable {
*/ */
private static final long serialVersionUID = -7594521197951361545L; private static final long serialVersionUID = -7594521197951361545L;
Integer id;// 薪资档案自定义id Integer id;// 记录id
String val;// 输入值 String val;// 输入值
} }
...@@ -27,7 +27,9 @@ public class FixedSalaryStaffDto implements Serializable { ...@@ -27,7 +27,9 @@ public class FixedSalaryStaffDto implements Serializable {
String empzztime;// 转正日期 String empzztime;// 转正日期
int sfdx;//是否定薪 0:无;1:有 int sfdx;//是否定薪 0:无;1:有
String tratime;//调薪日期 String tratime;//调薪日期
Integer txzt; //使用状态 0:使用中;1:历史, 2 未生效
int id; int id;
String remarks; //备注
List<DefinedItemsDto> defdto = new ArrayList<DefinedItemsDto>(); List<DefinedItemsDto> defdto = new ArrayList<DefinedItemsDto>();
} }
...@@ -15,7 +15,8 @@ public class FixedsalaryDto implements Serializable { ...@@ -15,7 +15,8 @@ public class FixedsalaryDto implements Serializable {
*/ */
private static final long serialVersionUID = 2239288307511437403L; private static final long serialVersionUID = 2239288307511437403L;
CustomDto[] cus;// 自定义输入值 CustomDto[] cus;// 自定义输入值
String id;// 用户工号 String userid;// 用户工号
String remarks;// 备注 String remarks;// 备注
String sxrq;// 生效日期 String sxrq;// 生效日期
Integer id;// 记录ID
} }
...@@ -17,6 +17,6 @@ public class ImportSalaryDto implements Serializable { ...@@ -17,6 +17,6 @@ public class ImportSalaryDto implements Serializable {
String usernum;// 用户工号 String usernum;// 用户工号
String username;// 用户名称 String username;// 用户名称
int jsgzzx;// 计薪规则组项 int jsgzzx;// 计薪规则组项
int srz;// 输入值 double srz;// 输入值
} }
...@@ -479,49 +479,4 @@ public class DateUtil { ...@@ -479,49 +479,4 @@ public class DateUtil {
calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMinimum(Calendar.DAY_OF_MONTH)); calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMinimum(Calendar.DAY_OF_MONTH));
return dft.format(calendar.getTime()); return dft.format(calendar.getTime());
} }
public static void main(String[] args) throws ParseException {
// System.out.println(getStartTime(0).getTime());
// System.out.println(getnowEndTime(23).getTime());
// long ts=getStartTime(0).getTime();
// System.out.println(getnowEndTime(23).getTime());
// System.out.println(getStringFormat(ts));
// String time=getStringFormat(ts);
// time +="9:00";
// System.out.println(getStringTime(time,"yyyy-MM-ddHH:mm"));
// System.out.println(System.currentTimeMillis());
// System.out.println(getStringTime("23:00","HH:mm"));
// System.out.println(getStringTime("00:00","HH:mm"));
// System.out.println(getStringDate(System.currentTimeMillis()));
//
//
// SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat("dd");
// Date date = new Date(1516291200000L);
// System.out.println(simpleDateFormat1.format(date));
// System.out.println("--------------根据特定的日期‘2014-8-1’获取特定日期所在一个月的每一天--------------");
// SimpleDateFormat dateFm = new SimpleDateFormat("EEEE",Locale.CHINA);
// Date d2=paraseStringToDate("2018-7-3");
// List<String> lst4=getAllDaysMonthByDate(d2);
// for(String s3:lst4){
// System.out.print(s3+" ");
// System.out.print(dateFm.format(paraseStringToDate(s3))+" ");
// System.out.println(s3.substring(s3.length()-2, s3.length()));
// }
// System.out.println(Math.abs((1514854800000L-1514865600000L)/60000));
// System.out.println(getFirstDayOfMonth("2018-1-1"));
// System.out.println(getLastDayOfMonth("2018-1-1"));
// System.out.println(getStringFormat(1520179200000L));
// Calendar todayStart = Calendar.getInstance();
// todayStart.setTimeInMillis(1515164400000L);
// todayStart.set(Calendar.HOUR_OF_DAY, 0);
// todayStart.set(Calendar.MINUTE, 0);
// todayStart.set(Calendar.SECOND, 0);
// todayStart.set(Calendar.MILLISECOND, 0);
// System.out.println(todayStart.getTime().getTime());
Date da=new Date();
System.out.println(da);
System.out.println(da.getTime());
}
} }
...@@ -19,6 +19,11 @@ public class Page { ...@@ -19,6 +19,11 @@ public class Page {
*/ */
private Integer totalPage; private Integer totalPage;
/**
* 偏移
*/
private Integer offset;
public Integer getCurrentPage() { public Integer getCurrentPage() {
return currentPage == null || currentPage <= 0 ? 1 : currentPage; return currentPage == null || currentPage <= 0 ? 1 : currentPage;
} }
...@@ -29,13 +34,17 @@ public class Page { ...@@ -29,13 +34,17 @@ public class Page {
} }
public Integer getTotalPage() { public Integer getTotalPage() {
return totalPage == null || totalPage <= 0 ? 10 : totalPage; return totalPage == null || totalPage <= 0 ? 10 : totalPage;
} }
public void setTotalPage(Integer totalPage) { public void setTotalPage(Integer totalPage) {
this.totalPage = totalPage; this.totalPage = totalPage;
} }
public Integer getOffset() {
return this.currentPage > 0 ? (this.currentPage - 1) * this.totalPage : 0;
}
public void setOffset(Integer offset) {
this.offset = offset;
}
} }
...@@ -65,6 +65,30 @@ ...@@ -65,6 +65,30 @@
ORDER BY dkjl.id DESC ORDER BY dkjl.id DESC
</select> </select>
<select id="exportQueryOriginalRecord" resultMap="BaseResultMap">
select dkjl.*,
bmgw.dept,
bmgw.post,
info.`name` username
from kqgl_asso_dkjl dkjl
LEFT JOIN yggl_main_emp as info on info.emp_num = dkjl.user_id and info.org_code = #{param.qyid}
LEFT JOIN (select m.name as post,um.name as dept,m.id as mid
from zzgl_bmgw_m m
left join zzgl_bmgw_m um on um.id = m.up_id
) as bmgw on bmgw.mid = info.bmgw_id
where dkjl.qyid = #{param.qyid}
<if test="param.start != ''" >
and dkjl.attime &gt;= #{param.start}
</if>
<if test="param.end != ''" >
and dkjl.attime &lt;= #{param.end}
</if>
<if test="param.text != null and param.text != ''" >
and (info.`name` like CONCAT('%',#{param.text},'%') or info.emp_num = #{param.text})
</if>
ORDER BY dkjl.id DESC
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" > <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select select
......
...@@ -21,10 +21,11 @@ ...@@ -21,10 +21,11 @@
<result column="cbfns" property="cbfns" /> <result column="cbfns" property="cbfns" />
<result column="sbjss" property="sbjss" /> <result column="sbjss" property="sbjss" />
<result column="gjjjss" property="gjjjss" /> <result column="gjjjss" property="gjjjss" />
<result column="cbryid" property="cbryid" />
</resultMap> </resultMap>
<insert id="insertsbgjjassodetailedList" parameterType="java.util.List" > <insert id="insertsbgjjassodetailedList" parameterType="java.util.List" >
insert into sbgjj_asso_detailed (user_id,attribution_time,cbfzmx_id,coverage_name,personal_amount,personal_proportion,company_amount,company_proportion,xz_type,org_code,addtime,cbfns,sbjss,gjjjss) insert into sbgjj_asso_detailed (user_id,attribution_time,cbfzmx_id,coverage_name,personal_amount,personal_proportion,company_amount,company_proportion,xz_type,org_code,addtime,cbfns,sbjss,gjjjss,cbryid)
<foreach collection="list" item="item" index="index" open="values " close="" separator=","> <foreach collection="list" item="item" index="index" open="values " close="" separator=",">
( (
<if test="item.userId != null" > <if test="item.userId != null" >
...@@ -67,7 +68,10 @@ ...@@ -67,7 +68,10 @@
#{item.sbjss}, #{item.sbjss},
</if> </if>
<if test="item.gjjjss != null" > <if test="item.gjjjss != null" >
#{item.gjjjss} #{item.gjjjss},
</if>
<if test="item.cbryid != null" >
#{item.cbryid}
</if> </if>
) )
</foreach> </foreach>
......
...@@ -79,13 +79,13 @@ ...@@ -79,13 +79,13 @@
left join zzgl_bmgw_m um on um.id = m.up_id left join zzgl_bmgw_m um on um.id = m.up_id
) as bmgw on bmgw.mid = emp.bmgw_id ) as bmgw on bmgw.mid = emp.bmgw_id
<if test="xzzid != null"> <if test="xzzid != null">
LEFT JOIN xcgl_asso_xzury xzury ON xzury.userid = emp.id and xzury.xzzid = #{xzzid} LEFT JOIN xcgl_asso_xzury xzury ON xzury.userid = emp.emp_num and xzury.xzzid = #{xzzid}
</if> </if>
where gztzt.qyid = #{orgcode} where gztzt.qyid = #{orgcode}
<if test="gztszid != null"> and gztzt.gztszid = #{gztszid} </if> <if test="gztszid != null"> and gztzt.gztszid = #{gztszid} </if>
<if test="fsType != null"> and gztzt.fs_type = #{fsType} </if> <if test="fsType != null"> and gztzt.fs_type = #{fsType} </if>
<if test="qrType != null"> and gztzt.qr_type = #{qrType} </if> <if test="qrType != null"> and gztzt.qr_type = #{qrType} </if>
<if test="xzzid != null"> and xzury.xzzid = #{xzzid} </if> <if test="xzzid != null"> and gztzt.xzzid = #{xzzid} </if>
<if test="text != null and text != ''" > <if test="text != null and text != ''" >
and (emp.`name` like CONCAT('%',#{text},'%') or emp.emp_num = #{text}) and (emp.`name` like CONCAT('%',#{text},'%') or emp.emp_num = #{text})
</if> </if>
......
...@@ -116,42 +116,18 @@ ...@@ -116,42 +116,18 @@
</trim> </trim>
</insert> </insert>
<!-- <delete id="delete" > <!-- 获取小于等于当前日期的未生效记录 -->
DELETE FROM xcgl_asso_xzdadx <select id="listIneffective" resultMap="BaseResultMap">
WHERE id = #{id} SELECT <include refid="Base_Column_List"></include>
</delete>
<update id="update" parameterType="cn.timer.api.bean.xcgl.XcglAssoXzdadx">
UPDATE xcgl_asso_xzdadx
<set>
<if test ='null != userid'>userid = #{userid},</if>
<if test ='null != sxrq'>sxrq = #{sxrq},</if>
<if test ='null != addtime'>addtime = #{addtime},</if>
<if test ='null != xgyhid'>xgyhid = #{xgyhid},</if>
<if test ='null != remarks'>remarks = #{remarks},</if>
<if test ='null != qyid'>qyid = #{qyid},</if>
<if test ='null != txzt'>txzt = #{txzt}</if>
</set>
WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM xcgl_asso_xzdadx FROM xcgl_asso_xzdadx
WHERE id = #{id} WHERE txzt = 2 AND sxrq &lt;= #{curDate}
</select> </select>
<select id="pageList" resultMap="BaseResultMap"> <!-- 获取使用中多于1条数据的记录 -->
SELECT <include refid="Base_Column_List" /> <select id="listRepeatUsed" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include>
FROM xcgl_asso_xzdadx FROM xcgl_asso_xzdadx
LIMIT #{offset}, #{pageSize} WHERE txzt = 0 AND exists (SELECT * from (select userid, count(*) as cnt from xcgl_asso_xzdadx where txzt = 0 group by userid) as tmp where cnt > 1)
ORDER BY userid, sxrq asc
</select> </select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM xcgl_asso_xzdadx
</select>
-->
</mapper> </mapper>
\ No newline at end of file
...@@ -22,6 +22,9 @@ ...@@ -22,6 +22,9 @@
<result column="empzztime" property="empzztime" /> <result column="empzztime" property="empzztime" />
<result column="sfdx" property="sfdx" /> <result column="sfdx" property="sfdx" />
<result column="tratime" property="tratime" /> <result column="tratime" property="tratime" />
<result column="txzt" property="txzt" />
<result column="remarks" property="remarks" />
<collection property="defdto" ofType="cn.timer.api.dto.xcgl.DefinedItemsDto"> <collection property="defdto" ofType="cn.timer.api.dto.xcgl.DefinedItemsDto">
<result column="dazid" property="dazid"/> <result column="dazid" property="dazid"/>
...@@ -169,6 +172,16 @@ ...@@ -169,6 +172,16 @@
FROM xcgl_asso_xzdazdy FROM xcgl_asso_xzdazdy
</select> --> </select> -->
<select id="selectFixedSalaryStaffCount" resultType="java.lang.Long">
select COUNT(*) from yggl_main_emp emp
where emp.org_code = #{param.orgcode}
<if test="param.status != ''" >
and emp.job_status = #{param.status}
</if>
<if test="param.text != ''" >
and (emp.`name` like CONCAT('%',#{param.text},'%') or emp.emp_num = #{param.text})
</if>
</select>
<select id="selectFixedSalaryStaff" resultMap="FixedSalaryStaffMap"> <select id="selectFixedSalaryStaff" resultMap="FixedSalaryStaffMap">
select emp.emp_num empnum, select emp.emp_num empnum,
emp.`name` empname, emp.`name` empname,
...@@ -194,9 +207,7 @@ ...@@ -194,9 +207,7 @@
xzdaz.xzdazdyid as xzdazdyid, xzdaz.xzdazdyid as xzdazdyid,
xzdaz.rsz as dazrsz, xzdaz.rsz as dazrsz,
xzdaz.xzdadxid as xzdadxid xzdaz.xzdadxid as xzdadxid
from yggl_main_emp emp from (select * from yggl_main_emp emp
LEFT JOIN xcgl_asso_xzdadx as dadx on dadx.userid = emp.emp_num and dadx.txzt = 0
LEFT JOIN xcgl_asso_xzdaz as xzdaz on xzdaz.xzdadxid = dadx.id
where emp.org_code = #{param.orgcode} where emp.org_code = #{param.orgcode}
<if test="param.status != ''" > <if test="param.status != ''" >
and emp.job_status = #{param.status} and emp.job_status = #{param.status}
...@@ -204,6 +215,10 @@ ...@@ -204,6 +215,10 @@
<if test="param.text != ''" > <if test="param.text != ''" >
and (emp.`name` like CONCAT('%',#{param.text},'%') or emp.emp_num = #{param.text}) and (emp.`name` like CONCAT('%',#{param.text},'%') or emp.emp_num = #{param.text})
</if> </if>
LIMIT #{param.offset}, #{param.totalPage}
) emp
LEFT JOIN xcgl_asso_xzdadx as dadx on dadx.userid = emp.emp_num and dadx.txzt = 0
LEFT JOIN xcgl_asso_xzdaz as xzdaz on xzdaz.xzdadxid = dadx.id
</select> </select>
...@@ -283,6 +298,8 @@ ...@@ -283,6 +298,8 @@
SUBSTR(emp.zz_time,1,10) empzztime, SUBSTR(emp.zz_time,1,10) empzztime,
IF(dadx.userid IS NOT NULL,1,0) AS sfdx, IF(dadx.userid IS NOT NULL,1,0) AS sfdx,
dadx.sxrq as tratime, dadx.sxrq as tratime,
dadx.txzt as txzt,
dadx.remarks as remarks,
xzdaz.id as dazid, xzdaz.id as dazid,
xzdaz.xzdazdyid as xzdazdyid, xzdaz.xzdazdyid as xzdazdyid,
xzdaz.rsz as dazrsz, xzdaz.rsz as dazrsz,
...@@ -292,7 +309,7 @@ ...@@ -292,7 +309,7 @@
LEFT JOIN xcgl_asso_xzdaz as xzdaz on xzdaz.xzdadxid = dadx.id LEFT JOIN xcgl_asso_xzdaz as xzdaz on xzdaz.xzdadxid = dadx.id
where emp.org_code = #{orgcode} where emp.org_code = #{orgcode}
and emp.emp_num = #{empnum} and emp.emp_num = #{empnum}
and dadx.txzt = 1 ORDER BY dadx.txzt, dadx.sxrq DESC
</select> </select>
</mapper> </mapper>
\ No newline at end of file
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