Commit e2f538dd by Administrator

Merge branch 'develop' into 'master'

Develop

See merge request 8timerv2/8timerapiv200!506
parents d38cfed3 a23f59d7
...@@ -402,7 +402,12 @@ ...@@ -402,7 +402,12 @@
<version>1.4.7.RELEASE</version> <version>1.4.7.RELEASE</version>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/net.sourceforge.htmlunit/htmlunit -->
<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
<version>2.43.0</version>
</dependency>
</dependencies> </dependencies>
<repositories> <repositories>
......
package cn.timer.api.bean.kqmk;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author LAL 2020-09-22
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "kqmk_redletter_day")
@ApiModel("节假日")
public class KqmkRedletterDay extends Model<KqmkRedletterDay> {
/**
*
*/
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "id id", example = "101")
private Integer id;
@ApiModelProperty(value = "日期 ", example = "日期")
private String holiday;
@ApiModelProperty(value = "假日名称 ", example = "假日名称")
private String holidayName;
@ApiModelProperty(value = "是否为节假日(0:否;1:是) 是否为节假日(0:否;1:是)", example = "101")
private Integer holidayStatus;
@ApiModelProperty(value = "年月", example = "101")
private String belongYearmonth;
}
\ No newline at end of file
...@@ -89,4 +89,7 @@ public class SbgjjAdminCbry extends Model<SbgjjAdminCbry> { ...@@ -89,4 +89,7 @@ public class SbgjjAdminCbry extends Model<SbgjjAdminCbry> {
@ApiModelProperty(value = "企业id", example = "101") @ApiModelProperty(value = "企业id", example = "101")
private Integer qyid; private Integer qyid;
@ApiModelProperty(value = "是否使用 0:否 1:是", example = "101")
private Integer isUse;
} }
\ No newline at end of file
...@@ -52,9 +52,15 @@ public class SbgjjAssoDetailed extends Model<SbgjjAssoDetailed> { ...@@ -52,9 +52,15 @@ public class SbgjjAssoDetailed extends Model<SbgjjAssoDetailed> {
@ApiModelProperty(value = "个人金额 ", example = "个人金额") @ApiModelProperty(value = "个人金额 ", example = "个人金额")
private Double personalAmount; private Double personalAmount;
@ApiModelProperty(value = "个人比例 ", example = "个人比例")
private String personalProportion;
@ApiModelProperty(value = "公司金额 ", example = "公司金额") @ApiModelProperty(value = "公司金额 ", example = "公司金额")
private Double companyAmount; private Double companyAmount;
@ApiModelProperty(value = "公司比例 ", example = "公司比例")
private String companyProportion;
@ApiModelProperty(value = "险种类型 1:社保;2:公积金", example = "101") @ApiModelProperty(value = "险种类型 1:社保;2:公积金", example = "101")
private Integer xzType; private Integer xzType;
...@@ -64,4 +70,14 @@ public class SbgjjAssoDetailed extends Model<SbgjjAssoDetailed> { ...@@ -64,4 +70,14 @@ public class SbgjjAssoDetailed extends Model<SbgjjAssoDetailed> {
@ApiModelProperty(value = "生成时间 生成时间", example = "101") @ApiModelProperty(value = "生成时间 生成时间", example = "101")
private Long addtime; private Long addtime;
@ApiModelProperty(value = "参保方案 ", example = "参保方案")
private String cbfns;
@ApiModelProperty(value = "社保基数 ", example = "社保基数")
private String sbjss;
@ApiModelProperty(value = "公积金基数 ", example = "公积金基数")
private String gjjjss;
} }
\ No newline at end of file
...@@ -208,6 +208,9 @@ public class YgglMainEmp extends Model<YgglMainEmp> { ...@@ -208,6 +208,9 @@ public class YgglMainEmp extends Model<YgglMainEmp> {
@ApiModelProperty(value="离职前状态 1试用、2正式 ",example="1试用、2正式") @ApiModelProperty(value="离职前状态 1试用、2正式 ",example="1试用、2正式")
private Integer beforeLeavingSts; private Integer beforeLeavingSts;
@ApiModelProperty(value="自定义工号",example="")
private String customNum;
@Transient @Transient
@TableField(exist = false) @TableField(exist = false)
private String workTime;//工龄 private String workTime;//工龄
......
...@@ -41,6 +41,7 @@ import cn.hutool.core.util.StrUtil; ...@@ -41,6 +41,7 @@ import cn.hutool.core.util.StrUtil;
import cn.timer.api.aspect.lang.annotation.Log; import cn.timer.api.aspect.lang.annotation.Log;
import cn.timer.api.aspect.lang.enums.BusinessType; import cn.timer.api.aspect.lang.enums.BusinessType;
import cn.timer.api.bean.jxgl.JxglBasicSetting; import cn.timer.api.bean.jxgl.JxglBasicSetting;
import cn.timer.api.bean.kqmk.KqglAssoBcsz;
import cn.timer.api.bean.kqmk.KqglAssoLeaveEmployeeBalance; import cn.timer.api.bean.kqmk.KqglAssoLeaveEmployeeBalance;
import cn.timer.api.bean.kqmk.KqglAssoLeaveRules; import cn.timer.api.bean.kqmk.KqglAssoLeaveRules;
import cn.timer.api.bean.kqmk.KqglAssoLeaveRulesT; import cn.timer.api.bean.kqmk.KqglAssoLeaveRulesT;
...@@ -545,6 +546,22 @@ public class LoginController { ...@@ -545,6 +546,22 @@ public class LoginController {
@Autowired @Autowired
private KqglAssoOvertimeRulesMMapper kqglassoovertimerulesmmapper; private KqglAssoOvertimeRulesMMapper kqglassoovertimerulesmmapper;
@GetMapping(value="/doublecheck/{checkobject}")
@ApiOperation(value = "检查注册公司名是否重复", httpMethod = "GET", notes = "接口发布说明")
public Result<Object> doublecheck(@PathVariable("checkobject") String checkobject) {
QyzxEntInfoM gsif = QyzxEntInfoM.builder().build().selectOne(new QueryWrapper<QyzxEntInfoM>().lambda().eq(QyzxEntInfoM::getName, checkobject));
if(gsif != null) {
return ResultUtil.success("呀,该公司名已被注册了!!!") ;
}else {
return ResultUtil.data(0,"操作成功!");
}
}
/** /**
* 注册企业 * 注册企业
* *
......
...@@ -523,7 +523,7 @@ public class CrmController { ...@@ -523,7 +523,7 @@ public class CrmController {
.ge(StringUtils.isNotBlank(startFollowTime), CrmClientData::getLastFollowTime, startFollowTime) .ge(StringUtils.isNotBlank(startFollowTime), CrmClientData::getLastFollowTime, startFollowTime)
.le(StringUtils.isNotBlank(endFollowTime), CrmClientData::getLastFollowTime, endFollowTime).like(!StrUtil.isBlank(like), CrmClientData::getBelongUserName, like).or() .le(StringUtils.isNotBlank(endFollowTime), CrmClientData::getLastFollowTime, endFollowTime).like(!StrUtil.isBlank(like), CrmClientData::getBelongUserName, like).or()
.like(!StrUtil.isBlank(like), CrmClientData::getClientName, like).or() .like(!StrUtil.isBlank(like), CrmClientData::getClientName, like).or()
.like(!StrUtil.isBlank(like), CrmClientData::getClientCellphone, like) .like(!StrUtil.isBlank(like), CrmClientData::getClientCellphone, like).having("org_code = {0}", orgCode).having("belong_user = {0}", empNum)
.orderByDesc(CrmClientData::getCreateTime)); .orderByDesc(CrmClientData::getCreateTime));
} }
......
...@@ -2029,7 +2029,7 @@ public class TimeCardController { ...@@ -2029,7 +2029,7 @@ public class TimeCardController {
double gzsc = 0; double gzsc = 0;
long rest_time = 0; long rest_time = 0;
if(dkbc.getStartTime() != null && dkbc.getEndTime() != null) { if(dkbc.getStartTime() != null && !("").equals(dkbc.getStartTime()) && dkbc.getEndTime() != null && !("").equals(dkbc.getEndTime())) {
long kaishixiuxi = Long.valueOf(ClockInTool.dateToStamp(punchattdate + " " +dkbc.getStartTime()+":00")); long kaishixiuxi = Long.valueOf(ClockInTool.dateToStamp(punchattdate + " " +dkbc.getStartTime()+":00"));
long jieshuxiuxi = Long.valueOf(ClockInTool.dateToStamp(punchattdate + " " +dkbc.getEndTime()+":00")); long jieshuxiuxi = Long.valueOf(ClockInTool.dateToStamp(punchattdate + " " +dkbc.getEndTime()+":00"));
rest_time = (jieshuxiuxi - kaishixiuxi)/1000/60;//休息时间 rest_time = (jieshuxiuxi - kaishixiuxi)/1000/60;//休息时间
......
...@@ -22,6 +22,7 @@ import cn.timer.api.bean.kqgl.PunchCardDetails; ...@@ -22,6 +22,7 @@ import cn.timer.api.bean.kqgl.PunchCardDetails;
import cn.timer.api.bean.kqgl.PunchRecord; import cn.timer.api.bean.kqgl.PunchRecord;
import cn.timer.api.bean.kqgl.Schedule; import cn.timer.api.bean.kqgl.Schedule;
import cn.timer.api.bean.kqmk.KqglAssoBcsz; 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.KqglAssoLeaveRules;
import cn.timer.api.bean.kqmk.KqglAssoMonthPunchSummary; import cn.timer.api.bean.kqmk.KqglAssoMonthPunchSummary;
import cn.timer.api.bean.kqmk.KqglAssoOvertimeBasics; import cn.timer.api.bean.kqmk.KqglAssoOvertimeBasics;
...@@ -30,6 +31,7 @@ import cn.timer.api.bean.kqmk.KqglAssoRelationSummary; ...@@ -30,6 +31,7 @@ import cn.timer.api.bean.kqmk.KqglAssoRelationSummary;
import cn.timer.api.bean.kqmk.KqglAssoTeshu; import cn.timer.api.bean.kqmk.KqglAssoTeshu;
import cn.timer.api.bean.kqmk.KqglAssoZhoupaiban; import cn.timer.api.bean.kqmk.KqglAssoZhoupaiban;
import cn.timer.api.bean.kqmk.KqglMainKqz; 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.qyzx.QyzxEntInfoM;
import cn.timer.api.bean.yggl.YgglMainLzb; import cn.timer.api.bean.yggl.YgglMainLzb;
import cn.timer.api.controller.kqgl.ClockInController; import cn.timer.api.controller.kqgl.ClockInController;
...@@ -96,7 +98,7 @@ public class AttendanceTaskTiming{ ...@@ -96,7 +98,7 @@ public class AttendanceTaskTiming{
//typeid:1-员工 2-考勤组 //typeid:1-员工 2-考勤组
// @Scheduled(cron = "0 */5 * * * ?") // @Scheduled(cron = "0 */5 * * * ?")
// @Scheduled(cron = "0 15 16 * * ?") // @Scheduled(cron = "0 42 14 * * ?")
@Scheduled(cron = "0 0 8,12,16,20 * * ?")//每天上午8、12点,下午16点,20点 执行 @Scheduled(cron = "0 0 8,12,16,20 * * ?")//每天上午8、12点,下午16点,20点 执行
public void AttendanceTask() throws ParseException { public void AttendanceTask() throws ParseException {
...@@ -130,6 +132,9 @@ public class AttendanceTaskTiming{ ...@@ -130,6 +132,9 @@ public class AttendanceTaskTiming{
List<QyzxEntInfoM> orgcodelist = qyzxentinfommapper.selectList(new QueryWrapper<QyzxEntInfoM>());//系统中的所有公司 所有未到期的公司 List<QyzxEntInfoM> orgcodelist = qyzxentinfommapper.selectList(new QueryWrapper<QyzxEntInfoM>());//系统中的所有公司 所有未到期的公司
// List<QyzxEntInfoM> orgcodelist = qyzxentinfommapper.selectList(new QueryWrapper<QyzxEntInfoM>().lambda().eq(QyzxEntInfoM::getId, 3));
for(int t = 0;t<orgcodelist.size();t++){ for(int t = 0;t<orgcodelist.size();t++){
int org_code = orgcodelist.get(t).getId();//企业组织代码 int org_code = orgcodelist.get(t).getId();//企业组织代码
...@@ -140,9 +145,6 @@ public class AttendanceTaskTiming{ ...@@ -140,9 +145,6 @@ public class AttendanceTaskTiming{
.eq(YgglMainLzb::getEmpNum, user.getEmpnum())); .eq(YgglMainLzb::getEmpNum, user.getEmpnum()));
if(lzb == null) {//已离职 的人员不进入计算(已存在的不做任何处理) if(lzb == null) {//已离职 的人员不进入计算(已存在的不做任何处理)
// KqglAssoMonthPunchSummary.builder().build().delete(new QueryWrapper<KqglAssoMonthPunchSummary>().lambda().eq(KqglAssoMonthPunchSummary::getBelongYear, year)
// .eq(KqglAssoMonthPunchSummary::getBelongMonth, month).eq(KqglAssoMonthPunchSummary::getOrgCode, org_code));
KqglAssoMonthPunchSummary sum = KqglAssoMonthPunchSummary.builder().build().selectOne(new QueryWrapper<KqglAssoMonthPunchSummary>().lambda().eq(KqglAssoMonthPunchSummary::getOrgCode, org_code) KqglAssoMonthPunchSummary sum = KqglAssoMonthPunchSummary.builder().build().selectOne(new QueryWrapper<KqglAssoMonthPunchSummary>().lambda().eq(KqglAssoMonthPunchSummary::getOrgCode, org_code)
.eq(KqglAssoMonthPunchSummary::getBelongYear, year).eq(KqglAssoMonthPunchSummary::getBelongMonth, month).eq(KqglAssoMonthPunchSummary::getNum, user.getEmpnum())); .eq(KqglAssoMonthPunchSummary::getBelongYear, year).eq(KqglAssoMonthPunchSummary::getBelongMonth, month).eq(KqglAssoMonthPunchSummary::getNum, user.getEmpnum()));
...@@ -225,6 +227,7 @@ public class AttendanceTaskTiming{ ...@@ -225,6 +227,7 @@ public class AttendanceTaskTiming{
// .eq(KqglAssoMonthPunchSummary::getNum, user.getEmpnum()).eq(KqglAssoMonthPunchSummary::getOrgCode, org_code)); // .eq(KqglAssoMonthPunchSummary::getNum, user.getEmpnum()).eq(KqglAssoMonthPunchSummary::getOrgCode, org_code));
String[] ycqts = new String[31];//应上班的具体天数(yyyy-MM-dd) String[] ycqts = new String[31];//应上班的具体天数(yyyy-MM-dd)
String[] xxts = new String[31];//休息的具体天数(yyyy-MM-dd) String[] xxts = new String[31];//休息的具体天数(yyyy-MM-dd)
String[] fdxx = new String[10];//法定休息的具体天数(yyyy-MM-dd)
List<String> rowData = new ArrayList<String>(); List<String> rowData = new ArrayList<String>();
//休息天数,应出勤天数,实际出勤 //休息天数,应出勤天数,实际出勤
double daysOff = 0,daysOnDuty = 0;//,actualAttDays = 0; double daysOff = 0,daysOnDuty = 0;//,actualAttDays = 0;
...@@ -271,9 +274,20 @@ public class AttendanceTaskTiming{ ...@@ -271,9 +274,20 @@ public class AttendanceTaskTiming{
needfig[e] = String.valueOf(awek.getType());//获取设置的应打卡周几 needfig[e] = String.valueOf(awek.getType());//获取设置的应打卡周几
e++; e++;
} }
//法定節假日
List<KqmkRedletterDay> etter = KqmkRedletterDay.builder().build().selectList(new QueryWrapper<KqmkRedletterDay>().lambda().eq(KqmkRedletterDay::getHolidayStatus, 1).eq(KqmkRedletterDay::getBelongYearmonth, ttstr));
String[] holidays = new String[etter.size()];//法定节假日沦为休息日计算
int h = 0;
for(KqmkRedletterDay spe:etter){
holidays[h] = spe.getHoliday();
h++;
}
String yemo = year + "-" + month; String yemo = year + "-" + month;
sdf1.setLenient(false); sdf1.setLenient(false);
int y = 0,q = 0; int y = 0,q = 0,jj = 0;//jj:节假日
for(int i = 1; i <= ClockInTool.getDaysByYearMonth(year,month); i++){ for(int i = 1; i <= ClockInTool.getDaysByYearMonth(year,month); i++){
Date date1 = sdf1.parse(yemo + "-" + i); Date date1 = sdf1.parse(yemo + "-" + i);
for(int u=0;u<week.length;u++){ for(int u=0;u<week.length;u++){
...@@ -283,11 +297,20 @@ public class AttendanceTaskTiming{ ...@@ -283,11 +297,20 @@ public class AttendanceTaskTiming{
if(Arrays.asList(appmaps).contains(String.valueOf(sdf1.format(date1)))){ if(Arrays.asList(appmaps).contains(String.valueOf(sdf1.format(date1)))){
y = y-1; y = y-1;
} }
if(attgro.getIsFdjjr().equals(1)) {
if(Arrays.asList(holidays).contains(String.valueOf(sdf1.format(date1)))){
y = y-1;
jj ++;
}
}
} }
} }
} }
//全月时间 - 应打卡时间 - 必须打卡时间 + 无需打卡时间 //全月时间 - 应打卡时间 - 必须打卡时间 + 无需打卡时间
int xiuxi = ClockInTool.getDaysByYearMonth(year,month) - q - bxdk + wxdk.size(); int xiuxi = ClockInTool.getDaysByYearMonth(year,month) - q - bxdk + wxdk.size()+jj;
daysOff = xiuxi; daysOff = xiuxi;
daysOnDuty = y+bxdk; daysOnDuty = y+bxdk;
// String[] range=ClockInTool.listToString(ClockInTool.getDays(sdf1.format(c.getTime()),str)).split(";");//目前为止所有日期 // String[] range=ClockInTool.listToString(ClockInTool.getDays(sdf1.format(c.getTime()),str)).split(";");//目前为止所有日期
...@@ -295,6 +318,7 @@ public class AttendanceTaskTiming{ ...@@ -295,6 +318,7 @@ public class AttendanceTaskTiming{
//目前为止应出勤天数 //目前为止应出勤天数
int w = 0,x=0; int w = 0,x=0;
int zj = 6; int zj = 6;
int fd = 0;
for(String num : range) { for(String num : range) {
if(ClockInTool.useArrayUtils(needfig, String.valueOf(ClockInTool.dateToWeek(num)))) {//对比排班应打卡时间 if(ClockInTool.useArrayUtils(needfig, String.valueOf(ClockInTool.dateToWeek(num)))) {//对比排班应打卡时间
String[] ycqtst = new String[ycqts.length + zj]; String[] ycqtst = new String[ycqts.length + zj];
...@@ -337,6 +361,32 @@ public class AttendanceTaskTiming{ ...@@ -337,6 +361,32 @@ public class AttendanceTaskTiming{
xxts = xxtst; xxts = xxtst;
x++; x++;
} }
//当前考勤组开启法定节假日休息开关
if(attgro.getIsFdjjr().equals(1)) {
//法定节假日
if(ClockInTool.useArrayUtils(holidays, num)) {//法定节假日沦为休息日计算
// ycqts = ClockInTool.doChinFilters(ClockInTool.deleteArrayNull(ycqts), num);//为必须休息的话从上班日期中去除
if(ClockInTool.doChinFilters(ClockInTool.deleteArrayNull(ycqts), num) != null) {
ycqts = ClockInTool.doChinFilters(ClockInTool.deleteArrayNull(ycqts), num);//为必须休息的话从上班日期中去除
}
fdxx[fd] = num;
fd ++;
zjgzts = zjgzts - 1;
String[] xxtst = new String[xxts.length + zj];
System.arraycopy(xxts, 0, xxtst, 0, xxts.length);
xxtst[x] = num;
xxts = xxtst;
x++;
}
}
} }
}else if(attgro.getPbfs() == 2){ //自由排班 }else if(attgro.getPbfs() == 2){ //自由排班
DateFormat df = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", Locale.US); DateFormat df = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", Locale.US);
...@@ -407,7 +457,7 @@ public class AttendanceTaskTiming{ ...@@ -407,7 +457,7 @@ public class AttendanceTaskTiming{
} }
} }
} }
List<PunchRecord> initial = punchrecordmapper.getMaintenancePunchCardList(startDate,endDate,user.getEmpnum()); List<PunchRecord> initial = punchrecordmapper.getMaintenancePunchCardList(startDate,endDate,user.getEmpnum(),org_code);
// // 迟到次数 迟到时长 早退次数 早退时长 // // 迟到次数 迟到时长 早退次数 早退时长
// int latenum = 0,latehours = 0,leanum = 0,leahours = 0;// 迟到次数 // int latenum = 0,latehours = 0,leanum = 0,leahours = 0;// 迟到次数
String[] cdts = new String[31];//迟到的具体天数 String[] cdts = new String[31];//迟到的具体天数
...@@ -499,8 +549,10 @@ public class AttendanceTaskTiming{ ...@@ -499,8 +549,10 @@ public class AttendanceTaskTiming{
String sjs = "",qinjia = "",chuaca = "",waichu = "",buka = "",jiaban = ""; String sjs = "",qinjia = "",chuaca = "",waichu = "",buka = "",jiaban = "";
if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(xxts), num) && ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(dkjtts),num)) { if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(xxts), num) && ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(dkjtts),num)) {
rowData.add("休息并打卡"); rowData.add("休息并打卡");
}else if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(xxts), num)){ }else if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(xxts), num) && !ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(fdxx), num)){
rowData.add("休息"); rowData.add("休息");
}else if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(fdxx), num)){
rowData.add("法定节假日休息");
}else { }else {
if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(ycqts), num) && !ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(dkjtts), num) && !ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(leaves), num) && !ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(travels), num) && !ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(goouts), num) && !ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(cards), num)) { if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(ycqts), num) && !ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(dkjtts), num) && !ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(leaves), num) && !ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(travels), num) && !ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(goouts), num) && !ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(cards), num)) {
rowData.add("旷工"); rowData.add("旷工");
...@@ -514,7 +566,24 @@ public class AttendanceTaskTiming{ ...@@ -514,7 +566,24 @@ public class AttendanceTaskTiming{
}else if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(sblacks), num) && ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(ztts), num)) { }else if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(sblacks), num) && ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(ztts), num)) {
rowData.add("上班缺卡,下班早退"); rowData.add("上班缺卡,下班早退");
}else if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(cdts), num)) { }else if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(cdts), num)) {
rowData.add("上班迟到"); // rowData.add("上班迟到");
KqglAssoDkmx dkm = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, user.getEmpnum())
.eq(KqglAssoDkmx::getQyid, org_code).eq(KqglAssoDkmx::getData, num));
if(dkm.getYdkcs() == 2 || dkm.getYdkcs() == 4 || dkm.getYdkcs() == 6) {
if(dkm.getSbdk1jg() > 0) {
rowData.add("上班1迟到,打卡时间:"+ClockInTool.stampToDate3(String.valueOf(dkm.getSbdk1()))+",迟到"+dkm.getSbdk1jg()+"分钟");
}
}
if(dkm.getYdkcs() == 4 || dkm.getYdkcs() == 6) {
if(dkm.getSbdk2jg() > 0) {
rowData.add("上班2迟到,打卡时间:"+ClockInTool.stampToDate3(String.valueOf(dkm.getSbdk2()))+",迟到"+dkm.getSbdk2jg()+"分钟");
}
}
if(dkm.getYdkcs() == 6) {
if(dkm.getSbdk3jg() > 0) {
rowData.add("上班3迟到,打卡时间:"+ClockInTool.stampToDate3(String.valueOf(dkm.getSbdk3()))+",迟到"+dkm.getSbdk3jg()+"分钟");
}
}
}else if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(cdts), num) && ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(xblacks), num)) { }else if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(cdts), num) && ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(xblacks), num)) {
rowData.add("上班迟到,下班缺卡"); rowData.add("上班迟到,下班缺卡");
}else if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(cdts), num) && ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(ztts), num)) { }else if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(cdts), num) && ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(ztts), num)) {
...@@ -523,7 +592,24 @@ public class AttendanceTaskTiming{ ...@@ -523,7 +592,24 @@ public class AttendanceTaskTiming{
}else if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(xblacks),num)) { }else if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(xblacks),num)) {
rowData.add("下班缺卡"); rowData.add("下班缺卡");
}else if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(ztts), num)) { }else if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(ztts), num)) {
rowData.add("下班早退"); // rowData.add("下班早退");
KqglAssoDkmx dkm = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, user.getEmpnum())
.eq(KqglAssoDkmx::getQyid, org_code).eq(KqglAssoDkmx::getData, num));
if(dkm.getYdkcs() == 2 || dkm.getYdkcs() == 4 || dkm.getYdkcs() == 6) {
if(dkm.getXbdk1jg() > 0) {
rowData.add("下班1早退,打卡时间:"+ClockInTool.stampToDate3(String.valueOf(dkm.getXbdk1()))+",早退"+dkm.getXbdk1jg()+"分钟");
}
}
if(dkm.getYdkcs() == 4 || dkm.getYdkcs() == 6) {
if(dkm.getXbdk2jg() > 0) {
rowData.add("下班2早退,打卡时间:"+ClockInTool.stampToDate3(String.valueOf(dkm.getXbdk2()))+",早退"+dkm.getXbdk2jg()+"分钟");
}
}
if(dkm.getYdkcs() == 6) {
if(dkm.getXbdk3jg() > 0) {
rowData.add("下班3早退,打卡时间:"+ClockInTool.stampToDate3(String.valueOf(dkm.getXbdk3()))+",早退"+dkm.getXbdk3jg()+"分钟");
}
}
}else { }else {
rowData.add("正常"); rowData.add("正常");
} }
...@@ -546,28 +632,20 @@ public class AttendanceTaskTiming{ ...@@ -546,28 +632,20 @@ public class AttendanceTaskTiming{
} }
} }
qinjia = "#"+(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"请"+leavetype+lea.getDuration()+company; qinjia = "#"+(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"请"+leavetype+lea.getDuration()+company;
// rowData.remove(u);
// rowData.add(u,(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"请"+leavetype+lea.getDuration()+company);
} }
if(ClockInTool.contains(ClockInTool.deleteArrayNull(travels),num)) { if(ClockInTool.contains(ClockInTool.deleteArrayNull(travels),num)) {
KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 3)); KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 3));
// rowData.remove(u);
// rowData.add(u,(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"出差"+lea.getDuration()+"天");
chuaca = "#"+(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"出差"+lea.getDuration()+"天"; chuaca = "#"+(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"出差"+lea.getDuration()+"天";
} }
if(ClockInTool.contains(ClockInTool.deleteArrayNull(goouts),num)) { if(ClockInTool.contains(ClockInTool.deleteArrayNull(goouts),num)) {
KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 4)); KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 4));
// rowData.remove(u);
// rowData.add(u,(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"外出"+lea.getDuration()+"天");
waichu = "#"+(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"外出"+lea.getDuration()+"天"; waichu = "#"+(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"外出"+lea.getDuration()+"天";
} }
if(ClockInTool.contains(ClockInTool.deleteArrayNull(cards),num)) { if(ClockInTool.contains(ClockInTool.deleteArrayNull(cards),num)) {
KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 5)); KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 5));
// rowData.remove(u);
// rowData.add(u,"已补卡:"+(lea.getStartTime()).substring(5, 16));
buka = "#"+"已补卡:"+(lea.getStartTime()).substring(5, 16); buka = "#"+"已补卡:"+(lea.getStartTime()).substring(5, 16);
} }
if(ClockInTool.contains(ClockInTool.deleteArrayNull(overtimes),num)) { if(ClockInTool.contains(ClockInTool.deleteArrayNull(overtimes),num)) {
...@@ -589,8 +667,6 @@ public class AttendanceTaskTiming{ ...@@ -589,8 +667,6 @@ public class AttendanceTaskTiming{
else if(lea.getCompensateId() == 2) { method="转加班费"; } else if(lea.getCompensateId() == 2) { method="转加班费"; }
else {method="转调休或加班费";} else {method="转调休或加班费";}
// rowData.remove(u);
// rowData.add(u,(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"加班"+lea.getDuration()+company+"["+method+"]");
jiaban = "#"+(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"加班"+lea.getDuration()+company+"["+method+"]"; jiaban = "#"+(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"加班"+lea.getDuration()+company+"["+method+"]";
//防止多运算 //防止多运算
if(lea.getOrdernum() == lea.getTotals()) { if(lea.getOrdernum() == lea.getTotals()) {
...@@ -618,10 +694,8 @@ public class AttendanceTaskTiming{ ...@@ -618,10 +694,8 @@ public class AttendanceTaskTiming{
if(!ClockInTool.contains(ClockInTool.deleteArrayNull(ycqts),num) && !ClockInTool.contains(ClockInTool.deleteArrayNull(xxts),num)) { if(!ClockInTool.contains(ClockInTool.deleteArrayNull(ycqts),num) && !ClockInTool.contains(ClockInTool.deleteArrayNull(xxts),num)) {
if(lea.getOvertimeTypeId() == 3) { if(lea.getOvertimeTypeId() == 3) {
if(lea.getCompensateId() == 1 || lea.getCompensateId() == 3) { if(lea.getCompensateId() == 1 || lea.getCompensateId() == 3) {
// holidayturncompenleave++;
holidayturncompenleave = holidayturncompenleave + lea.getDuration(); holidayturncompenleave = holidayturncompenleave + lea.getDuration();
}else if(lea.getCompensateId() == 2 || lea.getCompensateId() == 4) { }else if(lea.getCompensateId() == 2 || lea.getCompensateId() == 4) {
// holidaytransferovertime++;
holidaytransferovertime = holidaytransferovertime + lea.getDuration(); holidaytransferovertime = holidaytransferovertime + lea.getDuration();
} }
} }
......
...@@ -22,6 +22,7 @@ import cn.timer.api.bean.kqgl.PunchCardDetails; ...@@ -22,6 +22,7 @@ import cn.timer.api.bean.kqgl.PunchCardDetails;
import cn.timer.api.bean.kqgl.PunchRecord; import cn.timer.api.bean.kqgl.PunchRecord;
import cn.timer.api.bean.kqgl.Schedule; import cn.timer.api.bean.kqgl.Schedule;
import cn.timer.api.bean.kqmk.KqglAssoBcsz; 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.KqglAssoLeaveRules;
import cn.timer.api.bean.kqmk.KqglAssoMonthPunchSummary; import cn.timer.api.bean.kqmk.KqglAssoMonthPunchSummary;
import cn.timer.api.bean.kqmk.KqglAssoOvertimeBasics; import cn.timer.api.bean.kqmk.KqglAssoOvertimeBasics;
...@@ -30,6 +31,7 @@ import cn.timer.api.bean.kqmk.KqglAssoRelationSummary; ...@@ -30,6 +31,7 @@ import cn.timer.api.bean.kqmk.KqglAssoRelationSummary;
import cn.timer.api.bean.kqmk.KqglAssoTeshu; import cn.timer.api.bean.kqmk.KqglAssoTeshu;
import cn.timer.api.bean.kqmk.KqglAssoZhoupaiban; import cn.timer.api.bean.kqmk.KqglAssoZhoupaiban;
import cn.timer.api.bean.kqmk.KqglMainKqz; 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.qyzx.QyzxEntInfoM;
import cn.timer.api.bean.yggl.YgglMainLzb; import cn.timer.api.bean.yggl.YgglMainLzb;
import cn.timer.api.controller.kqgl.ClockInController; import cn.timer.api.controller.kqgl.ClockInController;
...@@ -88,7 +90,7 @@ public class LastMonthtimingExport { ...@@ -88,7 +90,7 @@ public class LastMonthtimingExport {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
// @Scheduled(cron = "0 6 12 * * ?") // @Scheduled(cron = "0 7 15 * * ?")
@Scheduled(cron = "0 0 4,20 * * ?")//每天上午4点,下午20点 执行 @Scheduled(cron = "0 0 4,20 * * ?")//每天上午4点,下午20点 执行
public void LastMonthtimingAttendanceTask() throws ParseException { public void LastMonthtimingAttendanceTask() throws ParseException {
...@@ -120,6 +122,8 @@ public class LastMonthtimingExport { ...@@ -120,6 +122,8 @@ public class LastMonthtimingExport {
List<QyzxEntInfoM> orgcodelist = qyzxentinfommapper.selectList(new QueryWrapper<QyzxEntInfoM>());//系统中的所有公司 所有未到期的公司 List<QyzxEntInfoM> orgcodelist = qyzxentinfommapper.selectList(new QueryWrapper<QyzxEntInfoM>());//系统中的所有公司 所有未到期的公司
// List<QyzxEntInfoM> orgcodelist = qyzxentinfommapper.selectList(new QueryWrapper<QyzxEntInfoM>().lambda().eq(QyzxEntInfoM::getId, 3));
for(int t = 0;t<orgcodelist.size();t++){ for(int t = 0;t<orgcodelist.size();t++){
int org_code = orgcodelist.get(t).getId();//企业组织代码 int org_code = orgcodelist.get(t).getId();//企业组织代码
...@@ -130,9 +134,6 @@ public class LastMonthtimingExport { ...@@ -130,9 +134,6 @@ public class LastMonthtimingExport {
.eq(YgglMainLzb::getEmpNum, user.getEmpnum())); .eq(YgglMainLzb::getEmpNum, user.getEmpnum()));
if(lzb == null) {//已离职 的人员不进入计算(已存在的不做任何处理) if(lzb == null) {//已离职 的人员不进入计算(已存在的不做任何处理)
// KqglAssoMonthPunchSummary.builder().build().delete(new QueryWrapper<KqglAssoMonthPunchSummary>().lambda().eq(KqglAssoMonthPunchSummary::getBelongYear, year)
// .eq(KqglAssoMonthPunchSummary::getBelongMonth, month).eq(KqglAssoMonthPunchSummary::getOrgCode, org_code));
KqglAssoMonthPunchSummary sum = KqglAssoMonthPunchSummary.builder().build().selectOne(new QueryWrapper<KqglAssoMonthPunchSummary>().lambda().eq(KqglAssoMonthPunchSummary::getOrgCode, org_code) KqglAssoMonthPunchSummary sum = KqglAssoMonthPunchSummary.builder().build().selectOne(new QueryWrapper<KqglAssoMonthPunchSummary>().lambda().eq(KqglAssoMonthPunchSummary::getOrgCode, org_code)
.eq(KqglAssoMonthPunchSummary::getBelongYear, year).eq(KqglAssoMonthPunchSummary::getBelongMonth, month).eq(KqglAssoMonthPunchSummary::getNum, user.getEmpnum())); .eq(KqglAssoMonthPunchSummary::getBelongYear, year).eq(KqglAssoMonthPunchSummary::getBelongMonth, month).eq(KqglAssoMonthPunchSummary::getNum, user.getEmpnum()));
...@@ -215,6 +216,7 @@ public class LastMonthtimingExport { ...@@ -215,6 +216,7 @@ public class LastMonthtimingExport {
// .eq(KqglAssoMonthPunchSummary::getNum, user.getEmpnum()).eq(KqglAssoMonthPunchSummary::getOrgCode, org_code)); // .eq(KqglAssoMonthPunchSummary::getNum, user.getEmpnum()).eq(KqglAssoMonthPunchSummary::getOrgCode, org_code));
String[] ycqts = new String[31];//应上班的具体天数(yyyy-MM-dd) String[] ycqts = new String[31];//应上班的具体天数(yyyy-MM-dd)
String[] xxts = new String[31];//休息的具体天数(yyyy-MM-dd) String[] xxts = new String[31];//休息的具体天数(yyyy-MM-dd)
String[] fdxx = new String[10];//法定休息的具体天数(yyyy-MM-dd)
List<String> rowData = new ArrayList<String>(); List<String> rowData = new ArrayList<String>();
//休息天数,应出勤天数,实际出勤 //休息天数,应出勤天数,实际出勤
double daysOff = 0,daysOnDuty = 0;//,actualAttDays = 0; double daysOff = 0,daysOnDuty = 0;//,actualAttDays = 0;
...@@ -261,9 +263,19 @@ public class LastMonthtimingExport { ...@@ -261,9 +263,19 @@ public class LastMonthtimingExport {
needfig[e] = String.valueOf(awek.getType());//获取设置的应打卡周几 needfig[e] = String.valueOf(awek.getType());//获取设置的应打卡周几
e++; e++;
} }
//法定節假日
List<KqmkRedletterDay> etter = KqmkRedletterDay.builder().build().selectList(new QueryWrapper<KqmkRedletterDay>().lambda().eq(KqmkRedletterDay::getHolidayStatus, 1).eq(KqmkRedletterDay::getBelongYearmonth, ttstr));
String[] holidays = new String[etter.size()];//法定节假日沦为休息日计算
int h = 0;
for(KqmkRedletterDay spe:etter){
holidays[h] = spe.getHoliday();
h++;
}
String yemo = year + "-" + month; String yemo = year + "-" + month;
sdf1.setLenient(false); sdf1.setLenient(false);
int y = 0,q = 0; int y = 0,q = 0,jj = 0;//jj:节假日
for(int i = 1; i <= ClockInTool.getDaysByYearMonth(year,month); i++){ for(int i = 1; i <= ClockInTool.getDaysByYearMonth(year,month); i++){
Date date1 = sdf1.parse(yemo + "-" + i); Date date1 = sdf1.parse(yemo + "-" + i);
for(int u=0;u<week.length;u++){ for(int u=0;u<week.length;u++){
...@@ -273,11 +285,18 @@ public class LastMonthtimingExport { ...@@ -273,11 +285,18 @@ public class LastMonthtimingExport {
if(Arrays.asList(appmaps).contains(String.valueOf(sdf1.format(date1)))){ if(Arrays.asList(appmaps).contains(String.valueOf(sdf1.format(date1)))){
y = y-1; y = y-1;
} }
if(attgro.getIsFdjjr().equals(1)) {
if(Arrays.asList(holidays).contains(String.valueOf(sdf1.format(date1)))){
y = y-1;
jj ++;
}
}
} }
} }
} }
//全月时间 - 应打卡时间 - 必须打卡时间 + 无需打卡时间 //全月时间 - 应打卡时间 - 必须打卡时间 + 无需打卡时间
int xiuxi = ClockInTool.getDaysByYearMonth(year,month) - q - bxdk + wxdk.size(); int xiuxi = ClockInTool.getDaysByYearMonth(year,month) - q - bxdk + wxdk.size()+jj;
daysOff = xiuxi; daysOff = xiuxi;
daysOnDuty = y+bxdk; daysOnDuty = y+bxdk;
// String[] range=ClockInTool.listToString(ClockInTool.getDays(sdf1.format(c.getTime()),str)).split(";");//目前为止所有日期 // String[] range=ClockInTool.listToString(ClockInTool.getDays(sdf1.format(c.getTime()),str)).split(";");//目前为止所有日期
...@@ -285,6 +304,7 @@ public class LastMonthtimingExport { ...@@ -285,6 +304,7 @@ public class LastMonthtimingExport {
//目前为止应出勤天数 //目前为止应出勤天数
int w = 0,x=0; int w = 0,x=0;
int zj = 6; int zj = 6;
int fd = 0;
for(String num : range) { for(String num : range) {
if(ClockInTool.useArrayUtils(needfig, String.valueOf(ClockInTool.dateToWeek(num)))) {//对比排班应打卡时间 if(ClockInTool.useArrayUtils(needfig, String.valueOf(ClockInTool.dateToWeek(num)))) {//对比排班应打卡时间
String[] ycqtst = new String[ycqts.length + zj]; String[] ycqtst = new String[ycqts.length + zj];
...@@ -327,6 +347,30 @@ public class LastMonthtimingExport { ...@@ -327,6 +347,30 @@ public class LastMonthtimingExport {
xxts = xxtst; xxts = xxtst;
x++; x++;
} }
//当前考勤组开启法定节假日休息开关
if(attgro.getIsFdjjr().equals(1)) {
//法定节假日
if(ClockInTool.useArrayUtils(holidays, num)) {//法定节假日沦为休息日计算
// ycqts = ClockInTool.doChinFilters(ClockInTool.deleteArrayNull(ycqts), num);//为必须休息的话从上班日期中去除
if(ClockInTool.doChinFilters(ClockInTool.deleteArrayNull(ycqts), num) != null) {
ycqts = ClockInTool.doChinFilters(ClockInTool.deleteArrayNull(ycqts), num);//为必须休息的话从上班日期中去除
}
fdxx[fd] = num;
fd ++;
zjgzts = zjgzts - 1;
String[] xxtst = new String[xxts.length + zj];
System.arraycopy(xxts, 0, xxtst, 0, xxts.length);
xxtst[x] = num;
xxts = xxtst;
x++;
}
}
} }
}else if(attgro.getPbfs() == 2){ //自由排班 }else if(attgro.getPbfs() == 2){ //自由排班
DateFormat df = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", Locale.US); DateFormat df = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", Locale.US);
...@@ -397,7 +441,7 @@ public class LastMonthtimingExport { ...@@ -397,7 +441,7 @@ public class LastMonthtimingExport {
} }
} }
} }
List<PunchRecord> initial = punchrecordmapper.getMaintenancePunchCardList(startDate,endDate,user.getEmpnum()); List<PunchRecord> initial = punchrecordmapper.getMaintenancePunchCardList(startDate,endDate,user.getEmpnum(),org_code);
// // 迟到次数 迟到时长 早退次数 早退时长 // // 迟到次数 迟到时长 早退次数 早退时长
// int latenum = 0,latehours = 0,leanum = 0,leahours = 0;// 迟到次数 // int latenum = 0,latehours = 0,leanum = 0,leahours = 0;// 迟到次数
String[] cdts = new String[31];//迟到的具体天数 String[] cdts = new String[31];//迟到的具体天数
...@@ -488,8 +532,10 @@ public class LastMonthtimingExport { ...@@ -488,8 +532,10 @@ public class LastMonthtimingExport {
String sjs = "",qinjia = "",chuaca = "",waichu = "",buka = "",jiaban = ""; String sjs = "",qinjia = "",chuaca = "",waichu = "",buka = "",jiaban = "";
if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(xxts), num) && ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(dkjtts),num)) { if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(xxts), num) && ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(dkjtts),num)) {
rowData.add("休息并打卡"); rowData.add("休息并打卡");
}else if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(xxts), num)){ }else if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(xxts), num) && !ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(fdxx), num)){
rowData.add("休息"); rowData.add("休息");
}else if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(fdxx), num)){
rowData.add("法定节假日休息");
}else { }else {
if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(ycqts), num) && !ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(dkjtts), num) && !ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(leaves), num) && !ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(travels), num) && !ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(goouts), num) && !ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(cards), num)) { if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(ycqts), num) && !ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(dkjtts), num) && !ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(leaves), num) && !ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(travels), num) && !ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(goouts), num) && !ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(cards), num)) {
rowData.add("旷工"); rowData.add("旷工");
...@@ -503,7 +549,24 @@ public class LastMonthtimingExport { ...@@ -503,7 +549,24 @@ public class LastMonthtimingExport {
}else if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(sblacks), num) && ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(ztts), num)) { }else if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(sblacks), num) && ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(ztts), num)) {
rowData.add("上班缺卡,下班早退"); rowData.add("上班缺卡,下班早退");
}else if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(cdts), num)) { }else if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(cdts), num)) {
rowData.add("上班迟到"); // rowData.add("上班迟到");
KqglAssoDkmx dkm = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, user.getEmpnum())
.eq(KqglAssoDkmx::getQyid, org_code).eq(KqglAssoDkmx::getData, num));
if(dkm.getYdkcs() == 2 || dkm.getYdkcs() == 4 || dkm.getYdkcs() == 6) {
if(dkm.getSbdk1jg() > 0) {
rowData.add("上班1迟到,打卡时间:"+ClockInTool.stampToDate3(String.valueOf(dkm.getSbdk1()))+",迟到"+dkm.getSbdk1jg()+"分钟");
}
}
if(dkm.getYdkcs() == 4 || dkm.getYdkcs() == 6) {
if(dkm.getSbdk2jg() > 0) {
rowData.add("上班2迟到,打卡时间:"+ClockInTool.stampToDate3(String.valueOf(dkm.getSbdk2()))+",迟到"+dkm.getSbdk2jg()+"分钟");
}
}
if(dkm.getYdkcs() == 6) {
if(dkm.getSbdk3jg() > 0) {
rowData.add("上班3迟到,打卡时间:"+ClockInTool.stampToDate3(String.valueOf(dkm.getSbdk3()))+",迟到"+dkm.getSbdk3jg()+"分钟");
}
}
}else if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(cdts), num) && ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(xblacks), num)) { }else if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(cdts), num) && ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(xblacks), num)) {
rowData.add("上班迟到,下班缺卡"); rowData.add("上班迟到,下班缺卡");
}else if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(cdts), num) && ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(ztts), num)) { }else if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(cdts), num) && ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(ztts), num)) {
...@@ -512,7 +575,24 @@ public class LastMonthtimingExport { ...@@ -512,7 +575,24 @@ public class LastMonthtimingExport {
}else if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(xblacks),num)) { }else if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(xblacks),num)) {
rowData.add("下班缺卡"); rowData.add("下班缺卡");
}else if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(ztts), num)) { }else if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(ztts), num)) {
rowData.add("下班早退"); // rowData.add("下班早退");
KqglAssoDkmx dkm = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, user.getEmpnum())
.eq(KqglAssoDkmx::getQyid, org_code).eq(KqglAssoDkmx::getData, num));
if(dkm.getYdkcs() == 2 || dkm.getYdkcs() == 4 || dkm.getYdkcs() == 6) {
if(dkm.getXbdk1jg() > 0) {
rowData.add("下班1早退,打卡时间:"+ClockInTool.stampToDate3(String.valueOf(dkm.getXbdk1()))+",早退"+dkm.getXbdk1jg()+"分钟");
}
}
if(dkm.getYdkcs() == 4 || dkm.getYdkcs() == 6) {
if(dkm.getXbdk2jg() > 0) {
rowData.add("下班2早退,打卡时间:"+ClockInTool.stampToDate3(String.valueOf(dkm.getXbdk2()))+",早退"+dkm.getXbdk2jg()+"分钟");
}
}
if(dkm.getYdkcs() == 6) {
if(dkm.getXbdk3jg() > 0) {
rowData.add("下班3早退,打卡时间:"+ClockInTool.stampToDate3(String.valueOf(dkm.getXbdk3()))+",早退"+dkm.getXbdk3jg()+"分钟");
}
}
}else { }else {
rowData.add("正常"); rowData.add("正常");
} }
......
...@@ -21,6 +21,7 @@ import cn.timer.api.bean.kqgl.PunchCardDetails; ...@@ -21,6 +21,7 @@ import cn.timer.api.bean.kqgl.PunchCardDetails;
import cn.timer.api.bean.kqgl.PunchRecord; import cn.timer.api.bean.kqgl.PunchRecord;
import cn.timer.api.bean.kqgl.Schedule; import cn.timer.api.bean.kqgl.Schedule;
import cn.timer.api.bean.kqmk.KqglAssoBcsz; 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.KqglAssoLeaveRules;
import cn.timer.api.bean.kqmk.KqglAssoMonthPunchSummary; import cn.timer.api.bean.kqmk.KqglAssoMonthPunchSummary;
import cn.timer.api.bean.kqmk.KqglAssoOvertimeBasics; import cn.timer.api.bean.kqmk.KqglAssoOvertimeBasics;
...@@ -29,6 +30,7 @@ import cn.timer.api.bean.kqmk.KqglAssoRelationSummary; ...@@ -29,6 +30,7 @@ import cn.timer.api.bean.kqmk.KqglAssoRelationSummary;
import cn.timer.api.bean.kqmk.KqglAssoTeshu; import cn.timer.api.bean.kqmk.KqglAssoTeshu;
import cn.timer.api.bean.kqmk.KqglAssoZhoupaiban; import cn.timer.api.bean.kqmk.KqglAssoZhoupaiban;
import cn.timer.api.bean.kqmk.KqglMainKqz; import cn.timer.api.bean.kqmk.KqglMainKqz;
import cn.timer.api.bean.kqmk.KqmkRedletterDay;
import cn.timer.api.controller.kqgl.ClockInController; import cn.timer.api.controller.kqgl.ClockInController;
import cn.timer.api.controller.kqgl.ClockInTool; import cn.timer.api.controller.kqgl.ClockInTool;
import cn.timer.api.controller.kqgl.EmptyUtil; import cn.timer.api.controller.kqgl.EmptyUtil;
...@@ -205,6 +207,7 @@ public class RealTimeUpdate{ ...@@ -205,6 +207,7 @@ public class RealTimeUpdate{
// .eq(KqglAssoMonthPunchSummary::getNum, user.getEmpnum()).eq(KqglAssoMonthPunchSummary::getOrgCode, org_code)); // .eq(KqglAssoMonthPunchSummary::getNum, user.getEmpnum()).eq(KqglAssoMonthPunchSummary::getOrgCode, org_code));
String[] ycqts = new String[31];//应上班的具体天数(yyyy-MM-dd) String[] ycqts = new String[31];//应上班的具体天数(yyyy-MM-dd)
String[] xxts = new String[31];//休息的具体天数(yyyy-MM-dd) String[] xxts = new String[31];//休息的具体天数(yyyy-MM-dd)
String[] fdxx = new String[10];//法定休息的具体天数(yyyy-MM-dd)
List<String> rowData = new ArrayList<String>(); List<String> rowData = new ArrayList<String>();
//休息天数,应出勤天数,实际出勤 //休息天数,应出勤天数,实际出勤
double daysOff = 0,daysOnDuty = 0;//,actualAttDays = 0; double daysOff = 0,daysOnDuty = 0;//,actualAttDays = 0;
...@@ -251,9 +254,19 @@ public class RealTimeUpdate{ ...@@ -251,9 +254,19 @@ public class RealTimeUpdate{
needfig[e] = String.valueOf(awek.getType());//获取设置的应打卡周几 needfig[e] = String.valueOf(awek.getType());//获取设置的应打卡周几
e++; e++;
} }
//法定節假日
List<KqmkRedletterDay> etter = KqmkRedletterDay.builder().build().selectList(new QueryWrapper<KqmkRedletterDay>().lambda().eq(KqmkRedletterDay::getHolidayStatus, 1).eq(KqmkRedletterDay::getBelongYearmonth, ttstr));
String[] holidays = new String[etter.size()];//法定节假日沦为休息日计算
int h = 0;
for(KqmkRedletterDay spe:etter){
holidays[h] = spe.getHoliday();
h++;
}
String yemo = year + "-" + month; String yemo = year + "-" + month;
sdf1.setLenient(false); sdf1.setLenient(false);
int y = 0,q = 0; int y = 0,q = 0,jj = 0;//jj:节假日
for(int i = 1; i <= ClockInTool.getDaysByYearMonth(year,month); i++){ for(int i = 1; i <= ClockInTool.getDaysByYearMonth(year,month); i++){
Date date1 = sdf1.parse(yemo + "-" + i); Date date1 = sdf1.parse(yemo + "-" + i);
for(int u=0;u<week.length;u++){ for(int u=0;u<week.length;u++){
...@@ -263,11 +276,18 @@ public class RealTimeUpdate{ ...@@ -263,11 +276,18 @@ public class RealTimeUpdate{
if(Arrays.asList(appmaps).contains(String.valueOf(sdf1.format(date1)))){ if(Arrays.asList(appmaps).contains(String.valueOf(sdf1.format(date1)))){
y = y-1; y = y-1;
} }
if(attgro.getIsFdjjr().equals(1)) {
if(Arrays.asList(holidays).contains(String.valueOf(sdf1.format(date1)))){
y = y-1;
jj ++;
}
}
} }
} }
} }
//全月时间 - 应打卡时间 - 必须打卡时间 + 无需打卡时间 //全月时间 - 应打卡时间 - 必须打卡时间 + 无需打卡时间
int xiuxi = ClockInTool.getDaysByYearMonth(year,month) - q - bxdk + wxdk.size(); int xiuxi = ClockInTool.getDaysByYearMonth(year,month) - q - bxdk + wxdk.size()+jj;
daysOff = xiuxi; daysOff = xiuxi;
daysOnDuty = y+bxdk; daysOnDuty = y+bxdk;
// String[] range=ClockInTool.listToString(ClockInTool.getDays(sdf1.format(c.getTime()),str)).split(";");//目前为止所有日期 // String[] range=ClockInTool.listToString(ClockInTool.getDays(sdf1.format(c.getTime()),str)).split(";");//目前为止所有日期
...@@ -275,6 +295,7 @@ public class RealTimeUpdate{ ...@@ -275,6 +295,7 @@ public class RealTimeUpdate{
//目前为止应出勤天数 //目前为止应出勤天数
int w = 0,x=0; int w = 0,x=0;
int zj = 6; int zj = 6;
int fd = 0;
for(String num : range) { for(String num : range) {
if(Arrays.binarySearch(needfig, String.valueOf(ClockInTool.dateToWeek(num))) >= 0) {//对比排班应打卡时间 if(Arrays.binarySearch(needfig, String.valueOf(ClockInTool.dateToWeek(num))) >= 0) {//对比排班应打卡时间
String[] ycqtst = new String[ycqts.length + zj]; String[] ycqtst = new String[ycqts.length + zj];
...@@ -317,6 +338,31 @@ public class RealTimeUpdate{ ...@@ -317,6 +338,31 @@ public class RealTimeUpdate{
xxts = xxtst; xxts = xxtst;
x++; x++;
} }
//当前考勤组开启法定节假日休息开关
if(attgro.getIsFdjjr().equals(1)) {
//法定节假日
if(ClockInTool.useArrayUtils(holidays, num)) {//法定节假日沦为休息日计算
// ycqts = ClockInTool.doChinFilters(ClockInTool.deleteArrayNull(ycqts), num);//为必须休息的话从上班日期中去除
if(ClockInTool.doChinFilters(ClockInTool.deleteArrayNull(ycqts), num) != null) {
ycqts = ClockInTool.doChinFilters(ClockInTool.deleteArrayNull(ycqts), num);//为必须休息的话从上班日期中去除
}
fdxx[fd] = num;
fd ++;
zjgzts = zjgzts - 1;
String[] xxtst = new String[xxts.length + zj];
System.arraycopy(xxts, 0, xxtst, 0, xxts.length);
xxtst[x] = num;
xxts = xxtst;
x++;
}
}
} }
}else if(attgro.getPbfs() == 2){ //自由排班 }else if(attgro.getPbfs() == 2){ //自由排班
DateFormat df = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", Locale.US); DateFormat df = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", Locale.US);
...@@ -473,39 +519,81 @@ public class RealTimeUpdate{ ...@@ -473,39 +519,81 @@ public class RealTimeUpdate{
// List<String> rowData = new ArrayList<String>(); // List<String> rowData = new ArrayList<String>();
//遍历目前为止所有日期 结合该用户发起的审批进行结合 //遍历目前为止所有日期 结合该用户发起的审批进行结合
//1:加班 2:请假 3:出差 4:外出 5:补卡 //1:加班 2:请假 3:出差 4:外出 5:补卡
int u = 0;
int p = 1;
for(String num : range) { for(String num : range) {
if(Arrays.binarySearch(ClockInTool.deleteArrayNull(xxts), num) >= 0 && Arrays.binarySearch(ClockInTool.deleteArrayNull(dkjtts),num) >= 0) {
String sjs = "",qinjia = "",chuaca = "",waichu = "",buka = "",jiaban = "";
if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(xxts), num) && ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(dkjtts),num)) {
rowData.add("休息并打卡"); rowData.add("休息并打卡");
}else if(Arrays.binarySearch(ClockInTool.deleteArrayNull(xxts), num) >= 0){ }else if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(xxts), num) && !ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(fdxx), num)){
rowData.add("休息"); rowData.add("休息");
}else if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(fdxx), num)){
rowData.add("法定节假日休息");
}else { }else {
if(Arrays.binarySearch(ClockInTool.deleteArrayNull(ycqts), num) >= 0 && Arrays.binarySearch(ClockInTool.deleteArrayNull(dkjtts), num) < 0 && Arrays.binarySearch(ClockInTool.deleteArrayNull(leaves), num) < 0 && Arrays.binarySearch(ClockInTool.deleteArrayNull(travels), num) < 0 && Arrays.binarySearch(ClockInTool.deleteArrayNull(goouts), num) < 0 && Arrays.binarySearch(ClockInTool.deleteArrayNull(cards), num) < 0) { if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(ycqts), num) && !ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(dkjtts), num) && !ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(leaves), num) && !ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(travels), num) && !ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(goouts), num) && !ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(cards), num)) {
rowData.add("旷工"); rowData.add("旷工");
}else if(Arrays.binarySearch(ClockInTool.deleteArrayNull(ycqts), num) < 0 && Arrays.binarySearch(ClockInTool.deleteArrayNull(xxts), num) < 0) {//日期不在上班也不在休息里面即为未排班 }else if(!ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(ycqts), num) && !ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(xxts), num)) {//日期不在上班也不在休息里面即为未排班
rowData.add("未排班"); rowData.add("未排班");
}else if(sdf1.parse(beginTime).getTime() < sdf1.parse(num).getTime()) { }else if(sdf1.parse(beginTime).getTime() < sdf1.parse(num).getTime()) {
rowData.add("未到班期"); rowData.add("未到班期");
}else { }else {
if(Arrays.binarySearch(ClockInTool.deleteArrayNull(sblacks), num) >= 0) { if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(sblacks), num)) {
rowData.add("上班缺卡"); rowData.add("上班缺卡");
}else if(Arrays.binarySearch(ClockInTool.deleteArrayNull(sblacks), num) >= 0 && Arrays.binarySearch(ClockInTool.deleteArrayNull(ztts), num) >= 0) { }else if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(sblacks), num) && ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(ztts), num)) {
rowData.add("上班缺卡,下班早退"); rowData.add("上班缺卡,下班早退");
}else if(Arrays.binarySearch(ClockInTool.deleteArrayNull(cdts), num) >= 0) { }else if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(cdts), num)) {
rowData.add("上班迟到"); // rowData.add("上班迟到");
}else if(Arrays.binarySearch(ClockInTool.deleteArrayNull(cdts), num) >= 0 && Arrays.binarySearch(ClockInTool.deleteArrayNull(xblacks), num) >= 0) { KqglAssoDkmx dkm = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, user.getEmpnum())
.eq(KqglAssoDkmx::getQyid, org_code).eq(KqglAssoDkmx::getData, num));
if(dkm.getYdkcs() == 2 || dkm.getYdkcs() == 4 || dkm.getYdkcs() == 6) {
if(dkm.getSbdk1jg() > 0) {
rowData.add("上班1迟到,打卡时间:"+ClockInTool.stampToDate3(String.valueOf(dkm.getSbdk1()))+",迟到"+dkm.getSbdk1jg()+"分钟");
}
}
if(dkm.getYdkcs() == 4 || dkm.getYdkcs() == 6) {
if(dkm.getSbdk2jg() > 0) {
rowData.add("上班2迟到,打卡时间:"+ClockInTool.stampToDate3(String.valueOf(dkm.getSbdk2()))+",迟到"+dkm.getSbdk2jg()+"分钟");
}
}
if(dkm.getYdkcs() == 6) {
if(dkm.getSbdk3jg() > 0) {
rowData.add("上班3迟到,打卡时间:"+ClockInTool.stampToDate3(String.valueOf(dkm.getSbdk3()))+",迟到"+dkm.getSbdk3jg()+"分钟");
}
}
}else if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(cdts), num) && ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(xblacks), num)) {
rowData.add("上班迟到,下班缺卡"); rowData.add("上班迟到,下班缺卡");
}else if(Arrays.binarySearch(ClockInTool.deleteArrayNull(cdts), num) >= 0 && Arrays.binarySearch(ClockInTool.deleteArrayNull(ztts), num) >= 0) { }else if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(cdts), num) && ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(ztts), num)) {
rowData.add("上班迟到,下班早退"); rowData.add("上班迟到,下班早退");
}else if(Arrays.binarySearch(ClockInTool.deleteArrayNull(xblacks), num) >= 0) { // }else if(Arrays.binarySearch(ClockInTool.deleteArrayNull(xblacks), num) >= 0) {
}else if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(xblacks),num)) {
rowData.add("下班缺卡"); rowData.add("下班缺卡");
}else if(Arrays.binarySearch(ClockInTool.deleteArrayNull(ztts), num) >= 0) { }else if(ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(ztts), num)) {
rowData.add("下班早退"); // rowData.add("下班早退");
KqglAssoDkmx dkm = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, user.getEmpnum())
.eq(KqglAssoDkmx::getQyid, org_code).eq(KqglAssoDkmx::getData, num));
if(dkm.getYdkcs() == 2 || dkm.getYdkcs() == 4 || dkm.getYdkcs() == 6) {
if(dkm.getXbdk1jg() > 0) {
rowData.add("下班1早退,打卡时间:"+ClockInTool.stampToDate3(String.valueOf(dkm.getXbdk1()))+",早退"+dkm.getXbdk1jg()+"分钟");
}
}
if(dkm.getYdkcs() == 4 || dkm.getYdkcs() == 6) {
if(dkm.getXbdk2jg() > 0) {
rowData.add("下班2早退,打卡时间:"+ClockInTool.stampToDate3(String.valueOf(dkm.getXbdk2()))+",早退"+dkm.getXbdk2jg()+"分钟");
}
}
if(dkm.getYdkcs() == 6) {
if(dkm.getXbdk3jg() > 0) {
rowData.add("下班3早退,打卡时间:"+ClockInTool.stampToDate3(String.valueOf(dkm.getXbdk3()))+",早退"+dkm.getXbdk3jg()+"分钟");
}
}
}else { }else {
rowData.add("正常"); rowData.add("正常");
} }
} }
} }
/******/
if(ClockInTool.contains(ClockInTool.deleteArrayNull(leaves),num)) { if(ClockInTool.contains(ClockInTool.deleteArrayNull(leaves),num)) {
KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 2)); KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 2));
String leavetype = "未知";//请假类型 String leavetype = "未知";//请假类型
...@@ -520,19 +608,22 @@ public class RealTimeUpdate{ ...@@ -520,19 +608,22 @@ public class RealTimeUpdate{
else { company = "小时"; } else { company = "小时"; }
} }
} }
rowData.add(lea.getStartTime() +"到"+ lea.getEndTime()+"请"+leavetype+lea.getDuration()+company); qinjia = "#"+(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"请"+leavetype+lea.getDuration()+company;
} }
if(ClockInTool.contains(ClockInTool.deleteArrayNull(travels),num)) { if(ClockInTool.contains(ClockInTool.deleteArrayNull(travels),num)) {
KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 3)); KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 3));
rowData.add(lea.getStartTime() +"到"+ lea.getEndTime()+"出差"+lea.getDuration()+"天");
chuaca = "#"+(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"出差"+lea.getDuration()+"天";
} }
if(ClockInTool.contains(ClockInTool.deleteArrayNull(goouts),num)) { if(ClockInTool.contains(ClockInTool.deleteArrayNull(goouts),num)) {
KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 4)); KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 4));
rowData.add(lea.getStartTime() +"到"+ lea.getEndTime()+"外出"+lea.getDuration()+"天");
waichu = "#"+(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"外出"+lea.getDuration()+"天";
} }
if(ClockInTool.contains(ClockInTool.deleteArrayNull(cards),num)) { if(ClockInTool.contains(ClockInTool.deleteArrayNull(cards),num)) {
KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 5)); KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 5));
rowData.add("已补卡:"+lea.getStartTime());
buka = "#"+"已补卡:"+(lea.getStartTime()).substring(5, 16);
} }
if(ClockInTool.contains(ClockInTool.deleteArrayNull(overtimes),num)) { if(ClockInTool.contains(ClockInTool.deleteArrayNull(overtimes),num)) {
...@@ -552,7 +643,8 @@ public class RealTimeUpdate{ ...@@ -552,7 +643,8 @@ public class RealTimeUpdate{
if(lea.getCompensateId() == 1) { method="转调休"; } if(lea.getCompensateId() == 1) { method="转调休"; }
else if(lea.getCompensateId() == 2) { method="转加班费"; } else if(lea.getCompensateId() == 2) { method="转加班费"; }
else {method="转调休或加班费";} else {method="转调休或加班费";}
rowData.add(lea.getStartTime() +"到"+ lea.getEndTime()+"加班"+lea.getDuration()+company+"["+method+"]");
jiaban = "#"+(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"加班"+lea.getDuration()+company+"["+method+"]";
//防止多运算 //防止多运算
if(lea.getOrdernum() == lea.getTotals()) { if(lea.getOrdernum() == lea.getTotals()) {
//加班补偿方式 1:转调休;2:转加班费;3:转调休或加班费 //加班补偿方式 1:转调休;2:转加班费;3:转调休或加班费
...@@ -579,18 +671,29 @@ public class RealTimeUpdate{ ...@@ -579,18 +671,29 @@ public class RealTimeUpdate{
if(!ClockInTool.contains(ClockInTool.deleteArrayNull(ycqts),num) && !ClockInTool.contains(ClockInTool.deleteArrayNull(xxts),num)) { if(!ClockInTool.contains(ClockInTool.deleteArrayNull(ycqts),num) && !ClockInTool.contains(ClockInTool.deleteArrayNull(xxts),num)) {
if(lea.getOvertimeTypeId() == 3) { if(lea.getOvertimeTypeId() == 3) {
if(lea.getCompensateId() == 1 || lea.getCompensateId() == 3) { if(lea.getCompensateId() == 1 || lea.getCompensateId() == 3) {
// holidayturncompenleave++;
holidayturncompenleave = holidayturncompenleave + lea.getDuration(); holidayturncompenleave = holidayturncompenleave + lea.getDuration();
}else if(lea.getCompensateId() == 2 || lea.getCompensateId() == 4) { }else if(lea.getCompensateId() == 2 || lea.getCompensateId() == 4) {
// holidaytransferovertime++;
holidaytransferovertime = holidaytransferovertime + lea.getDuration(); holidaytransferovertime = holidaytransferovertime + lea.getDuration();
} }
} }
} }
} }
} }
}
if(rowData.size() == p) {
sjs = "";
if(("").equals(qinjia) && ("").equals(chuaca) && ("").equals(waichu) && ("").equals(buka) && ("").equals(jiaban)) {
sjs = rowData.get(u);
}else {
sjs = rowData.get(u)+";";
}
} }
rowData.remove(u);
rowData.add(u,sjs + qinjia+chuaca+waichu+buka+jiaban);
/****/
//////// ////////
...@@ -646,6 +749,9 @@ public class RealTimeUpdate{ ...@@ -646,6 +749,9 @@ public class RealTimeUpdate{
} }
} }
} }
u++;
p++;
} }
}else { }else {
for (String num2 : range) { for (String num2 : range) {
......
package cn.timer.api.controller.kqgl.holiday;
import java.util.Date;
public class ChinaDate {
/**
* 公历时间
*/
private Date solarDate;
/**
* 农历日
*/
private String lunar;
/**
* 公历日
*/
private String solar;
/**
* 是否是 休
*/
private boolean isVacation = false;
/**
* 如果是 休情况下的假期名字
*/
private String VacationName = "非假期";
/**
* 是否是 班
*/
private boolean isWorkFlag = false;
private boolean isSaturday = false;
private boolean isSunday = false;
/**
* @return the solarDate
*/
public Date getSolarDate() {
return solarDate;
}
/**
* @param solarDate the solarDate to set
*/
public void setSolarDate(Date solarDate) {
this.solarDate = solarDate;
}
/**
* @return the lunar
*/
public String getLunar() {
return lunar;
}
/**
* @param lunar the lunar to set
*/
public void setLunar(String lunar) {
this.lunar = lunar;
}
/**
* @return the solar
*/
public String getSolar() {
return solar;
}
/**
* @param solar the solar to set
*/
public void setSolar(String solar) {
this.solar = solar;
}
/**
* @return the isVacation
*/
public boolean isVacation() {
return isVacation;
}
/**
* @param isVacation the isVacation to set
*/
public void setVacation(boolean isVacation) {
this.isVacation = isVacation;
}
/**
* @return the vacationName
*/
public String getVacationName() {
return VacationName;
}
/**
* @param vacationName the vacationName to set
*/
public void setVacationName(String vacationName) {
VacationName = vacationName;
}
/**
* @return the isWorkFlag
*/
public boolean isWorkFlag() {
return isWorkFlag;
}
/**
* @param isWorkFlag the isWorkFlag to set
*/
public void setWorkFlag(boolean isWorkFlag) {
this.isWorkFlag = isWorkFlag;
}
/**
* @return the isSaturday
*/
public boolean isSaturday() {
return isSaturday;
}
/**
* @param isSaturday the isSaturday to set
*/
public void setSaturday(boolean isSaturday) {
this.isSaturday = isSaturday;
}
/**
* @return the isSunday
*/
public boolean isSunday() {
return isSunday;
}
/**
* @param isSunday the isSunday to set
*/
public void setSunday(boolean isSunday) {
this.isSunday = isSunday;
}
}
\ No newline at end of file
package cn.timer.api.controller.kqgl.holiday;
import java.io.IOException;
import java.net.MalformedURLException;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException;
import com.gargoylesoftware.htmlunit.WebClient;
import com.gargoylesoftware.htmlunit.html.DomNodeList;
import com.gargoylesoftware.htmlunit.html.HtmlElement;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
import cn.timer.api.bean.kqmk.KqmkRedletterDay;
import cn.timer.api.dao.kqmk.KqmkRedletterDayMapper;
public class Main {
private static String latestVocationName = "";
public String getVocationName(DomNodeList<HtmlElement> htmlElements, String date) throws ParseException {
String rst = "";
boolean pastTimeFlag = false;
DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd");
Date paramDate = dateFormat.parse(date);
if (new Date().getTime() >= paramDate.getTime()) {
pastTimeFlag = true;
}
//first step //jugde if can get vocation name from html page
for (int i = 0; i < htmlElements.size(); i++) {
HtmlElement element = htmlElements.get(i);
if (element.getAttribute("class").indexOf("vacation") != -1) {
boolean hitFlag = false;
String voationName = "";
for (; i < htmlElements.size(); i++) {
HtmlElement elementTmp = htmlElements.get(i);
String liDate = elementTmp.getAttribute("date");
List<HtmlElement> lunar = elementTmp.getElementsByAttribute("span", "class", "lunar");
String lanarText = lunar.get(0).asText();
if (lanarText.equals("元旦")) {
voationName = "元旦";
} else if (lanarText.equals("除夕") || lanarText.equals("春节")) {
voationName = "春节";
} else if (lanarText.equals("清明")) {
voationName = "清明";
} else if (lanarText.equals("国际劳动节")) {
voationName = "国际劳动节";
} else if (lanarText.equals("端午节")) {
voationName = "端午节";
} else if (lanarText.equals("中秋节")) {
voationName = "中秋节";
} else if (lanarText.equals("国庆节")) {
voationName = "国庆节";
}
if (liDate.equals(date)) {
hitFlag = true;
}
if (elementTmp.getAttribute("class").indexOf("vacation") == -1) {
break;
}
}
if (hitFlag == true && !voationName.equals("")) {
rst = voationName;
break;
}
} else {
continue;
}
}
//if first step fail(rarely), get from the latest Vocation name
if (rst.equals("")) {
System.out.println("warning: fail to get vocation name from html page.");
//you can judge by some simple rule
//from the latest Vocation name
rst = Main.latestVocationName;
} else if (pastTimeFlag == true) {
//更新《当前时间,且最近一次的可见的假期名
Main.latestVocationName = rst;
}
return rst;
}
public List<ChinaDate> getCurrentDateInfo() {
WebClient webClient = null;
List<ChinaDate> dateList = null;
try {
DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd");
dateList = new ArrayList<ChinaDate>();
webClient = new WebClient();
HtmlPage page = webClient.getPage("http://hao.360.cn/rili/");
//最大等待60秒
for (int k = 0; k < 60; k++) {
if (!page.getElementById("M-dates").asText().equals(""))
break;
Thread.sleep(1000);
}
//睡了8秒,等待页面加载完成...,有时候,页面可能获取不到,不稳定()
//Thread.sleep(8000);
DomNodeList<HtmlElement> htmlElements = page.getElementById("M-dates").getElementsByTagName("li");
//System.out.println(htmlElements.size());
for (HtmlElement element : htmlElements) {
ChinaDate chinaDate = new ChinaDate();
List<HtmlElement> lunar = element.getElementsByAttribute("span", "class", "lunar");
List<HtmlElement> solar = element.getElementsByAttribute("div", "class", "solar");
chinaDate.setLunar(lunar.get(0).asText());
chinaDate.setSolar(solar.get(0).asText());
chinaDate.setSolarDate(dateFormat.parse(element.getAttribute("date")));
if (element.getAttribute("class").indexOf("vacation") != -1) {
chinaDate.setVacation(true);
chinaDate.setVacationName(this.getVocationName(htmlElements, element.getAttribute("date")));
}
if (element.getAttribute("class").indexOf("weekend") != -1
&& element.getAttribute("class").indexOf("last") == -1) {
chinaDate.setSaturday(true);
}
if (element.getAttribute("class").indexOf("last weekend") != -1) {
chinaDate.setSunday(true);
}
if (element.getAttribute("class").indexOf("work") != -1) {
chinaDate.setWorkFlag(true);
} else if (chinaDate.isSaturday() == false && chinaDate.isSunday() == false
&& chinaDate.isVacation() == false) {
chinaDate.setWorkFlag(true);
} else {
chinaDate.setWorkFlag(false);
}
dateList.add(chinaDate);
}
} catch (Exception e) {
e.printStackTrace();
System.out.println("get date from http://hao.360.cn/rili/ error~");
} finally {
webClient.close();
}
return dateList;
}
public ChinaDate getTodayInfo() {
List<ChinaDate> dateList = this.getCurrentDateInfo();
DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd");
for (ChinaDate date : dateList) {
if (dateFormat.format(date.getSolarDate()).equals(dateFormat.format(new Date()))) {
return date;
}
}
return new ChinaDate();
}
public static void main(String[] args) throws FailingHttpStatusCodeException, MalformedURLException, IOException, InterruptedException {
List<ChinaDate> dateList = new Main().getCurrentDateInfo();
ChinaDate today = new Main().getTodayInfo();
DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd");
System.out.println("本月详情:");
String yymm = new SimpleDateFormat("yyyy-MM").format(new Date()).toString();//
for (ChinaDate date : dateList) {
// System.out.println(dateFormat.format(date.getSolarDate()) + " " + date.getVacationName());
// System.out.println(dateFormat.format(date.getSolarDate()).replaceAll("/", "-") + " " + date.getVacationName());
String str = dateFormat.format(date.getSolarDate()).replaceAll("/", "-");
//INSERT INTO kqmk_redletter_day VALUES ( value1, value2,...valueN );
String jieri = date.getVacationName();
boolean status = jieri.contains("节");
int holidaystatus = 0;
if(status) {
holidaystatus = 1;
}
System.out.println("INSERT INTO kqmk_redletter_day(holiday,holiday_name,holiday_status,belong_yearmonth) VALUES(" + '"'+str +'"'+ "," +'"'+date.getVacationName()+'"'+ "," +holidaystatus+ "," + '"'+yymm+'"'+ ");");
}
// System.out.println("------------------------------------------------------------------------");
// System.out.println("今日详情:");
// System.out.println("日期:" + today.getSolarDate());
// System.out.println("农历:" + today.getLunar());
// System.out.println("公历:" + today.getSolar());
// System.out.println("假期名:" + today.getVacationName());
// System.out.println("是否周六:" + today.isSaturday());
// System.out.println("是否周日:" + today.isSunday());
// System.out.println("是否休假:" + today.isVacation());
// System.out.println("是否工作日:" + today.isWorkFlag());
// System.out.println("已发生的最近一次假期:" + Main.latestVocationName);
}
}
...@@ -763,7 +763,7 @@ public class KqglServiceImpl implements KqglService { ...@@ -763,7 +763,7 @@ public class KqglServiceImpl implements KqglService {
double gzsc = 0; double gzsc = 0;
long rest_time = 0; long rest_time = 0;
if(shif.getStartTime() != null && shif.getEndTime() != null) { if(shif.getStartTime() != null && !("").equals(shif.getStartTime()) && shif.getEndTime() != null && !("").equals(shif.getEndTime())) {
long kaishixiuxi = Long.valueOf(ClockInTool.dateToStamp(cardrepltime + " " +shif.getStartTime()+":00")); long kaishixiuxi = Long.valueOf(ClockInTool.dateToStamp(cardrepltime + " " +shif.getStartTime()+":00"));
long jieshuxiuxi = Long.valueOf(ClockInTool.dateToStamp(cardrepltime + " " +shif.getEndTime()+":00")); long jieshuxiuxi = Long.valueOf(ClockInTool.dateToStamp(cardrepltime + " " +shif.getEndTime()+":00"));
rest_time = (jieshuxiuxi - kaishixiuxi)/1000/60;//休息时间 rest_time = (jieshuxiuxi - kaishixiuxi)/1000/60;//休息时间
......
...@@ -499,6 +499,19 @@ public class SocialSecurityFundController { ...@@ -499,6 +499,19 @@ public class SocialSecurityFundController {
} }
@GetMapping(value = "/insure_details/{name}")
@ApiOperation(value = "投保事件", httpMethod = "GET", notes = "接口发布说明")
public ResponseResult insureDetails(@CurrentUser UserBean userBean,@PathVariable String name) {
List<SbgjjAssoCbfa> cbfalist = new LambdaQueryChainWrapper<SbgjjAssoCbfa>(sbgjjassocbfamapper).eq(SbgjjAssoCbfa::getCbcs, name)
.eq(SbgjjAssoCbfa::getQyid, userBean.getOrgCode()).list();
return new ResponseResult().success("成功", cbfalist);
}
@Autowired @Autowired
private SbgjjAssoDetailedMapper sbgjjassodetailedmapper; private SbgjjAssoDetailedMapper sbgjjassodetailedmapper;
...@@ -555,6 +568,8 @@ public class SocialSecurityFundController { ...@@ -555,6 +568,8 @@ public class SocialSecurityFundController {
cbry.setSbfaid(insuredto.getSbfaid()); cbry.setSbfaid(insuredto.getSbfaid());
cbry.setGjjfaid(insuredto.getGjjfaid()); cbry.setGjjfaid(insuredto.getGjjfaid());
cbry.setIsUse(1);//是否使用 0:否 1:是
sbgjjadmincbrymapper.insertsbgjjadmincbry(cbry); sbgjjadmincbrymapper.insertsbgjjadmincbry(cbry);
int cbryid = cbry.getId();//参保人员 int cbryid = cbry.getId();//参保人员
...@@ -581,7 +596,7 @@ public class SocialSecurityFundController { ...@@ -581,7 +596,7 @@ public class SocialSecurityFundController {
if(Double.valueOf(sbjs.getJsxx()) > Double.valueOf(insuredto.getJnjs())) { if(Double.valueOf(sbjs.getJsxx()) > Double.valueOf(insuredto.getJnjs())) {
jishuxx = Double.valueOf(sbjs.getJsxx());//基数下限 jishuxx = Double.valueOf(sbjs.getJsxx());//基数下限
}else { }else {
jishuxx = Double.valueOf(insuredto.getJnjs());//基数下限 jishuxx = Double.valueOf(insuredto.getJnjs());//用户填写的社保基数
} }
BigDecimal gsbili = new BigDecimal(sbjs.getGjbl());//公司比例 BigDecimal gsbili = new BigDecimal(sbjs.getGjbl());//公司比例
BigDecimal bfb = new BigDecimal(100); BigDecimal bfb = new BigDecimal(100);
...@@ -595,11 +610,22 @@ public class SocialSecurityFundController { ...@@ -595,11 +610,22 @@ public class SocialSecurityFundController {
deta.setCbfzmxId(sbjs.getId()); deta.setCbfzmxId(sbjs.getId());
deta.setCoverageName(sbjs.getXz()); deta.setCoverageName(sbjs.getXz());
deta.setPersonalAmount(0.0); deta.setPersonalAmount(0.0);
deta.setPersonalProportion("");//个人比例
deta.setCompanyAmount(preval);//公司金额 deta.setCompanyAmount(preval);//公司金额
deta.setCompanyProportion(sbjs.getGjbl());
deta.setXzType(1);//险种类型 1:社保;2:公积金 deta.setXzType(1);//险种类型 1:社保;2:公积金
deta.setOrgCode(userBean.getOrgCode()); deta.setOrgCode(userBean.getOrgCode());
deta.setAddtime(new Date().getTime()); deta.setAddtime(new Date().getTime());
SbgjjAssoCbfa sbgjjfa = SbgjjAssoCbfa.builder().id(sbjs.getCbfaid()).build().selectById();
deta.setCbfns(sbgjjfa.getCbmcName());//参保方案
deta.setSbjss(insuredto.getJnjs());//社保基数******************
deta.setGjjjss(insuredto.getGjjJnjs());//公积金基数************
detalis.add(deta); detalis.add(deta);
Logoutput("公司-社保:"+preval); Logoutput("公司-社保:"+preval);
...@@ -635,7 +661,7 @@ public class SocialSecurityFundController { ...@@ -635,7 +661,7 @@ public class SocialSecurityFundController {
.eq(SbgjjAssoDetailed::getAttributionTime, insuredto.getJnmouth()).eq(SbgjjAssoDetailed::getCbfzmxId, sbjsgr.getId()).eq(SbgjjAssoDetailed::getCoverageName, sbjsgr.getXz()) .eq(SbgjjAssoDetailed::getAttributionTime, insuredto.getJnmouth()).eq(SbgjjAssoDetailed::getCbfzmxId, sbjsgr.getId()).eq(SbgjjAssoDetailed::getCoverageName, sbjsgr.getXz())
.eq(SbgjjAssoDetailed::getOrgCode, userBean.getOrgCode())); .eq(SbgjjAssoDetailed::getOrgCode, userBean.getOrgCode()));
if(dtd != null) { if(dtd != null) {
SbgjjAssoDetailed.builder().id(dtd.getId()).personalAmount(preval).build().updateById(); SbgjjAssoDetailed.builder().id(dtd.getId()).personalAmount(preval).personalProportion(sbjsgr.getGrbl()).build().updateById();
} }
...@@ -702,14 +728,23 @@ public class SocialSecurityFundController { ...@@ -702,14 +728,23 @@ public class SocialSecurityFundController {
SbgjjAssoDetailed deta = SbgjjAssoDetailed.builder().build(); SbgjjAssoDetailed deta = SbgjjAssoDetailed.builder().build();
deta.setUserId(Integer.valueOf(usernums[f])); deta.setUserId(Integer.valueOf(usernums[f]));
deta.setAttributionTime(insuredto.getJnmouth());// deta.setAttributionTime(insuredto.getGjjJnmouth());//
deta.setCbfzmxId(gjjgs.getId()); deta.setCbfzmxId(gjjgs.getId());
deta.setCoverageName(gjjgs.getXz()); deta.setCoverageName(gjjgs.getXz());
deta.setPersonalAmount(0.0); deta.setPersonalAmount(0.0);
deta.setPersonalProportion("");
deta.setCompanyAmount(preval);//公司金额 deta.setCompanyAmount(preval);//公司金额
deta.setCompanyProportion(gjjgs.getGjbl());//公司比例
deta.setXzType(2);//险种类型 1:社保;2:公积金 deta.setXzType(2);//险种类型 1:社保;2:公积金
deta.setOrgCode(userBean.getOrgCode()); deta.setOrgCode(userBean.getOrgCode());
deta.setAddtime(new Date().getTime()); deta.setAddtime(new Date().getTime());
SbgjjAssoCbfa sbgjjfa = SbgjjAssoCbfa.builder().id(gjjgs.getCbfaid()).build().selectById();
deta.setCbfns(sbgjjfa.getCbmcName());//参保方案
deta.setSbjss(insuredto.getJnjs());//社保基数
deta.setGjjjss(insuredto.getGjjJnjs());//公积金基数
deta.insert(); deta.insert();
Logoutput("公司-公积金:"+preval); Logoutput("公司-公积金:"+preval);
...@@ -737,10 +772,10 @@ public class SocialSecurityFundController { ...@@ -737,10 +772,10 @@ public class SocialSecurityFundController {
} }
SbgjjAssoDetailed dtd = sbgjjassodetailedmapper.selectOne(new QueryWrapper<SbgjjAssoDetailed>().lambda().eq(SbgjjAssoDetailed::getUserId, Integer.valueOf(usernums[f])) SbgjjAssoDetailed dtd = sbgjjassodetailedmapper.selectOne(new QueryWrapper<SbgjjAssoDetailed>().lambda().eq(SbgjjAssoDetailed::getUserId, Integer.valueOf(usernums[f]))
.eq(SbgjjAssoDetailed::getAttributionTime, insuredto.getJnmouth()).eq(SbgjjAssoDetailed::getCbfzmxId, gjjgr.getId()).eq(SbgjjAssoDetailed::getCoverageName, gjjgr.getXz()) .eq(SbgjjAssoDetailed::getAttributionTime, insuredto.getGjjJnmouth()).eq(SbgjjAssoDetailed::getCbfzmxId, gjjgr.getId()).eq(SbgjjAssoDetailed::getCoverageName, gjjgr.getXz())
.eq(SbgjjAssoDetailed::getOrgCode, userBean.getOrgCode())); .eq(SbgjjAssoDetailed::getOrgCode, userBean.getOrgCode()));
if(dtd!=null) { if(dtd!=null) {
SbgjjAssoDetailed.builder().id(dtd.getId()).personalAmount(preval).build().updateById(); SbgjjAssoDetailed.builder().id(dtd.getId()).personalAmount(preval).personalProportion(gjjgr.getGrbl()).build().updateById();
} }
Logoutput("个人-公积金:"+preval); Logoutput("个人-公积金:"+preval);
...@@ -880,38 +915,98 @@ public class SocialSecurityFundController { ...@@ -880,38 +915,98 @@ public class SocialSecurityFundController {
@PutMapping(value = "/adjustment") @PutMapping(value = "/adjustment")
@ApiOperation(value = "调整", httpMethod = "PUT", notes = "接口发布说明") @ApiOperation(value = "调整", httpMethod = "PUT", notes = "接口发布说明")
public ResponseResult adjustment(@CurrentUser UserBean userBean,@RequestBody InsureDto insuredto) { public ResponseResult adjustment(@CurrentUser UserBean userBean,@RequestBody InsureDto insuredto) {
// SbgjjAdminCbry cbry = SbgjjAdminCbry.builder().build();
// cbry.setUserNum(insuredto.getUsernum());
// if(insuredto.getSb()) {
// //cbry.setSbcbState(2);//社保参保状态 0:未投保 1:正常在缴 2:暂不办理 3:已停保
//// cbry.setSbjlStatime(null);//社保缴纳起始月
//// cbry.setSbjljs(null);//社保缴纳基数
// }else {
// cbry.setSbcbState(1);//社保参保状态 0:未投保 1:正常在缴 2:暂不办理 3:已停保
// cbry.setSbjlStatime(insuredto.getJnmouth());//社保缴纳起始月
// cbry.setSbjljs(Double.valueOf(insuredto.getJnjs()));//社保缴纳基数
// }
// if(insuredto.getGjj()) {
// //cbry.setGjjcbState(2);//公积金参保状态 0:未投保 1:正常在缴 2:暂不办理 3:已停保
//// cbry.setGjjjlStatime(null);//公积金缴纳起始月
//// cbry.setGjjjljs(null);//公积金缴纳基数
// }else {
// cbry.setGjjcbState(1);//公积金参保状态 0:未投保 1:正常在缴 2:暂不办理 3:已停保
// cbry.setGjjjlStatime(insuredto.getGjjJnmouth());//公积金缴纳起始月
// cbry.setGjjjljs(Double.valueOf(insuredto.getGjjJnjs()));//公积金缴纳基数
// }
// cbry.setCbfacs(insuredto.getInsuredcities());//参保城市
//
// cbry.setState(1);//状态 1:使用中;0:历史记录
// cbry.setQyid(userBean.getOrgCode());
//
// cbry.setSbfaid(insuredto.getSbfaid());
// cbry.setGjjfaid(insuredto.getGjjfaid());
//
// cbry.setId(insuredto.getId());
// cbry.updateById();
int isUse = 1;//是否使用 0:否 1:是
SbgjjAdminCbry ascb = SbgjjAdminCbry.builder().id(insuredto.getId()).build().selectById();
if(ascb.getSbjlStatime().equals(insuredto.getJnmouth()) || ascb.getGjjjlStatime().equals(insuredto.getGjjJnmouth())) {
isUse = 0;
}
SbgjjAdminCbry cbrytwo = SbgjjAdminCbry.builder().build();
cbrytwo.setState(0);//状态 1:使用中;0:历史记录
cbrytwo.setId(insuredto.getId());
cbrytwo.setIsUse(isUse);
cbrytwo.updateById();
SbgjjAdminCbry cbry = SbgjjAdminCbry.builder().build(); SbgjjAdminCbry cbry = SbgjjAdminCbry.builder().build();
cbry.setUserNum(insuredto.getUsernum()); cbry.setUserNum(insuredto.getUsernum());
if(insuredto.getSb()) { if(insuredto.getSb()) {
//cbry.setSbcbState(2);//社保参保状态 0:未投保 1:正常在缴 2:暂不办理 3:已停保 cbry.setSbcbState(2);//社保参保状态 0:未投保 1:正常在缴 2:暂不办理 3:已停保
// cbry.setSbjlStatime(null);//社保缴纳起始月 cbry.setSbjlStatime(null);//社保缴纳起始月
// cbry.setSbjljs(null);//社保缴纳基数 cbry.setSbjljs(null);//社保缴纳基数
}else { }else {
cbry.setSbcbState(1);//社保参保状态 0:未投保 1:正常在缴 2:暂不办理 3:已停保 cbry.setSbcbState(1);//社保参保状态 0:未投保 1:正常在缴 2:暂不办理 3:已停保
cbry.setSbjlStatime(insuredto.getJnmouth());//社保缴纳起始月 cbry.setSbjlStatime(insuredto.getJnmouth());//社保缴纳起始月
cbry.setSbjljs(Double.valueOf(insuredto.getJnjs()));//社保缴纳基数 cbry.setSbjljs(Double.valueOf(insuredto.getJnjs()));//社保缴纳基数
} }
if(insuredto.getGjj()) { if(insuredto.getGjj()) {
//cbry.setGjjcbState(2);//公积金参保状态 0:未投保 1:正常在缴 2:暂不办理 3:已停保 cbry.setGjjcbState(2);//公积金参保状态 0:未投保 1:正常在缴 2:暂不办理 3:已停保
// cbry.setGjjjlStatime(null);//公积金缴纳起始月 cbry.setGjjjlStatime(null);//公积金缴纳起始月
// cbry.setGjjjljs(null);//公积金缴纳基数 cbry.setGjjjljs(null);//公积金缴纳基数
}else { }else {
cbry.setGjjcbState(1);//公积金参保状态 0:未投保 1:正常在缴 2:暂不办理 3:已停保 cbry.setGjjcbState(1);//公积金参保状态 0:未投保 1:正常在缴 2:暂不办理 3:已停保
cbry.setGjjjlStatime(insuredto.getGjjJnmouth());//公积金缴纳起始月 cbry.setGjjjlStatime(insuredto.getGjjJnmouth());//公积金缴纳起始月
cbry.setGjjjljs(Double.valueOf(insuredto.getGjjJnjs()));//公积金缴纳基数 cbry.setGjjjljs(Double.valueOf(insuredto.getGjjJnjs()));//公积金缴纳基数
} }
cbry.setJlMode(1);//缴纳方式 1:公司自缴
cbry.setCbfacs(insuredto.getInsuredcities());//参保城市 cbry.setCbfacs(insuredto.getInsuredcities());//参保城市
cbry.setSbjlEndtime(null);//社保缴纳结束月
cbry.setGjjjlEndtime(null);//公积金缴纳结束月
cbry.setInsureNum(userBean.getEmpNum());//投保人员
cbry.setInsureTime(new Date().getTime());//投保时间
// cbry.setStopNum();//停保人员
// cbry.setStopTime();//停保时间
cbry.setState(1);//状态 1:使用中;0:历史记录 cbry.setState(1);//状态 1:使用中;0:历史记录
cbry.setQyid(userBean.getOrgCode()); cbry.setQyid(userBean.getOrgCode());
cbry.setSbfaid(insuredto.getSbfaid()); cbry.setSbfaid(insuredto.getSbfaid());
cbry.setGjjfaid(insuredto.getGjjfaid()); cbry.setGjjfaid(insuredto.getGjjfaid());
cbry.setId(insuredto.getId()); cbry.setIsUse(1);//是否使用 0:否 1:是
cbry.updateById();
sbgjjadmincbrymapper.insertsbgjjadmincbry(cbry);
insuredto.setId(cbry.getId());
List<SbgjjAssoDetailed> detalis = new ArrayList<SbgjjAssoDetailed>();
//*************************************社保****************************************************** //*************************************社保******************************************************
double gssocial = 0;//公司社保总 double gssocial = 0;//公司社保总
double grsocial = 0;//个人社保总 double grsocial = 0;//个人社保总
...@@ -921,6 +1016,9 @@ public class SocialSecurityFundController { ...@@ -921,6 +1016,9 @@ public class SocialSecurityFundController {
//社保****** //社保******
//公司 //公司
SbgjjAssoDetailed.builder().build().delete(new QueryWrapper<SbgjjAssoDetailed>().lambda().eq(SbgjjAssoDetailed::getUserId, insuredto.getUsernum()).eq(SbgjjAssoDetailed::getOrgCode, userBean.getOrgCode())
.eq(SbgjjAssoDetailed::getAttributionTime, insuredto.getJnmouth()));
for(SbgjjAssoCbfzmx sbjs:shebaolist) { for(SbgjjAssoCbfzmx sbjs:shebaolist) {
double jishuxx = 0; double jishuxx = 0;
double preval = 0; double preval = 0;
...@@ -937,10 +1035,38 @@ public class SocialSecurityFundController { ...@@ -937,10 +1035,38 @@ public class SocialSecurityFundController {
double gsh = gsbili.divide(bfb).doubleValue(); double gsh = gsbili.divide(bfb).doubleValue();
preval = formatDouble1(Double.valueOf(jishuxx)*gsh); preval = formatDouble1(Double.valueOf(jishuxx)*gsh);
} }
SbgjjAssoDetailed deta = SbgjjAssoDetailed.builder().build();
deta.setUserId(insuredto.getUsernum());
deta.setAttributionTime(insuredto.getJnmouth());//
deta.setCbfzmxId(sbjs.getId());
deta.setCoverageName(sbjs.getXz());
deta.setPersonalAmount(0.0);
deta.setPersonalProportion("");
deta.setCompanyAmount(preval);//公司金额
deta.setCompanyProportion(sbjs.getGjbl());
deta.setXzType(1);//险种类型 1:社保;2:公积金
deta.setOrgCode(userBean.getOrgCode());
deta.setAddtime(new Date().getTime());
SbgjjAssoCbfa sbgjjfa = SbgjjAssoCbfa.builder().id(sbjs.getCbfaid()).build().selectById();
deta.setCbfns(sbgjjfa.getCbmcName());//参保方案
deta.setSbjss(insuredto.getJnjs());//社保基数
deta.setGjjjss(insuredto.getGjjJnjs());//公积金基数
detalis.add(deta);
gssocial += preval; gssocial += preval;
} }
Logoutput("公司社保总:"+formatDouble1(gssocial)); Logoutput("公司社保总:"+formatDouble1(gssocial));
if(detalis.size()>0){
sbgjjassodetailedmapper.insertsbgjjassodetailedList(detalis);
}
//个人 //个人
for(SbgjjAssoCbfzmx sbjsgr:shebaolist) { for(SbgjjAssoCbfzmx sbjsgr:shebaolist) {
...@@ -959,6 +1085,14 @@ public class SocialSecurityFundController { ...@@ -959,6 +1085,14 @@ public class SocialSecurityFundController {
double gsh = gsbigr.divide(bfgr).doubleValue(); double gsh = gsbigr.divide(bfgr).doubleValue();
preval = formatDouble1(Double.valueOf(jishuxxgr)*gsh); preval = formatDouble1(Double.valueOf(jishuxxgr)*gsh);
} }
SbgjjAssoDetailed dtd = sbgjjassodetailedmapper.selectOne(new QueryWrapper<SbgjjAssoDetailed>().lambda().eq(SbgjjAssoDetailed::getUserId, insuredto.getUsernum())
.eq(SbgjjAssoDetailed::getAttributionTime, insuredto.getJnmouth()).eq(SbgjjAssoDetailed::getCbfzmxId, sbjsgr.getId()).eq(SbgjjAssoDetailed::getCoverageName, sbjsgr.getXz())
.eq(SbgjjAssoDetailed::getOrgCode, userBean.getOrgCode()));
if(dtd != null) {
SbgjjAssoDetailed.builder().id(dtd.getId()).personalAmount(preval).personalProportion(sbjsgr.getGrbl()).build().updateById();
}
grsocial += preval; grsocial += preval;
} }
...@@ -1021,6 +1155,29 @@ public class SocialSecurityFundController { ...@@ -1021,6 +1155,29 @@ public class SocialSecurityFundController {
double gsh = gsbili.divide(bfb).doubleValue(); double gsh = gsbili.divide(bfb).doubleValue();
preval = formatDouble1(Double.valueOf(jishuxx)*gsh); preval = formatDouble1(Double.valueOf(jishuxx)*gsh);
} }
SbgjjAssoDetailed deta = SbgjjAssoDetailed.builder().build();
deta.setUserId(insuredto.getUsernum());
deta.setAttributionTime(insuredto.getGjjJnmouth());//
deta.setCbfzmxId(gjjgs.getId());
deta.setCoverageName(gjjgs.getXz());
deta.setPersonalAmount(0.0);
deta.setPersonalProportion("");
deta.setCompanyAmount(preval);//公司金额
deta.setCompanyProportion(gjjgs.getGjbl());
deta.setXzType(2);//险种类型 1:社保;2:公积金
deta.setOrgCode(userBean.getOrgCode());
deta.setAddtime(new Date().getTime());
SbgjjAssoCbfa sbgjjfa = SbgjjAssoCbfa.builder().id(gjjgs.getCbfaid()).build().selectById();
deta.setCbfns(sbgjjfa.getCbmcName());//参保方案
deta.setSbjss(insuredto.getJnjs());//社保基数
deta.setGjjjss(insuredto.getGjjJnjs());//公积金基数
deta.insert();
gsfund += preval; gsfund += preval;
} }
Logoutput("公司公积金总:"+formatDouble1(gsfund)); Logoutput("公司公积金总:"+formatDouble1(gsfund));
...@@ -1043,6 +1200,14 @@ public class SocialSecurityFundController { ...@@ -1043,6 +1200,14 @@ public class SocialSecurityFundController {
double gsh = gsbigr.divide(bfgr).doubleValue(); double gsh = gsbigr.divide(bfgr).doubleValue();
preval = formatDouble1(Double.valueOf(jishuxxgr)*gsh); preval = formatDouble1(Double.valueOf(jishuxxgr)*gsh);
} }
SbgjjAssoDetailed dtd = sbgjjassodetailedmapper.selectOne(new QueryWrapper<SbgjjAssoDetailed>().lambda().eq(SbgjjAssoDetailed::getUserId, insuredto.getUsernum())
.eq(SbgjjAssoDetailed::getAttributionTime, insuredto.getGjjJnmouth()).eq(SbgjjAssoDetailed::getCbfzmxId, gjjgr.getId()).eq(SbgjjAssoDetailed::getCoverageName, gjjgr.getXz())
.eq(SbgjjAssoDetailed::getOrgCode, userBean.getOrgCode()));
if(dtd!=null) {
SbgjjAssoDetailed.builder().id(dtd.getId()).personalAmount(preval).personalProportion(gjjgr.getGrbl()).build().updateById();
}
grgsfund += preval; grgsfund += preval;
} }
Logoutput("个人公积金总:"+formatDouble1(grgsfund)); Logoutput("个人公积金总:"+formatDouble1(grgsfund));
...@@ -1170,6 +1335,32 @@ public class SocialSecurityFundController { ...@@ -1170,6 +1335,32 @@ public class SocialSecurityFundController {
return new ResponseResult().success("成功", yjzlist); return new ResponseResult().success("成功", yjzlist);
} }
/**
* 月结账明细
*/
@PostMapping(value = "/mochshe_detailedSB")
@ApiOperation(value = "月结账单信息", httpMethod = "POST", notes = "接口发布说明")
public ResponseResult mochshedetailedSB(@CurrentUser UserBean userBean,@RequestBody MonthlyStatementDto monthly) {
List<SbgjjAssoDetailed> yjzdmxlist = SbgjjAssoDetailed.builder().build().selectList(new QueryWrapper<SbgjjAssoDetailed>().lambda().eq(SbgjjAssoDetailed::getUserId, monthly.getUsernum())
.eq(SbgjjAssoDetailed::getOrgCode, userBean.getOrgCode()).eq(SbgjjAssoDetailed::getAttributionTime, monthly.getMon()).eq(SbgjjAssoDetailed::getXzType, 1));
return new ResponseResult().success("成功", yjzdmxlist);
}
/**
* 月结账明细
*/
@PostMapping(value = "/mochshe_detailedGJJ")
@ApiOperation(value = "月结账单信息", httpMethod = "POST", notes = "接口发布说明")
public ResponseResult mochshedetailedGJJ(@CurrentUser UserBean userBean,@RequestBody MonthlyStatementDto monthly) {
List<SbgjjAssoDetailed> yjzdmxlist = SbgjjAssoDetailed.builder().build().selectList(new QueryWrapper<SbgjjAssoDetailed>().lambda().eq(SbgjjAssoDetailed::getUserId, monthly.getUsernum())
.eq(SbgjjAssoDetailed::getOrgCode, userBean.getOrgCode()).eq(SbgjjAssoDetailed::getAttributionTime, monthly.getMon()).eq(SbgjjAssoDetailed::getXzType, 2));
return new ResponseResult().success("成功", yjzdmxlist);
}
@Value("${config-8timer.environmental-science}") @Value("${config-8timer.environmental-science}")
public String environmental_science; public String environmental_science;
......
...@@ -13,6 +13,7 @@ import java.util.Map; ...@@ -13,6 +13,7 @@ import java.util.Map;
import javax.annotation.Resource; import javax.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
...@@ -23,8 +24,12 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -23,8 +24,12 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import cn.timer.api.bean.kqgl.AttendanceGroup; import cn.timer.api.bean.kqgl.AttendanceGroup;
import cn.timer.api.bean.kqgl.AttendanceReport; import cn.timer.api.bean.kqgl.AttendanceReport;
import cn.timer.api.bean.kqgl.AttendanceWeeklySch; import cn.timer.api.bean.kqgl.AttendanceWeeklySch;
...@@ -48,6 +53,7 @@ import cn.timer.api.bean.xcgl.XcglAssoZxfjkc; ...@@ -48,6 +53,7 @@ import cn.timer.api.bean.xcgl.XcglAssoZxfjkc;
import cn.timer.api.bean.yggl.YgglMainEmp; import cn.timer.api.bean.yggl.YgglMainEmp;
import cn.timer.api.config.annotation.CurrentUser; import cn.timer.api.config.annotation.CurrentUser;
import cn.timer.api.config.annotation.UserBean; import cn.timer.api.config.annotation.UserBean;
import cn.timer.api.config.validation.ValidList;
import cn.timer.api.dao.kqgl.AttendanceGroupMapper; import cn.timer.api.dao.kqgl.AttendanceGroupMapper;
import cn.timer.api.dao.kqgl.AttendanceWeeklySchMapper; import cn.timer.api.dao.kqgl.AttendanceWeeklySchMapper;
import cn.timer.api.dao.kqgl.PunchCardDetailsMapper; import cn.timer.api.dao.kqgl.PunchCardDetailsMapper;
...@@ -97,10 +103,12 @@ import cn.timer.api.dto.xcgl.SalaryGroupGroupingDto; ...@@ -97,10 +103,12 @@ import cn.timer.api.dto.xcgl.SalaryGroupGroupingDto;
import cn.timer.api.dto.xcgl.SalaryItemRulesDto; import cn.timer.api.dto.xcgl.SalaryItemRulesDto;
import cn.timer.api.dto.xcgl.SalaryPersonFieldDto; import cn.timer.api.dto.xcgl.SalaryPersonFieldDto;
import cn.timer.api.dto.xcgl.SearchSalariedPeopleDto; import cn.timer.api.dto.xcgl.SearchSalariedPeopleDto;
import cn.timer.api.dto.xcgl.SpecialDeductionDto;
import cn.timer.api.dto.xcgl.SwitchSalaryDateDto; import cn.timer.api.dto.xcgl.SwitchSalaryDateDto;
import cn.timer.api.dto.xcgl.TjSalaryItemDot; import cn.timer.api.dto.xcgl.TjSalaryItemDot;
import cn.timer.api.dto.xcgl.XcglAssoOptionDto; import cn.timer.api.dto.xcgl.XcglAssoOptionDto;
import cn.timer.api.dto.xcgl.YdMobilePacketDto; import cn.timer.api.dto.xcgl.YdMobilePacketDto;
import cn.timer.api.dto.yggl.AddygdaDto;
import cn.timer.api.utils.DateUtil; import cn.timer.api.utils.DateUtil;
import cn.timer.api.utils.ResponseResult; import cn.timer.api.utils.ResponseResult;
import cn.timer.api.utils.Result; import cn.timer.api.utils.Result;
...@@ -1920,8 +1928,6 @@ public class SalaryManagementController { ...@@ -1920,8 +1928,6 @@ public class SalaryManagementController {
/** /**
* 获取附加扣除数据 * 获取附加扣除数据
*/ */
// @GetMapping(value = "/obtainidedu")
// @ApiOperation(value = "获取附加扣除数据", httpMethod = "GET", notes = "接口发布说明")
@PostMapping(value = "/obtainidedu") @PostMapping(value = "/obtainidedu")
@ApiOperation(value = "获取附加扣除数据", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "获取附加扣除数据", httpMethod = "POST", notes = "接口发布说明")
public ResponseResult ObtainAdditionalDeduction(@CurrentUser UserBean userBean,@RequestBody SearchSalariedPeopleDto search) { public ResponseResult ObtainAdditionalDeduction(@CurrentUser UserBean userBean,@RequestBody SearchSalariedPeopleDto search) {
...@@ -1935,55 +1941,35 @@ public class SalaryManagementController { ...@@ -1935,55 +1941,35 @@ public class SalaryManagementController {
search.setStatus("3"); search.setStatus("3");
} }
List<AdditionalDeductionDto> fjkclist = xcglassozxfjkcmapper.selectAdditionalDeduction(search); List<AdditionalDeductionDto> fjkclist = xcglassozxfjkcmapper.selectAdditionalDeductiontwo(search);
return new ResponseResult().success("获取附加扣除数据成功", fjkclist); return new ResponseResult().success("获取附加扣除数据成功", fjkclist);
} }
/**
* 查询列表-获取附加扣除数据-分页
*/
@PostMapping(value = "/select_leave_rules")
@ApiOperation(value = "获取附加扣除数据-分页", httpMethod = "POST", notes = "接口发布说明")
public Result<Object> selectleaverules(@CurrentUser UserBean userBean, @RequestBody SearchSalariedPeopleDto search) {
IPage<AdditionalDeductionDto> page = new Page<AdditionalDeductionDto>(
search.getCurrentPage() == null ? 1 : search.getCurrentPage(),
search.getTotalPage() == null ? 10 : search.getTotalPage());
search.setOrgcode(userBean.getOrgCode());
if(("0").equals(search.getStatus())) {//全部
search.setStatus("");
}else if(("1").equals(search.getStatus())) {//在职
search.setStatus("0");
}else {
search.setStatus("3");
}
IPage<AdditionalDeductionDto> pageAs = xcglassozxfjkcmapper.selectAdditionalDeduction(page, search);
List<AdditionalDeductionDto> listAs = pageAs.getRecords();
return ResultUtil.data(pageAs, listAs, "操作成功!");
}
// @PostMapping(value = "/programme")
// @ApiOperation(value = "获取附加扣除数据搜索/分页", httpMethod = "POST", notes = "接口发布说明")
// public Result<Object> programme(@CurrentUser UserBean userBean,@RequestBody AdditionalkcDto kcdto) {
//
// String n = kcdto.getName();
// int s = kcdto.getState();
// String d = kcdto.getDate();
//
//
// /*
// * Page<AdditionalDeductionDto> page = new Page<AdditionalDeductionDto>(
// * kcdto.getCurrentPage() == null ? 1 : kcdto.getCurrentPage(),
// * kcdto.getTotalPage() == null ? 10 : kcdto.getTotalPage());
// */
//
// PageHelper.startPage(kcdto.getCurrentPage() == null ? 1 : kcdto.getCurrentPage(), kcdto.getTotalPage() == null ? 10 : kcdto.getTotalPage());
//
//
// //List<AdditionalDeductionDto> fjkclist = xcglassozxfjkcmapper.selectAdditionalDeduction(userBean.getOrgCode());
//
// Page<AdditionalDeductionDto> fjkcpage = xcglassozxfjkcmapper.selectAdditionalDeduction(userBean.getOrgCode());
//
// List<AdditionalDeductionDto> fjkclist = fjkcpage.getRecords();
//
// fjkcpage.getCurrent();
// fjkcpage.getPages();
// fjkcpage.getTotal();
// fjkcpage.getSize();
//
//
//// QueryWrapper<SbgjjAssoCbfa> queryWrapper = new QueryWrapper<>();
//// queryWrapper.eq("qyid",userBean.getOrgCode()).and(!StrUtil.hasBlank(c), wq -> wq.likeRight("cbcs", c));
////
//// IPage<SbgjjAssoCbfa> sbgjjassocbfaPage = SbgjjAssoCbfa.builder().build().selectPage(page, queryWrapper);
////
//// IPage<AdditionalDeductionDto> sbgjjassocbfaPage =
//// List<SbgjjAssoCbfa> sbgjjassocbfaEmps = sbgjjassocbfaPage.getRecords();
//// sbgjjassocbfaPage.getCurrent();
//// sbgjjassocbfaPage.getPages();
//// sbgjjassocbfaPage.getTotal();
//// sbgjjassocbfaPage.getSize();
//
// return ResultUtil.data2(fjkcpage, fjkclist, "方案搜索成功");
// }
/** /**
...@@ -2197,6 +2183,91 @@ public class SalaryManagementController { ...@@ -2197,6 +2183,91 @@ public class SalaryManagementController {
return new ResponseResult().success("成功", gztz); return new ResponseResult().success("成功", gztz);
} }
/**
* 导入专项附加扣除
*/
@PostMapping(value = "/import_special_additional_deduction")
@ApiOperation(value = "导入专项附加扣除", httpMethod = "POST", notes = "接口发布说明")
public Result<JSONObject> importSpecialAdditionalDeduction(@CurrentUser UserBean userBean,
@Validated @RequestBody ValidList<SpecialDeductionDto> specialdeductiondto) throws Exception {
Integer orgCode = userBean.getOrgCode();
for (SpecialDeductionDto spec : specialdeductiondto) {
String name = spec.getName();
String phone = spec.getPhone();
String date = spec.getDate();
YgglMainEmp ygl = YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getName, name)
.eq(YgglMainEmp::getPhone, phone).eq(YgglMainEmp::getOrgCode, orgCode));
XcglAssoZxfjkc xcg = XcglAssoZxfjkc.builder().build().selectOne(new QueryWrapper<XcglAssoZxfjkc>().lambda().eq(XcglAssoZxfjkc::getTaxmonth, date)
.eq(XcglAssoZxfjkc::getQyid, userBean.getOrgCode()).eq(XcglAssoZxfjkc::getUserid, ygl.getEmpNum()));
if(xcg == null) {
XcglAssoZxfjkc xcglas = XcglAssoZxfjkc.builder().build();
xcglas.setUserid(ygl.getEmpNum());
xcglas.setTaxmonth(date);
xcglas.setChildrenedu(Double.valueOf(spec.getZljy()));//子女教育
xcglas.setHouseloans(Double.valueOf(spec.getZfdk()));//住房贷款利息
xcglas.setHouserents(Double.valueOf(spec.getZfzj()));//住房租金
xcglas.setSupportolder(Double.valueOf(spec.getSylr()));//赡养老人
xcglas.setContinueedu(Double.valueOf(spec.getJxjy()));//继续教育
BigDecimal num1 = new BigDecimal(spec.getZljy());
BigDecimal num2 = new BigDecimal(spec.getZfdk());
double result1 = num1.add(num2).doubleValue();
BigDecimal num3 = new BigDecimal(result1);
BigDecimal num4 = new BigDecimal(spec.getZfzj());
double result2 = num3.add(num4).doubleValue();
BigDecimal num5 = new BigDecimal(result2);
BigDecimal num6 = new BigDecimal(spec.getSylr());
double result3 = num5.add(num6).doubleValue();
BigDecimal num7 = new BigDecimal(result3);
BigDecimal num8 = new BigDecimal(spec.getJxjy());
double result = num7.add(num8).doubleValue();
xcglas.setTotalmoney(result);//累计专项附加扣除
xcglas.setQyid(userBean.getOrgCode());
xcglas.setAddtime(new Date().getTime());
xcglassozxfjkcmapper.insertXcglAssoZxfjkc(xcglas);
}else {
XcglAssoZxfjkc fjkc = XcglAssoZxfjkc.builder().build();
fjkc.setId(xcg.getId());
fjkc.setChildrenedu(Double.valueOf(spec.getZljy()));//子女教育
fjkc.setHouseloans(Double.valueOf(spec.getZfdk()));//住房贷款利息
fjkc.setHouserents(Double.valueOf(spec.getZfzj()));//住房租金
fjkc.setSupportolder(Double.valueOf(spec.getSylr()));//赡养老人
fjkc.setContinueedu(Double.valueOf(spec.getJxjy()));//继续教育
BigDecimal num1 = new BigDecimal(spec.getZljy());
BigDecimal num2 = new BigDecimal(spec.getZfdk());
double result1 = num1.add(num2).doubleValue();
BigDecimal num3 = new BigDecimal(result1);
BigDecimal num4 = new BigDecimal(spec.getZfzj());
double result2 = num3.add(num4).doubleValue();
BigDecimal num5 = new BigDecimal(result2);
BigDecimal num6 = new BigDecimal(spec.getSylr());
double result3 = num5.add(num6).doubleValue();
BigDecimal num7 = new BigDecimal(result3);
BigDecimal num8 = new BigDecimal(spec.getJxjy());
double result = num7.add(num8).doubleValue();
fjkc.setTotalmoney(Double.valueOf(result));//累计专项附加扣除
xcglassozxfjkcmapper.updateXcglAssoZxfjkc(fjkc);
}
}
return ResultUtil.success("成功");
}
/****************************************************************************/ /****************************************************************************/
/****************************************************************************/ /****************************************************************************/
......
...@@ -248,10 +248,12 @@ public class YgglController { ...@@ -248,10 +248,12 @@ public class YgglController {
public Result<Object> addygda(@CurrentUser UserBean userBean, @Validated @RequestBody AddygdaDto addygdaDto) public Result<Object> addygda(@CurrentUser UserBean userBean, @Validated @RequestBody AddygdaDto addygdaDto)
throws Exception { throws Exception {
Integer orgCode = userBean.getOrgCode(); Integer orgCode = userBean.getOrgCode();
String customNum = addygdaDto.getCustomNum();//自定义工号
String name = addygdaDto.getName(); String name = addygdaDto.getName();
String phone = addygdaDto.getPhone(); String phone = addygdaDto.getPhone();
Integer zjType = addygdaDto.getZjType(); Integer zjType = addygdaDto.getZjType();
String zjNum = addygdaDto.getZjNum(); String zjNum = addygdaDto.getZjNum();
int attgroupid = addygdaDto.getAttgroupid();//考勤组id
boolean isvalid = true; boolean isvalid = true;
switch (zjType) { switch (zjType) {
case 0: case 0:
...@@ -306,7 +308,11 @@ public class YgglController { ...@@ -306,7 +308,11 @@ public class YgglController {
.status(CommonEnum.U_STS_ON.getType()).build().insert(); .status(CommonEnum.U_STS_ON.getType()).build().insert();
ygglMainEmp = YgglMainEmp.builder().name(name).phone(phone).zjType(zjType).zjNum(zjNum).jobType(jobType) ygglMainEmp = YgglMainEmp.builder().name(name).phone(phone).zjType(zjType).zjNum(zjNum).jobType(jobType)
.jobStatus(jobStatus.SHIYONG.getType()).rzTime(rzTime).syq(syq).sex(sex) .jobStatus(jobStatus.SHIYONG.getType()).rzTime(rzTime).syq(syq).sex(sex)
.empNum(login.getId()).orgCode(orgCode).bmgwId(bmgwId).build(); .empNum(login.getId()).orgCode(orgCode).bmgwId(bmgwId).customNum(customNum).build();
if(addygdaDto.getAttgroupid() != null) {
KqglAssoYhkqz.builder().kqzid(attgroupid).userid(login.getId()).qyid(userBean.getOrgCode()).build().insert();
}
if(syq == 0) { if(syq == 0) {
ygglMainEmp.setZzTime(rzTime); ygglMainEmp.setZzTime(rzTime);
......
...@@ -33,7 +33,7 @@ public interface PunchRecordMapper { ...@@ -33,7 +33,7 @@ public interface PunchRecordMapper {
PunchRecord MaintenancePunchCard(Long start,Long end,Integer userId); PunchRecord MaintenancePunchCard(Long start,Long end,Integer userId);
List<PunchRecord> getMaintenancePunchCardList(Long start,Long end,Integer userId); List<PunchRecord> getMaintenancePunchCardList(Long start,Long end,Integer userId,Integer qyid);
List<PunchRecord> selFuzzyOriginalAttendance(AttendanceDetails attendancedetails); List<PunchRecord> selFuzzyOriginalAttendance(AttendanceDetails attendancedetails);
......
package cn.timer.api.dao.kqmk;
import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.bean.kqmk.KqmkRedletterDay;
/**
* 节假日
*
* @author LAL 2020-09-22
*/
@Repository
public interface KqmkRedletterDayMapper extends BaseMapper<KqmkRedletterDay> {
}
package cn.timer.api.dao.xcgl; 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;
import com.baomidou.mybatisplus.core.metadata.IPage;
import cn.timer.api.bean.xcgl.XcglAssoZxfjkc; import cn.timer.api.bean.xcgl.XcglAssoZxfjkc;
import cn.timer.api.dto.kqmk.AttqueryCriteriaDto;
import cn.timer.api.dto.kqmk.KqglMainKqzDto;
import cn.timer.api.dto.xcgl.AdditionalDeductionDto; import cn.timer.api.dto.xcgl.AdditionalDeductionDto;
import cn.timer.api.dto.xcgl.SearchSalariedPeopleDto; import cn.timer.api.dto.xcgl.SearchSalariedPeopleDto;
...@@ -19,7 +23,11 @@ public interface XcglAssoZxfjkcMapper extends BaseMapper<XcglAssoZxfjkc> { ...@@ -19,7 +23,11 @@ public interface XcglAssoZxfjkcMapper extends BaseMapper<XcglAssoZxfjkc> {
int insertXcglAssoZxfjkc(XcglAssoZxfjkc xcglassozxfjkc); int insertXcglAssoZxfjkc(XcglAssoZxfjkc xcglassozxfjkc);
List<AdditionalDeductionDto> selectAdditionalDeduction(SearchSalariedPeopleDto searchsalariedpeopledto); List<AdditionalDeductionDto> selectAdditionalDeductiontwo(SearchSalariedPeopleDto searchsalariedpeopledto);
int updateXcglAssoZxfjkc(XcglAssoZxfjkc xcglassozxfjkc); int updateXcglAssoZxfjkc(XcglAssoZxfjkc xcglassozxfjkc);
IPage<AdditionalDeductionDto> selectAdditionalDeduction(IPage<AdditionalDeductionDto> page,@Param("param") SearchSalariedPeopleDto searchsalariedpeopledto);
} }
...@@ -16,6 +16,11 @@ public class MonthlyCheckoutSheetDto implements Serializable { ...@@ -16,6 +16,11 @@ public class MonthlyCheckoutSheetDto implements Serializable {
private static final long serialVersionUID = 4192763674865997955L; private static final long serialVersionUID = 4192763674865997955L;
String empname; String empname;
int usernum; int usernum;
String dept;
String post;
String rztime;
String totalmoney; String totalmoney;
String gsjltotal; String gsjltotal;
String grjltotal; String grjltotal;
......
...@@ -16,4 +16,5 @@ public class MonthlyStatementDto implements Serializable {/** ...@@ -16,4 +16,5 @@ public class MonthlyStatementDto implements Serializable {/**
int orgcode; int orgcode;
String title; String title;
String mon; String mon;
int usernum;
} }
...@@ -27,7 +27,7 @@ public class MySummaryQueryDto extends Page{ ...@@ -27,7 +27,7 @@ public class MySummaryQueryDto extends Page{
@ApiModelProperty(value = "关键字 标题/审批人名称/审批总汇id", example = "") @ApiModelProperty(value = "关键字 标题/审批人名称/审批总汇id", example = "")
private String query; private String query;
@ApiModelProperty(value = "状态 0审批中 1审批撤销 2审批通过/审批完成 3审批拒绝", example = "0") @ApiModelProperty(value = "状态 0审批中 1审批撤销 2审批通过/审批完成 3审批拒绝 4 已审批 5全部", example = "0")
private Integer sts; private Integer sts;
@ApiModelProperty(value = "开始时间 ", example = "") @ApiModelProperty(value = "开始时间 ", example = "")
...@@ -39,7 +39,7 @@ public class MySummaryQueryDto extends Page{ ...@@ -39,7 +39,7 @@ public class MySummaryQueryDto extends Page{
@NotNull(message = ValidationMsg.NOTNULL) @NotNull(message = ValidationMsg.NOTNULL)
@DecimalMax(value = "3",message = ValidationMsg.DECIMALMAX+" 只能为 0我发起的 1抄送我的 2我审批的 3全部") @DecimalMax(value = "3",message = ValidationMsg.DECIMALMAX+" 只能为 0我发起的 1抄送我的 2我审批的 3全部")
@DecimalMin(value = "0",message = ValidationMsg.DECIMALMIN+" 只能为 0我发起的 1抄送我的 2我审批的 3全部") @DecimalMin(value = "0",message = ValidationMsg.DECIMALMIN+" 只能为 0我发起的 1抄送我的 2我审批的 3全部")
@ApiModelProperty(value = "0我发起的 1抄送我的 2我审批的", example = "0") @ApiModelProperty(value = "0我发起的 1抄送我的 2我审批的 3全部", example = "0")
private Integer type; private Integer type;
} }
...@@ -15,7 +15,9 @@ public class AdditionalDeductionDto implements Serializable { ...@@ -15,7 +15,9 @@ public class AdditionalDeductionDto implements Serializable {
*/ */
private static final long serialVersionUID = -3829908201010471272L; private static final long serialVersionUID = -3829908201010471272L;
int zxfjid; int zxfjid;
String date;
String name; String name;
String phone;
String empNum; String empNum;
int zljy; int zljy;
int zfdk; int zfdk;
......
...@@ -2,6 +2,7 @@ package cn.timer.api.dto.xcgl; ...@@ -2,6 +2,7 @@ package cn.timer.api.dto.xcgl;
import java.io.Serializable; import java.io.Serializable;
import cn.timer.api.utils.Page;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
...@@ -15,7 +16,7 @@ import lombok.NoArgsConstructor; ...@@ -15,7 +16,7 @@ import lombok.NoArgsConstructor;
@Builder @Builder
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
public class SearchSalariedPeopleDto implements Serializable { public class SearchSalariedPeopleDto extends Page {
private static final long serialVersionUID = 6251994337286870380L; private static final long serialVersionUID = 6251994337286870380L;
......
package cn.timer.api.dto.xcgl;
import java.io.Serializable;
import java.util.Date;
import com.alibaba.fastjson.annotation.JSONField;
import cn.timer.api.utils.Page;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SpecialDeductionDto extends Page implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "时间", example = "1")
private String date;
// @JSONField(format="yyyy-MM")
// @ApiModelProperty(value="时间 ",example="时间")
// private Date date;
@ApiModelProperty(value = "姓名", example = "1")
private String name;
@ApiModelProperty(value = "电话号码", example = "1")
private String phone;
@ApiModelProperty(value = "子女教育", example = "1")
private String zljy;
@ApiModelProperty(value = "住房贷款利息", example = "1")
private String zfdk;
@ApiModelProperty(value = "住房租金", example = "86")
private String zfzj;
@ApiModelProperty(value = "赡养老人", example = "赡养老人")
private String sylr;
@ApiModelProperty(value = "继续教育", example = "A")
private String jxjy;
@ApiModelProperty(value = "累计专项附加扣除", example = "A")
private String lj;
}
...@@ -73,5 +73,11 @@ public class AddygdaDto extends Page implements Serializable{ ...@@ -73,5 +73,11 @@ public class AddygdaDto extends Page implements Serializable{
@ApiModelProperty(value="部门岗位id",example="0") @ApiModelProperty(value="部门岗位id",example="0")
private Integer bmgwId; private Integer bmgwId;
@ApiModelProperty(value="自定义工号",example="1001")
private String customNum;
@ApiModelProperty(value="考勤组id",example="0")
private Integer attgroupid;
} }
...@@ -388,6 +388,8 @@ ...@@ -388,6 +388,8 @@
and dkjl.user_id = #{userId,jdbcType=INTEGER} and dkjl.user_id = #{userId,jdbcType=INTEGER}
and dkjl.`status` != 0 and dkjl.`status` != 0
and dkjl.sort != 0 and dkjl.sort != 0
and dkjl.qyid = #{qyid}
and dkjl.dkmxid != 0
ORDER BY dkjl.id ASC ORDER BY dkjl.id ASC
</select> </select>
......
...@@ -71,21 +71,6 @@ ...@@ -71,21 +71,6 @@
</sql> </sql>
<select id="selectPageByQueryLeaveBalance" resultMap="LeaveBalanceMap"> <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} -->
SELECT emp.emp_num as empnum, SELECT emp.emp_num as empnum,
emp.`name` as empname, emp.`name` as empname,
emp.org_code as orgcode, emp.org_code as orgcode,
...@@ -102,9 +87,11 @@ ...@@ -102,9 +87,11 @@
c.name like CONCAT('%',#{param.query},'%')) c.name like CONCAT('%',#{param.query},'%'))
</if> </if>
<if test="param.deptid != null and param.deptid != ''"> <if test="param.deptid != null and param.deptid != ''">
and c.id = #{param.deptid} and c.id in (select m.id from zzgl_bmgw_m m where m.up_id = #{param.deptid}) or (c.id =#{param.deptid})
</if> </if>
<!-- ORDER BY emp.emp_num DESC <!--and c.id = #{param.deptid}
ORDER BY emp.emp_num DESC
LEFT JOIN kqgl_asso_leave_employee_balance as yz on yz.userid = emp.emp_num LEFT JOIN kqgl_asso_leave_employee_balance as yz on yz.userid = emp.emp_num
yz.leave_rules_id as leaverulesid, yz.leave_rules_id as leaverulesid,
yz.balance_days as balancedays--> yz.balance_days as balancedays-->
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.timer.api.dao.kqmk.KqmkRedletterDayMapper">
<resultMap id="BaseResultMap" type="cn.timer.api.bean.kqmk.KqmkRedletterDay" >
<id column="id" property="id" />
<result column="holiday" property="holiday" />
<result column="holiday_name" property="holidayName" />
<result column="holiday_status" property="holidayStatus" />
<result column="belong_yearmonth" property="belongYearmonth" />
</resultMap>
</mapper>
\ No newline at end of file
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
<result column="qyid" property="qyid" /> <result column="qyid" property="qyid" />
<result column="sbfaid" property="sbfaid" /> <result column="sbfaid" property="sbfaid" />
<result column="gjjfaid" property="gjjfaid" /> <result column="gjjfaid" property="gjjfaid" />
<result column="is_use" property="isUse" />
</resultMap> </resultMap>
<resultMap id="InsuredPersonnelMap" type="cn.timer.api.dto.sbgjj.InsuredPersonnelDto" > <resultMap id="InsuredPersonnelMap" type="cn.timer.api.dto.sbgjj.InsuredPersonnelDto" >
...@@ -122,6 +123,13 @@ ...@@ -122,6 +123,13 @@
gjjfaid gjjfaid
</sql> </sql>
<sql id="salary_List">
id,org_code,emp_num,age,appopenid,area,birthday,blood_type,bmgw_id,province_id,province,district_id,district,city_id,
city,edu,english_name,head_url,hk_address,hk_type,is_jrkq,is_married,is_pregnant,jg_id,jg,job_status,job_type,language,
address,mpopenid,mz,name,openid,job_num,password,phone,qq,rz_time,sex,sfzyx_time,sjzz_time,syq,unionid,wechat,work_address,work_email,
work_phone,zj_num,zj_type,zpqd,zy,zz_remark,zz_time,zzmm,update_man,update_time,is_manager,before_leaving_sts,bmgw_name,custom_num
</sql>
<sql id="Base_Column_List_Alias"> <sql id="Base_Column_List_Alias">
id SbgjjAdminCbry_id, id SbgjjAdminCbry_id,
user_num SbgjjAdminCbry_user_num, user_num SbgjjAdminCbry_user_num,
...@@ -146,10 +154,11 @@ ...@@ -146,10 +154,11 @@
</sql> </sql>
<select id="EmployeeListByorgCode" resultMap="YgglEmpInfoMap"> <select id="EmployeeListByorgCode" resultMap="YgglEmpInfoMap">
select * from yggl_main_emp select <include refid="salary_List" />
from yggl_main_emp
where org_code = #{orgCode,jdbcType=VARCHAR} where org_code = #{orgCode,jdbcType=VARCHAR}
and job_status = 1 and job_status != 3
and emp_num not in (select cbry.user_num from sbgjj_admin_cbry cbry where cbry.qyid = #{orgCode,jdbcType=VARCHAR}) and emp_num not in (select cbry.user_num from sbgjj_admin_cbry cbry where cbry.qyid = #{orgCode,jdbcType=VARCHAR})
</select> </select>
...@@ -277,7 +286,10 @@ ...@@ -277,7 +286,10 @@
sbfaid, sbfaid,
</if> </if>
<if test ='null != gjjfaid'> <if test ='null != gjjfaid'>
gjjfaid gjjfaid,
</if>
<if test ='null != isUse'>
is_use
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
...@@ -336,7 +348,10 @@ ...@@ -336,7 +348,10 @@
#{sbfaid}, #{sbfaid},
</if> </if>
<if test ='null != gjjfaid'> <if test ='null != gjjfaid'>
#{gjjfaid} #{gjjfaid},
</if>
<if test ='null != isUse'>
#{isUse}
</if> </if>
</trim> </trim>
</insert> </insert>
......
...@@ -10,40 +10,21 @@ ...@@ -10,40 +10,21 @@
<result column="cbfzmx_id" property="cbfzmxId" /> <result column="cbfzmx_id" property="cbfzmxId" />
<result column="coverage_name" property="coverageName" /> <result column="coverage_name" property="coverageName" />
<result column="personal_amount" property="personalAmount" /> <result column="personal_amount" property="personalAmount" />
<result column="personal_proportion" property="personalProportion" />
<result column="company_amount" property="companyAmount" /> <result column="company_amount" property="companyAmount" />
<result column="company_proportion" property="companyProportion" />
<result column="xz_type" property="xzType" /> <result column="xz_type" property="xzType" />
<result column="org_code" property="orgCode" /> <result column="org_code" property="orgCode" />
<result column="addtime" property="addtime" /> <result column="addtime" property="addtime" />
</resultMap>
<sql id="Base_Column_List">
id,
user_id,
attribution_time,
cbfzmx_id,
coverage_name,
personal_amount,
company_amount,
xz_type,
org_code,
addtime
</sql>
<sql id="Base_Column_List_Alias"> <result column="cbfns" property="cbfns" />
id SbgjjAssoDetailed_id, <result column="sbjss" property="sbjss" />
user_id SbgjjAssoDetailed_user_id, <result column="gjjjss" property="gjjjss" />
attribution_time SbgjjAssoDetailed_attribution_time, </resultMap>
cbfzmx_id SbgjjAssoDetailed_cbfzmx_id,
coverage_name SbgjjAssoDetailed_coverage_name,
personal_amount SbgjjAssoDetailed_personal_amount,
company_amount SbgjjAssoDetailed_company_amount,
xz_type SbgjjAssoDetailed_xz_type,
org_code SbgjjAssoDetailed_org_code,
addtime SbgjjAssoDetailed_addtime
</sql>
<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,company_amount,xz_type,org_code,addtime) 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)
<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" >
...@@ -61,9 +42,15 @@ ...@@ -61,9 +42,15 @@
<if test="item.personalAmount != null" > <if test="item.personalAmount != null" >
#{item.personalAmount}, #{item.personalAmount},
</if> </if>
<if test="item.personalProportion != null" >
#{item.personalProportion},
</if>
<if test="item.companyAmount != null" > <if test="item.companyAmount != null" >
#{item.companyAmount}, #{item.companyAmount},
</if> </if>
<if test="item.companyProportion != null" >
#{item.companyProportion},
</if>
<if test="item.xzType != null" > <if test="item.xzType != null" >
#{item.xzType}, #{item.xzType},
</if> </if>
...@@ -71,115 +58,20 @@ ...@@ -71,115 +58,20 @@
#{item.orgCode}, #{item.orgCode},
</if> </if>
<if test="item.addtime != null" > <if test="item.addtime != null" >
#{item.addtime} #{item.addtime},
</if>
)
</foreach>
</insert>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.sbgjj.SbgjjAssoDetailed">
INSERT INTO sbgjj_asso_detailed
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != userId'>
user_id,
</if>
<if test ='null != attributionTime'>
attribution_time,
</if>
<if test ='null != cbfzmxId'>
cbfzmx_id,
</if>
<if test ='null != coverageName'>
coverage_name,
</if>
<if test ='null != personalAmount'>
personal_amount,
</if>
<if test ='null != companyAmount'>
company_amount,
</if> </if>
<if test ='null != xzType'> <if test="item.cbfns != null" >
xz_type, #{item.cbfns},
</if> </if>
<if test ='null != orgCode'> <if test="item.sbjss != null" >
org_code, #{item.sbjss},
</if> </if>
<if test ='null != addtime'> <if test="item.gjjjss != null" >
addtime #{item.gjjjss}
</if> </if>
</trim> )
<trim prefix="values (" suffix=")" suffixOverrides=","> </foreach>
<if test ='null != userId'>
#{userId},
</if>
<if test ='null != attributionTime'>
#{attributionTime},
</if>
<if test ='null != cbfzmxId'>
#{cbfzmxId},
</if>
<if test ='null != coverageName'>
#{coverageName},
</if>
<if test ='null != personalAmount'>
#{personalAmount},
</if>
<if test ='null != companyAmount'>
#{companyAmount},
</if>
<if test ='null != xzType'>
#{xzType},
</if>
<if test ='null != orgCode'>
#{orgCode},
</if>
<if test ='null != addtime'>
#{addtime}
</if>
</trim>
</insert> </insert>
<delete id="delete" >
DELETE FROM sbgjj_asso_detailed
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.sbgjj.SbgjjAssoDetailed">
UPDATE sbgjj_asso_detailed
<set>
<if test ='null != userId'>user_id = #{userId},</if>
<if test ='null != attributionTime'>attribution_time = #{attributionTime},</if>
<if test ='null != cbfzmxId'>cbfzmx_id = #{cbfzmxId},</if>
<if test ='null != coverageName'>coverage_name = #{coverageName},</if>
<if test ='null != personalAmount'>personal_amount = #{personalAmount},</if>
<if test ='null != companyAmount'>company_amount = #{companyAmount},</if>
<if test ='null != xzType'>xz_type = #{xzType},</if>
<if test ='null != orgCode'>org_code = #{orgCode},</if>
<if test ='null != addtime'>addtime = #{addtime}</if>
</set>
WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM sbgjj_asso_detailed
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM sbgjj_asso_detailed
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM sbgjj_asso_detailed
</select>
-->
</mapper> </mapper>
\ No newline at end of file
...@@ -88,6 +88,9 @@ ...@@ -88,6 +88,9 @@
<select id="MonthlycheckoutsheetList" resultMap="MonthlyCheckoutSheetMap"> <select id="MonthlycheckoutsheetList" resultMap="MonthlyCheckoutSheetMap">
select emp.`name` as empname, select emp.`name` as empname,
yjzd.user_num as usernum, yjzd.user_num as usernum,
bmgw.dept,
bmgw.post,
emp.rz_time as rztime,
yjzd.totalmoney, yjzd.totalmoney,
yjzd.gsjltotal, yjzd.gsjltotal,
yjzd.grjltotal, yjzd.grjltotal,
...@@ -105,14 +108,20 @@ ...@@ -105,14 +108,20 @@
yjzd.cbryid yjzd.cbryid
from sbgjj_asso_yjzd yjzd from sbgjj_asso_yjzd yjzd
LEFT JOIN yggl_main_emp as emp on emp.emp_num = yjzd.user_num LEFT JOIN yggl_main_emp as emp on emp.emp_num = yjzd.user_num
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 = emp.bmgw_id
where yjzd.cbryid in (select cbry.id from sbgjj_admin_cbry cbry where yjzd.cbryid in (select cbry.id from sbgjj_admin_cbry cbry
where cbry.state = 1 where cbry.is_use = 1
and cbry.qyid = #{orgcode}) and cbry.qyid = #{orgcode})
and yjzd.zymonth = #{mon} and yjzd.zymonth = #{mon}
and emp.org_code = #{orgcode} and emp.org_code = #{orgcode}
<if test="title != null" > <if test="title != null" >
and (emp.`name` like CONCAT('%',#{title},'%') or emp.emp_num = #{title}) and (emp.`name` like CONCAT('%',#{title},'%') or emp.emp_num = #{title})
</if> </if>
<!-- cbry.state = 1 ==> 1=1 -->
</select> </select>
<select id="zcjsjginsurance" resultMap="BaseResultMap"> <select id="zcjsjginsurance" resultMap="BaseResultMap">
......
...@@ -19,7 +19,9 @@ ...@@ -19,7 +19,9 @@
<resultMap id="AdditionalDeductionMap" type="cn.timer.api.dto.xcgl.AdditionalDeductionDto" > <resultMap id="AdditionalDeductionMap" type="cn.timer.api.dto.xcgl.AdditionalDeductionDto" >
<result column="zxfjid" property="zxfjid" /> <result column="zxfjid" property="zxfjid" />
<result column="date" property="date" />
<result column="name" property="name" /> <result column="name" property="name" />
<result column="phone" property="phone" />
<result column="empNum" property="empNum" /> <result column="empNum" property="empNum" />
<result column="zljy" property="zljy" /> <result column="zljy" property="zljy" />
<result column="zfdk" property="zfdk" /> <result column="zfdk" property="zfdk" />
...@@ -60,7 +62,36 @@ ...@@ -60,7 +62,36 @@
<select id="selectAdditionalDeduction" resultMap="AdditionalDeductionMap"> <select id="selectAdditionalDeduction" resultMap="AdditionalDeductionMap">
select emp.`name` as name, select emp.`name` as name,
emp.emp_num as empNum, emp.emp_num as empNum,
emp.phone,
zxfj.id as zxfjid, zxfj.id as zxfjid,
zxfj.taxmonth as date,
zxfj.childrenedu as zljy,
zxfj.houseloans as zfdk,
zxfj.houserents as zfzj,
zxfj.supportolder as sylr,
zxfj.continueedu as jxjy,
zxfj.totalmoney as lj
from yggl_main_emp emp
LEFT JOIN xcgl_asso_zxfjkc as zxfj on zxfj.userid = emp.emp_num
<if test="param.datetime != ''" >
and zxfj.taxmonth = #{param.datetime}
</if>
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="selectAdditionalDeductiontwo" resultMap="AdditionalDeductionMap">
select emp.`name` as name,
emp.emp_num as empNum,
emp.phone,
zxfj.id as zxfjid,
zxfj.taxmonth as date,
zxfj.childrenedu as zljy, zxfj.childrenedu as zljy,
zxfj.houseloans as zfdk, zxfj.houseloans as zfdk,
zxfj.houserents as zfzj, zxfj.houserents as zfzj,
......
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
<result column="zpqd" property="zpqd" /> <result column="zpqd" property="zpqd" />
<result column="bmgw_id" property="bmgwId" /> <result column="bmgw_id" property="bmgwId" />
<result column="bmgw_name" property="bmgwName" /> <result column="bmgw_name" property="bmgwName" />
<result column="custom_num" property="customNum" />
<result column="org_code" property="orgCode" /> <result column="org_code" property="orgCode" />
<result column="unionid" property="unionid" /> <result column="unionid" property="unionid" />
...@@ -124,7 +125,8 @@ ...@@ -124,7 +125,8 @@
unionid, unionid,
openid, openid,
mpopenid, mpopenid,
appopenid appopenid,
custom_num
</sql> </sql>
<sql id="Base_Column_List_a"> <sql id="Base_Column_List_a">
...@@ -145,60 +147,11 @@ ...@@ -145,60 +147,11 @@
a.zj_type, a.zj_type,
a.zj_num, a.zj_num,
a.syq, a.syq,
a.zz_time a.zz_time,
a.custom_num
</sql> </sql>
<sql id="Base_Column_List_Alias">
id YgglMainEmp_id,
emp_num YgglMainEmp_emp_num,
phone YgglMainEmp_phone,
password YgglMainEmp_password,
head_url YgglMainEmp_head_url,
name YgglMainEmp_name,
english_name YgglMainEmp_english_name,
sex YgglMainEmp_sex,
zj_type YgglMainEmp_zj_type,
zj_num YgglMainEmp_zj_num,
sfzyx_time YgglMainEmp_sfzyx_time,
birthday YgglMainEmp_birthday,
age YgglMainEmp_age,
is_married YgglMainEmp_is_married,
is_pregnant YgglMainEmp_is_pregnant,
area YgglMainEmp_area,
mz YgglMainEmp_mz,
zzmm YgglMainEmp_zzmm,
jg YgglMainEmp_jg,
city YgglMainEmp_city,
hk_type YgglMainEmp_hk_type,
hk_address YgglMainEmp_hk_address,
qq YgglMainEmp_qq,
wechat YgglMainEmp_wechat,
email YgglMainEmp_email,
blood_type YgglMainEmp_blood_type,
language YgglMainEmp_language,
edu YgglMainEmp_edu,
zy YgglMainEmp_zy,
zz_remark YgglMainEmp_zz_remark,
job_type YgglMainEmp_job_type,
job_status YgglMainEmp_job_status,
rz_time YgglMainEmp_rz_time,
syq YgglMainEmp_syq,
zz_time YgglMainEmp_zz_time,
sjzz_time YgglMainEmp_sjzz_time,
is_jrkq YgglMainEmp_is_jrkq,
job_num YgglMainEmp_job_num,
work_address YgglMainEmp_work_address,
work_phone YgglMainEmp_work_phone,
work_email YgglMainEmp_work_email,
zpqd YgglMainEmp_zpqd,
bmgw_id YgglMainEmp_bmgw_id,
org_code YgglMainEmp_org_code,
unionid YgglMainEmp_unionid,
openid YgglMainEmp_openid,
mpopenid YgglMainEmp_mpopenid,
appopenid YgglMainEmp_appopenid
</sql>
<!-- rsybp人事仪表盘 --> <!-- rsybp人事仪表盘 -->
<select id="rsybp" resultMap="Bintu"> <select id="rsybp" resultMap="Bintu">
SELECT e.id AS id,IFNULL(e.age,0) AS age,IFNULL(e.bmgw_id,0) AS bmgwId,IFNULL(b.`name`,'null') AS gw, SELECT e.id AS id,IFNULL(e.age,0) AS age,IFNULL(e.bmgw_id,0) AS bmgwId,IFNULL(b.`name`,'null') AS gw,
...@@ -440,375 +393,4 @@ ...@@ -440,375 +393,4 @@
]]> ]]>
</select> </select>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.yggl.YgglMainEmp">
INSERT INTO yggl_main_emp
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != empNum'>
emp_num,
</if>
<if test ='null != phone'>
phone,
</if>
<if test ='null != password'>
password,
</if>
<if test ='null != headUrl'>
head_url,
</if>
<if test ='null != name'>
name,
</if>
<if test ='null != englishName'>
english_name,
</if>
<if test ='null != sex'>
sex,
</if>
<if test ='null != zjType'>
zj_type,
</if>
<if test ='null != zjNum'>
zj_num,
</if>
<if test ='null != sfzyxTime'>
sfzyx_time,
</if>
<if test ='null != birthday'>
birthday,
</if>
<if test ='null != age'>
age,
</if>
<if test ='null != isMarried'>
is_married,
</if>
<if test ='null != isPregnant'>
is_pregnant,
</if>
<if test ='null != area'>
area,
</if>
<if test ='null != mz'>
mz,
</if>
<if test ='null != zzmm'>
zzmm,
</if>
<if test ='null != jg'>
jg,
</if>
<if test ='null != city'>
city,
</if>
<if test ='null != hkType'>
hk_type,
</if>
<if test ='null != hkAddress'>
hk_address,
</if>
<if test ='null != qq'>
qq,
</if>
<if test ='null != wechat'>
wechat,
</if>
<if test ='null != email'>
email,
</if>
<if test ='null != bloodType'>
blood_type,
</if>
<if test ='null != language'>
language,
</if>
<if test ='null != edu'>
edu,
</if>
<if test ='null != zy'>
zy,
</if>
<if test ='null != zzRemark'>
zz_remark,
</if>
<if test ='null != jobType'>
job_type,
</if>
<if test ='null != jobStatus'>
job_status,
</if>
<if test ='null != rzTime'>
rz_time,
</if>
<if test ='null != syq'>
syq,
</if>
<if test ='null != zzTime'>
zz_time,
</if>
<if test ='null != sjzzTime'>
sjzz_time,
</if>
<if test ='null != isJrkq'>
is_jrkq,
</if>
<if test ='null != jobNum'>
job_num,
</if>
<if test ='null != workAddress'>
work_address,
</if>
<if test ='null != workPhone'>
work_phone,
</if>
<if test ='null != workEmail'>
work_email,
</if>
<if test ='null != zpqd'>
zpqd,
</if>
<if test ='null != bmgwId'>
bmgw_id,
</if>
<if test ='null != orgCode'>
org_code,
</if>
<if test ='null != unionid'>
unionid,
</if>
<if test ='null != openid'>
openid,
</if>
<if test ='null != mpopenid'>
mpopenid,
</if>
<if test ='null != appopenid'>
appopenid
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != empNum'>
#{empNum},
</if>
<if test ='null != phone'>
#{phone},
</if>
<if test ='null != password'>
#{password},
</if>
<if test ='null != headUrl'>
#{headUrl},
</if>
<if test ='null != name'>
#{name},
</if>
<if test ='null != englishName'>
#{englishName},
</if>
<if test ='null != sex'>
#{sex},
</if>
<if test ='null != zjType'>
#{zjType},
</if>
<if test ='null != zjNum'>
#{zjNum},
</if>
<if test ='null != sfzyxTime'>
#{sfzyxTime},
</if>
<if test ='null != birthday'>
#{birthday},
</if>
<if test ='null != age'>
#{age},
</if>
<if test ='null != isMarried'>
#{isMarried},
</if>
<if test ='null != isPregnant'>
#{isPregnant},
</if>
<if test ='null != area'>
#{area},
</if>
<if test ='null != mz'>
#{mz},
</if>
<if test ='null != zzmm'>
#{zzmm},
</if>
<if test ='null != jg'>
#{jg},
</if>
<if test ='null != city'>
#{city},
</if>
<if test ='null != hkType'>
#{hkType},
</if>
<if test ='null != hkAddress'>
#{hkAddress},
</if>
<if test ='null != qq'>
#{qq},
</if>
<if test ='null != wechat'>
#{wechat},
</if>
<if test ='null != email'>
#{email},
</if>
<if test ='null != bloodType'>
#{bloodType},
</if>
<if test ='null != language'>
#{language},
</if>
<if test ='null != edu'>
#{edu},
</if>
<if test ='null != zy'>
#{zy},
</if>
<if test ='null != zzRemark'>
#{zzRemark},
</if>
<if test ='null != jobType'>
#{jobType},
</if>
<if test ='null != jobStatus'>
#{jobStatus},
</if>
<if test ='null != rzTime'>
#{rzTime},
</if>
<if test ='null != syq'>
#{syq},
</if>
<if test ='null != zzTime'>
#{zzTime},
</if>
<if test ='null != sjzzTime'>
#{sjzzTime},
</if>
<if test ='null != isJrkq'>
#{isJrkq},
</if>
<if test ='null != jobNum'>
#{jobNum},
</if>
<if test ='null != workAddress'>
#{workAddress},
</if>
<if test ='null != workPhone'>
#{workPhone},
</if>
<if test ='null != workEmail'>
#{workEmail},
</if>
<if test ='null != zpqd'>
#{zpqd},
</if>
<if test ='null != bmgwId'>
#{bmgwId},
</if>
<if test ='null != orgCode'>
#{orgCode},
</if>
<if test ='null != unionid'>
#{unionid},
</if>
<if test ='null != openid'>
#{openid},
</if>
<if test ='null != mpopenid'>
#{mpopenid},
</if>
<if test ='null != appopenid'>
#{appopenid}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM yggl_main_emp
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.yggl.YgglMainEmp">
UPDATE yggl_main_emp
<set>
<if test ='null != empNum'>emp_num = #{empNum},</if>
<if test ='null != phone'>phone = #{phone},</if>
<if test ='null != password'>password = #{password},</if>
<if test ='null != headUrl'>head_url = #{headUrl},</if>
<if test ='null != name'>name = #{name},</if>
<if test ='null != englishName'>english_name = #{englishName},</if>
<if test ='null != sex'>sex = #{sex},</if>
<if test ='null != zjType'>zj_type = #{zjType},</if>
<if test ='null != zjNum'>zj_num = #{zjNum},</if>
<if test ='null != sfzyxTime'>sfzyx_time = #{sfzyxTime},</if>
<if test ='null != birthday'>birthday = #{birthday},</if>
<if test ='null != age'>age = #{age},</if>
<if test ='null != isMarried'>is_married = #{isMarried},</if>
<if test ='null != isPregnant'>is_pregnant = #{isPregnant},</if>
<if test ='null != area'>area = #{area},</if>
<if test ='null != mz'>mz = #{mz},</if>
<if test ='null != zzmm'>zzmm = #{zzmm},</if>
<if test ='null != jg'>jg = #{jg},</if>
<if test ='null != city'>city = #{city},</if>
<if test ='null != hkType'>hk_type = #{hkType},</if>
<if test ='null != hkAddress'>hk_address = #{hkAddress},</if>
<if test ='null != qq'>qq = #{qq},</if>
<if test ='null != wechat'>wechat = #{wechat},</if>
<if test ='null != email'>email = #{email},</if>
<if test ='null != bloodType'>blood_type = #{bloodType},</if>
<if test ='null != language'>language = #{language},</if>
<if test ='null != edu'>edu = #{edu},</if>
<if test ='null != zy'>zy = #{zy},</if>
<if test ='null != zzRemark'>zz_remark = #{zzRemark},</if>
<if test ='null != jobType'>job_type = #{jobType},</if>
<if test ='null != jobStatus'>job_status = #{jobStatus},</if>
<if test ='null != rzTime'>rz_time = #{rzTime},</if>
<if test ='null != syq'>syq = #{syq},</if>
<if test ='null != zzTime'>zz_time = #{zzTime},</if>
<if test ='null != sjzzTime'>sjzz_time = #{sjzzTime},</if>
<if test ='null != isJrkq'>is_jrkq = #{isJrkq},</if>
<if test ='null != jobNum'>job_num = #{jobNum},</if>
<if test ='null != workAddress'>work_address = #{workAddress},</if>
<if test ='null != workPhone'>work_phone = #{workPhone},</if>
<if test ='null != workEmail'>work_email = #{workEmail},</if>
<if test ='null != zpqd'>zpqd = #{zpqd},</if>
<if test ='null != bmgwId'>bmgw_id = #{bmgwId},</if>
<if test ='null != orgCode'>org_code = #{orgCode},</if>
<if test ='null != unionid'>unionid = #{unionid},</if>
<if test ='null != openid'>openid = #{openid},</if>
<if test ='null != mpopenid'>mpopenid = #{mpopenid},</if>
<if test ='null != appopenid'>appopenid = #{appopenid}</if>
</set>
WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM yggl_main_emp
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM yggl_main_emp
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM yggl_main_emp
</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