Commit b30c8dc7 by Administrator

Merge branch 'develop' into 'master'

Develop

See merge request 8timerv2/8timerapiv200!532
parents 0a175b14 46e8acb5
package cn.timer.api.aspect;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Enumeration;
import java.util.TimeZone;
import javax.servlet.http.HttpServletRequest;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.core.annotation.Order;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import cn.timer.api.config.exception.CustomException;
import lombok.extern.slf4j.Slf4j;
/**
* 拦截输出异常堆栈(改用fluentd方式)
*
* @author Rex.Tan
* @date 2018年12月13日 上午9:18:58
*/
@Slf4j
@Aspect
@Component
@Order(999)
public class RequestAop {
@Pointcut("execution(* cn.timer..*.*Controller.*(..))")
public void init() {
}
@Before("init()")
public void beforeAdvice(JoinPoint joinPoint) {
// 进入方法前拦截
}
@Around("init()")
public Object around(ProceedingJoinPoint pjp) {
long startTime = System.currentTimeMillis();
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String url = request.getRequestURI();
/**
* 输出url
*/
Object obj = null;
String bodyArgs = this.bodyArgs2String(request, pjp.getArgs(), url);
JSONObject urlArgs = this.urlArgs2String(request, request.getParameterNames(), url);
try {
obj = pjp.proceed();
long endTime = System.currentTimeMillis();
this.logInfo2Kafka(request, url, bodyArgs, urlArgs, "success", 0, endTime - startTime, true);
} catch (Throwable e) {
e.printStackTrace();
long endTime = System.currentTimeMillis();
if (e instanceof CustomException) {
/**
* 拦截到主动抛出的异常
*/
CustomException ex = (CustomException) e;
this.logInfo2Kafka(request, url, bodyArgs, urlArgs, ex.getMessage(), 400, endTime - startTime, false);
throw ex;
} else {
/**
* 拦截到未知异常
*/
StringWriter stringWriter = new StringWriter();
e.printStackTrace(new PrintWriter(stringWriter));
this.logInfo2Kafka(request, url, bodyArgs, urlArgs, "未捕获异常: " + stringWriter.toString(), 500, endTime - startTime, false);
throw new CustomException("未捕获异常," + e.getMessage());
}
} finally {
}
return obj;
}
/**
* 请录请求耗时
*
* @author Rex.Tan
* @date 2018年12月13日 下午2:51:31
* @param url 请求地址
* @param args requestBody中的参数
* @param args2 url中的参数
* @param message 消息
* @param status 接口调用返回状态
* @param executionTime 执行耗时
* @param isSuccess 是否调用成功
*/
@Async
public void logInfo2Kafka(HttpServletRequest request, String url, String bodyArgs, JSONObject urlArgs,
String message, Integer status, long executionTime, boolean isSuccess) {
JSONObject json = new JSONObject();
json.put("logType", "___rest___");
// if (UserContext.get() != null) {
// json.put("userName", UserContext.get().getUsername());
// }
json.put("url", url);
json.put("timestamp", System.currentTimeMillis());
json.put("visitTime", now2String());
json.put("message", message);
json.put("status", status);
json.put("executionTime", executionTime);
json.put("channel", request.getHeader("channel"));
json.put("projectName", "8timer");
json.put("requestType", request.getMethod());
/**
* 1.requestBody中的参数
*/
json.put("bodyArgs", bodyArgs);
/**
* 2.url中的参数
*/
json.put("urlArgs", urlArgs);
/**
* 3.如果请求状态不为0, 在控制台输入请求信息
*/
if (status != 0) {
log.error("\r\n" + json.toJSONString());
} else {
log.info("\r\n" + json.toJSONString());
}
}
/**
* 读取requestBody中的参数
*
* @author Rex.Tan
* @date 2018年12月13日 下午2:54:31
* @param bodyArgs
* @param url
* @return
*/
private String bodyArgs2String(HttpServletRequest request, Object[] bodyArgs, String url) {
if ("GET".equals(request.getMethod())) {
return "";
}
if (url != null && url.matches("upload")) {
return "";
}
if (url != null && url.matches("image")) {
return "";
}
try {
if (bodyArgs != null && bodyArgs.length > 0) {
String body = JSONArray.toJSONString(bodyArgs);
if (body.matches("image")) {
return "";
}
return body;
}
} catch (Exception e) {
log.error("=============序列化requestBody中的参数出错, " + url);
}
return "";
}
/**
* 读取url中的参数
*
* @author Rex.Tan
* @date 2019年9月12日 下午2:54:40
* @param request
* @param urlArgs
* @param url
* @return
*/
private JSONObject urlArgs2String(HttpServletRequest request, Enumeration<String> urlArgs, String url) {
JSONObject urlArgsJson = new JSONObject();
try {
if (urlArgs != null) {
while (urlArgs.hasMoreElements()) {
try {
String paraName = (String) urlArgs.nextElement();
urlArgsJson.put(paraName, request.getParameter(paraName));
} catch (Exception e) {
log.error("=============记录url中的参数出错", url);
break;
}
}
}
} catch (Exception e) {
log.error("=============记录url中的参数出错, " + url);
}
return urlArgsJson;
}
private static String now2String() {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
sdf.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
Date now = new Date();
return sdf.format(now);
}
}
...@@ -69,6 +69,9 @@ public class SbgjjAssoCbfa extends Model<SbgjjAssoCbfa> { ...@@ -69,6 +69,9 @@ public class SbgjjAssoCbfa extends Model<SbgjjAssoCbfa> {
private Double sbmax; private Double sbmax;
@ApiModelProperty(value="公积金获取最大值",example="公积金获取最大值") @ApiModelProperty(value="公积金获取最大值",example="公积金获取最大值")
private Double gjjmax; private Double gjjmax;
@ApiModelProperty(value="公积金(0:不办理;1:办理)",example="1")
private Integer isGjjbl;
} }
\ No newline at end of file
...@@ -73,6 +73,14 @@ public class XcglAdminXzz extends Model<XcglAdminXzz> { ...@@ -73,6 +73,14 @@ public class XcglAdminXzz extends Model<XcglAdminXzz> {
@ApiModelProperty(value="所属月份时间",example="2019-12") @ApiModelProperty(value="所属月份时间",example="2019-12")
private String monthtime; private String monthtime;
@ApiModelProperty(value="算薪月份",example="2019-12")
private String xzyf;
@ApiModelProperty(value="薪资规则确定(0:未确定;1:已确定)",example="2019-12")
private Integer isXzgz;
@ApiModelProperty(value="薪资锁定(0:未锁定;1:已锁定)",example="2019-12")
private Integer isXzsd;
} }
\ No newline at end of file
package cn.timer.api.bean.xcgl;
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-10-09
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "xcgl_asso_bszqsz")
@ApiModel("报税周期设置")
public class XcglAssoBszqsz extends Model<XcglAssoBszqsz> {
/**
*
*/
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "id id", example = "101")
private Integer id;
@ApiModelProperty(value = "报税周期(1:当月报税;2:次月报税) 报税周期(1:当月报税;2:次月报税)", example = "101")
private Integer taxReturnCycle;
@ApiModelProperty(value = "企业ID 企业ID", example = "101")
private Integer qyid;
}
\ No newline at end of file
package cn.timer.api.bean.xcgl;
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-10-09
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name="xcgl_asso_gsjsmx")
@ApiModel("个税计算明细")
public class XcglAssoGsjsmx extends Model<XcglAssoGsjsmx> {
/**
*
*/
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue
@TableId (type = IdType.AUTO)
@ApiModelProperty(value="Id Id",example="101")
private Integer id;
@ApiModelProperty(value="用户id ",example="用户id")
private String userNum;
@ApiModelProperty(value="用户姓名 ",example="用户姓名")
private String userName;
@ApiModelProperty(value="薪资月 ",example="薪资月")
private String salaryMonth;
@ApiModelProperty(value="税款所属月份 ",example="税款所属月份")
private String taxMonth;
@ApiModelProperty(value="本月个税 ",example="本月个税")
private Double thmonthPersonal;
@ApiModelProperty(value="累计子女教育 ",example="累计子女教育")
private Double cumZljy;
@ApiModelProperty(value="累计住房贷款利息 ",example="累计住房贷款利息")
private Double cumZfdklx;
@ApiModelProperty(value="累计住房租金 ",example="累计住房租金")
private Double cumZfzj;
@ApiModelProperty(value="累计赡养老人 ",example="累计赡养老人")
private Double cumSylr;
@ApiModelProperty(value="累计继续教育 ",example="累计继续教育")
private Double cumJxjy;
@ApiModelProperty(value="累计专项附加扣除 ",example="累计专项附加扣除")
private Double cumZxfjkc;
@ApiModelProperty(value="计税类型 ",example="计税类型")
private String taxType;
@ApiModelProperty(value="本期收入 ",example="本期收入")
private Double currentIncome;
@ApiModelProperty(value="本期专项扣除 ",example="本期专项扣除")
private Double currentSpecialDeduction;
@ApiModelProperty(value="累计收入额 ",example="累计收入额")
private Double cumSre;
@ApiModelProperty(value="累计减除费用 ",example="累计减除费用")
private Double cumJcfy;
@ApiModelProperty(value="累计专项扣除 ",example="累计专项扣除")
private Double cumZxkc;
@ApiModelProperty(value="累计其他扣除 ",example="累计其他扣除")
private Double cumQtkc;
@ApiModelProperty(value="累计应纳税所得额 ",example="累计应纳税所得额")
private Double cumYnssde;
@ApiModelProperty(value="税率 ",example="税率")
private Double taxRate;
@ApiModelProperty(value="速算扣除数 ",example="速算扣除数")
private Double quickCalculationDeduction;
@ApiModelProperty(value="累计应纳税额 ",example="累计应纳税额")
private Double cumYnse;
@ApiModelProperty(value="累计已预缴税额 ",example="累计已预缴税额")
private Double cumYyjse;
@ApiModelProperty(value="累计应补(退)税额 ",example="累计应补(退)税额")
private Double cumYbtse;
@ApiModelProperty(value="企业id 企业id",example="101")
private Integer qyid;
}
\ No newline at end of file
...@@ -62,6 +62,12 @@ public class XcglAssoGztzt extends Model<XcglAssoGztzt> { ...@@ -62,6 +62,12 @@ public class XcglAssoGztzt extends Model<XcglAssoGztzt> {
@ApiModelProperty(value="工资条组id",example="101") @ApiModelProperty(value="工资条组id",example="101")
private Integer gztszid; private Integer gztszid;
@ApiModelProperty(value="实发工资",example="101")
private Double sfgz;
@ApiModelProperty(value="薪资组id",example="101")
private Integer xzzid;
} }
\ No newline at end of file
...@@ -69,6 +69,12 @@ public class XcglAssoJsgzzx extends Model<XcglAssoJsgzzx> { ...@@ -69,6 +69,12 @@ public class XcglAssoJsgzzx extends Model<XcglAssoJsgzzx> {
@ApiModelProperty(value="公式格式 ",example="系统提供/自定义公式") @ApiModelProperty(value="公式格式 ",example="系统提供/自定义公式")
private String gsgs; private String gsgs;
@ApiModelProperty(value="公式变量值1 ",example="系统提供/公式变量值1")
private Double dygk;
@ApiModelProperty(value="公式变量值2 ",example="系统提供/公式变量值2")
private Double degk;
@ApiModelProperty(value="薪资组id ",example="薪资组id") @ApiModelProperty(value="薪资组id ",example="薪资组id")
private Integer xzzid; private Integer xzzid;
...@@ -78,4 +84,7 @@ public class XcglAssoJsgzzx extends Model<XcglAssoJsgzzx> { ...@@ -78,4 +84,7 @@ public class XcglAssoJsgzzx extends Model<XcglAssoJsgzzx> {
@ApiModelProperty(value="薪资选项id",example="薪资选项id") @ApiModelProperty(value="薪资选项id",example="薪资选项id")
private Integer optionid; private Integer optionid;
@ApiModelProperty(value="是否自定义项(0:否;1:是)",example="0")
private Integer isCustom;
} }
\ No newline at end of file
package cn.timer.api.bean.xcgl;
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-10-09
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name="xcgl_asso_tax_formula")
@ApiModel("个税税率表")
public class XcglAssoTaxFormula extends Model<XcglAssoTaxFormula> {
/**
*
*/
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 Double taxablestart;
@ApiModelProperty(value="应税结束 ",example="应税结束")
private Double taxableend;
@ApiModelProperty(value="税率 税率",example="101")
private Integer taxrate;
@ApiModelProperty(value="速算扣除数 ",example="速算扣除数")
private Double deductions;
@ApiModelProperty(value="企业ID 企业ID",example="101")
private Integer qyid;
}
\ No newline at end of file
...@@ -46,12 +46,25 @@ public class XcglAssoXcjsgz extends Model<XcglAssoXcjsgz> { ...@@ -46,12 +46,25 @@ public class XcglAssoXcjsgz extends Model<XcglAssoXcjsgz> {
private String gsxs; private String gsxs;
@ApiModelProperty(value = "字段一 ", example = "字段一") @ApiModelProperty(value = "字段一 ", example = "字段一")
private String dygk; private Double dygk;
@ApiModelProperty(value = "字段二 ", example = "字段二") @ApiModelProperty(value = "字段二 ", example = "字段二")
private String degk; private Double degk;
@ApiModelProperty(value = "类型(1:迟到早退扣款;2:事假扣款;3:病假扣款;4:入离职缺勤扣款;5:司龄;6:旷工扣款;7:加班费;8:司龄工资;9:应出勤天数;10:入离职缺勤天数;11:应发工资;12:个税;13:实发工资)") @ApiModelProperty(value = "类型(1:迟到早退扣款;2:事假扣款;3:病假扣款;4:入离职缺勤扣款;5:司龄;6:旷工扣款;7:加班费;8:司龄工资;9:应出勤天数;10:入离职缺勤天数;11:应发工资;12:个税;13:实发工资)")
private Integer type; private Integer type;
@ApiModelProperty(value = "", example = "")
private Integer optionid;
@ApiModelProperty(value = "", example = "")
private String dygkText;
@ApiModelProperty(value = "", example = "")
private String degkText;
@ApiModelProperty(value = "", example = "")
private Integer rulestate;
@ApiModelProperty(value = "", example = "")
private Integer defaulttype;
} }
\ No newline at end of file
...@@ -49,7 +49,7 @@ public class XcglAssoXzb extends Model<XcglAssoXzb> { ...@@ -49,7 +49,7 @@ public class XcglAssoXzb extends Model<XcglAssoXzb> {
private Integer xzxid; private Integer xzxid;
@ApiModelProperty(value="薪资项结果 ",example="薪资项结果") @ApiModelProperty(value="薪资项结果 ",example="薪资项结果")
private String xzxjg; private Double xzxjg;
@ApiModelProperty(value="企业id ",example="企业id") @ApiModelProperty(value="企业id ",example="企业id")
private Integer qyid; private Integer qyid;
......
...@@ -172,7 +172,7 @@ public class ClockInController { ...@@ -172,7 +172,7 @@ public class ClockInController {
KqglAssoDkmx dkmc = KqglAssoDkmx.builder().build(); KqglAssoDkmx dkmc = KqglAssoDkmx.builder().build();
String dakariqi = new SimpleDateFormat("yy-MM-dd").format(Double.valueOf(startDateyesterday))+" "+ClockInTool.dateToWeek2(yesterday); String dakariqi = new SimpleDateFormat("yy-MM-dd").format(Double.valueOf(startDateyesterday))+" "+ClockInTool.dateToWeek2(yesterday);
//检查昨日的班次是否存在次日打卡 //检查昨日的班次是否存在次日打卡
KqglAssoDkjl balan = kqglassodkjlmapper.selectOne(new QueryWrapper<KqglAssoDkjl>().lambda().eq(KqglAssoDkjl::getUserId, userid).eq(KqglAssoDkjl::getAttdate, dakariqi).ne(KqglAssoDkjl::getBcid, 0).orderByDesc(KqglAssoDkjl :: getSort).last("LIMIT 1")); KqglAssoDkjl balan = kqglassodkjlmapper.selectOne(new QueryWrapper<KqglAssoDkjl>().lambda().eq(KqglAssoDkjl::getUserId, userid).eq(KqglAssoDkjl::getQyid, qyid).eq(KqglAssoDkjl::getAttdate, dakariqi).ne(KqglAssoDkjl::getBcid, 0).orderByDesc(KqglAssoDkjl :: getSort).last("LIMIT 1"));
boolean dnck = false; boolean dnck = false;
boolean crdk = false;//当次打卡是否存在次日打卡 boolean crdk = false;//当次打卡是否存在次日打卡
if(balan != null) {//前一天是否打过卡 去班次id查询是否存在次日打卡 if(balan != null) {//前一天是否打过卡 去班次id查询是否存在次日打卡
...@@ -251,13 +251,13 @@ public class ClockInController { ...@@ -251,13 +251,13 @@ public class ClockInController {
} }
if(crdk && dnck) { if(crdk && dnck) {
dkmc = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userid) dkmc = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userid).eq(KqglAssoDkmx::getQyid, qyid)
.ge(KqglAssoDkmx::getDksj, startDateyesterday).le(KqglAssoDkmx::getDksj, endDateyesterday).eq(KqglAssoDkmx::getData, yesterday)); .ge(KqglAssoDkmx::getDksj, startDateyesterday).le(KqglAssoDkmx::getDksj, endDateyesterday).eq(KqglAssoDkmx::getData, yesterday));
attdate = MethodCall(qyid,userid,yesterday); attdate = MethodCall(qyid,userid,yesterday);
attendance_date = startDateyesterday; attendance_date = startDateyesterday;
toweek = yesterday; toweek = yesterday;
}else { }else {
dkmc = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userid) dkmc = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userid).eq(KqglAssoDkmx::getQyid, qyid)
.ge(KqglAssoDkmx::getDksj, startDate).le(KqglAssoDkmx::getDksj, endDate).eq(KqglAssoDkmx::getData, putime)); .ge(KqglAssoDkmx::getDksj, startDate).le(KqglAssoDkmx::getDksj, endDate).eq(KqglAssoDkmx::getData, putime));
attendance_date = startDate; attendance_date = startDate;
toweek = putime; toweek = putime;
...@@ -619,7 +619,7 @@ public class ClockInController { ...@@ -619,7 +619,7 @@ public class ClockInController {
sbwd3 = Integer.valueOf(sbwd3_.substring(0, sbwd3_.lastIndexOf(".")));//上班晚到3 sbwd3 = Integer.valueOf(sbwd3_.substring(0, sbwd3_.lastIndexOf(".")));//上班晚到3
//获取前一天最后下班的时间 //获取前一天最后下班的时间
yesterdaymx = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userid) yesterdaymx = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userid).eq(KqglAssoDkmx::getQyid, qyid)
.ge(KqglAssoDkmx::getDksj, startDateyesterday).le(KqglAssoDkmx::getDksj, endDateyesterday)); .ge(KqglAssoDkmx::getDksj, startDateyesterday).le(KqglAssoDkmx::getDksj, endDateyesterday));
attdateyesterday = MethodCall(qyid,userid,yesterday); attdateyesterday = MethodCall(qyid,userid,yesterday);
...@@ -918,12 +918,12 @@ public class ClockInController { ...@@ -918,12 +918,12 @@ public class ClockInController {
Date sd1=df1.parse(ClockInTool.stampToDate(String.valueOf(stapclotime)));//应打卡时间 2020-06-10 18:30:00 Date sd1=df1.parse(ClockInTool.stampToDate(String.valueOf(stapclotime)));//应打卡时间 2020-06-10 18:30:00
Date sd2=df1.parse(current_time);//当前时间 2020-06-10 16:06:58 Date sd2=df1.parse(current_time);//当前时间 2020-06-10 16:06:58
if(sd1.after(sd2)) {//为true时 打的是昨天的卡 if(sd1.after(sd2)) {//为true时 打的是昨天的卡
zydkmc = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userid) zydkmc = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userid).eq(KqglAssoDkmx::getQyid, qyid)
.ge(KqglAssoDkmx::getDksj, startDateyesterday).le(KqglAssoDkmx::getDksj, endDateyesterday)); .ge(KqglAssoDkmx::getDksj, startDateyesterday).le(KqglAssoDkmx::getDksj, endDateyesterday));
attendance_date = startDateyesterday; attendance_date = startDateyesterday;
toweek = yesterday; toweek = yesterday;
}else { }else {
zydkmc = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userid) zydkmc = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userid).eq(KqglAssoDkmx::getQyid, qyid)
.ge(KqglAssoDkmx::getDksj, startDate).le(KqglAssoDkmx::getDksj, endDate)); .ge(KqglAssoDkmx::getDksj, startDate).le(KqglAssoDkmx::getDksj, endDate));
attendance_date = startDate; attendance_date = startDate;
toweek = putime; toweek = putime;
...@@ -1557,7 +1557,7 @@ public class ClockInController { ...@@ -1557,7 +1557,7 @@ public class ClockInController {
// KqglAssoDkmx dkmc = KqglAssoDkmx.builder().build(); // KqglAssoDkmx dkmc = KqglAssoDkmx.builder().build();
String dakariqi = new SimpleDateFormat("yy-MM-dd").format(Double.valueOf(startDateyesterday))+" "+ClockInTool.dateToWeek2(yesterday); String dakariqi = new SimpleDateFormat("yy-MM-dd").format(Double.valueOf(startDateyesterday))+" "+ClockInTool.dateToWeek2(yesterday);
//检查昨日的班次是否存在次日打卡 //检查昨日的班次是否存在次日打卡
KqglAssoDkjl balan = kqglassodkjlmapper.selectOne(new QueryWrapper<KqglAssoDkjl>().lambda().eq(KqglAssoDkjl::getUserId, userid).eq(KqglAssoDkjl::getAttdate, dakariqi).ne(KqglAssoDkjl::getBcid, 0).orderByDesc(KqglAssoDkjl :: getSort).last("LIMIT 1")); KqglAssoDkjl balan = kqglassodkjlmapper.selectOne(new QueryWrapper<KqglAssoDkjl>().lambda().eq(KqglAssoDkjl::getUserId, userid).eq(KqglAssoDkjl::getAttdate, dakariqi).eq(KqglAssoDkjl::getQyid, qyid).ne(KqglAssoDkjl::getBcid, 0).orderByDesc(KqglAssoDkjl :: getSort).last("LIMIT 1"));
// boolean dnck = false; // boolean dnck = false;
// boolean crdk = false;//当次打卡是否存在次日打卡 // boolean crdk = false;//当次打卡是否存在次日打卡
if(balan != null) {//前一天是否打过卡 去班次id查询是否存在次日打卡 if(balan != null) {//前一天是否打过卡 去班次id查询是否存在次日打卡
...@@ -1617,14 +1617,14 @@ public class ClockInController { ...@@ -1617,14 +1617,14 @@ public class ClockInController {
} }
if(crdk && dnck) { if(crdk && dnck) {
dkmc = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userid) dkmc = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userid).eq(KqglAssoDkmx::getQyid, qyid)
.ge(KqglAssoDkmx::getDksj, startDateyesterday).le(KqglAssoDkmx::getDksj, endDateyesterday).eq(KqglAssoDkmx::getData, yesterday)); .ge(KqglAssoDkmx::getDksj, startDateyesterday).le(KqglAssoDkmx::getDksj, endDateyesterday).eq(KqglAssoDkmx::getData, yesterday));
attdate = MethodCall(qyid,userid,yesterday); attdate = MethodCall(qyid,userid,yesterday);
attendance_date = startDateyesterday; attendance_date = startDateyesterday;
toweek = yesterday; toweek = yesterday;
putime = toweek; putime = toweek;
}else { }else {
dkmc = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userid) dkmc = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userid).eq(KqglAssoDkmx::getQyid, qyid)
.ge(KqglAssoDkmx::getDksj, startDate).le(KqglAssoDkmx::getDksj, endDate).eq(KqglAssoDkmx::getData, putime)); .ge(KqglAssoDkmx::getDksj, startDate).le(KqglAssoDkmx::getDksj, endDate).eq(KqglAssoDkmx::getData, putime));
attendance_date = startDate; attendance_date = startDate;
toweek = putime; toweek = putime;
...@@ -2009,7 +2009,7 @@ public class ClockInController { ...@@ -2009,7 +2009,7 @@ public class ClockInController {
sbwd3 = Integer.valueOf(sbwd3_.substring(0, sbwd3_.lastIndexOf(".")));//上班晚到3 sbwd3 = Integer.valueOf(sbwd3_.substring(0, sbwd3_.lastIndexOf(".")));//上班晚到3
//获取前一天最后下班的时间 //获取前一天最后下班的时间
yesterdaymx = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userid) yesterdaymx = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userid).eq(KqglAssoDkmx::getQyid, qyid)
.ge(KqglAssoDkmx::getDksj, startDateyesterday).le(KqglAssoDkmx::getDksj, endDateyesterday)); .ge(KqglAssoDkmx::getDksj, startDateyesterday).le(KqglAssoDkmx::getDksj, endDateyesterday));
attdateyesterday = MethodCall(qyid,userid,yesterday); attdateyesterday = MethodCall(qyid,userid,yesterday);
...@@ -2303,7 +2303,7 @@ public class ClockInController { ...@@ -2303,7 +2303,7 @@ public class ClockInController {
status_ = 2; status_ = 2;
}else { }else {
KqglAssoDkmx zydkmc = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userid) KqglAssoDkmx zydkmc = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userid).eq(KqglAssoDkmx::getQyid, qyid)
.ge(KqglAssoDkmx::getDksj, startDate).le(KqglAssoDkmx::getDksj, endDate)); .ge(KqglAssoDkmx::getDksj, startDate).le(KqglAssoDkmx::getDksj, endDate));
if(zydkmc == null) {//新增 if(zydkmc == null) {//新增
KqglAssoDkmx pcd = KqglAssoDkmx.builder().build(); KqglAssoDkmx pcd = KqglAssoDkmx.builder().build();
...@@ -2402,12 +2402,12 @@ public class ClockInController { ...@@ -2402,12 +2402,12 @@ public class ClockInController {
Date sd1=df1.parse(ClockInTool.stampToDate(String.valueOf(stapclotime)));//应打卡时间 2020-06-10 18:30:00 Date sd1=df1.parse(ClockInTool.stampToDate(String.valueOf(stapclotime)));//应打卡时间 2020-06-10 18:30:00
Date sd2=df1.parse(current_time);//当前时间 2020-06-10 16:06:58 Date sd2=df1.parse(current_time);//当前时间 2020-06-10 16:06:58
if(sd1.after(sd2)) {//为true时 打的是昨天的卡 if(sd1.after(sd2)) {//为true时 打的是昨天的卡
zydkmc = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userid) zydkmc = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userid).eq(KqglAssoDkmx::getQyid, qyid)
.ge(KqglAssoDkmx::getDksj, startDateyesterday).le(KqglAssoDkmx::getDksj, endDateyesterday)); .ge(KqglAssoDkmx::getDksj, startDateyesterday).le(KqglAssoDkmx::getDksj, endDateyesterday));
attendance_date = startDateyesterday; attendance_date = startDateyesterday;
toweek = yesterday; toweek = yesterday;
}else { }else {
zydkmc = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userid) zydkmc = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userid).eq(KqglAssoDkmx::getQyid, qyid)
.ge(KqglAssoDkmx::getDksj, startDate).le(KqglAssoDkmx::getDksj, endDate)); .ge(KqglAssoDkmx::getDksj, startDate).le(KqglAssoDkmx::getDksj, endDate));
attendance_date = startDate; attendance_date = startDate;
toweek = putime; toweek = putime;
......
...@@ -717,6 +717,18 @@ public class ClockInTool { ...@@ -717,6 +717,18 @@ public class ClockInTool {
return res; return res;
} }
/**
* 时间戳转换时间
*/
public static String stampToDate5(String s){
String res;
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("MM-dd HH:mm");
long lt = new Long(s);
Date date = new Date(lt);
res = simpleDateFormat.format(date);
return res;
}
public static String Str_Time_formatting(String str,String Format) { public static String Str_Time_formatting(String str,String Format) {
SimpleDateFormat sdf = new SimpleDateFormat(Format); SimpleDateFormat sdf = new SimpleDateFormat(Format);
...@@ -752,5 +764,25 @@ public class ClockInTool { ...@@ -752,5 +764,25 @@ public class ClockInTool {
cst = simpleDateFormat.format(date2); cst = simpleDateFormat.format(date2);
return cst; return cst;
} }
/**
* Sun Nov 01 00:00:00 CST 2020
*/
public static String SunNovCSTYMD(Date date2){
String cst;
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
cst = simpleDateFormat.format(date2);
return cst;
}
/**
* Sun Nov 01 00:00:00 CST 2020
*/
public static String SunNovCSTY(Date date2){
String cst;
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy");
cst = simpleDateFormat.format(date2);
return cst;
}
} }
...@@ -463,7 +463,7 @@ public class RealTimeUpdate{ ...@@ -463,7 +463,7 @@ public class RealTimeUpdate{
absenlatetimes = subs.getKgcdfzstotal(); absenlatetimes = subs.getKgcdfzstotal();
} }
//具体请假天数 //具体请假天数
List<KqglAssoRelationSummary> leavetotal = kqglassorelationsummarymapper.SpecificLeave(user.getEmpnum(), 2, ttstr); List<KqglAssoRelationSummary> leavetotal = kqglassorelationsummarymapper.SpecificLeave(user.getEmpnum(), 2, ttstr,org_code);
String[] leaves = new String[leavetotal.size()]; String[] leaves = new String[leavetotal.size()];
int l = 0; int l = 0;
if(leavetotal.size()>0) { if(leavetotal.size()>0) {
...@@ -473,7 +473,7 @@ public class RealTimeUpdate{ ...@@ -473,7 +473,7 @@ public class RealTimeUpdate{
} }
} }
//具体加班天数 //具体加班天数
List<KqglAssoRelationSummary> overtitotal = kqglassorelationsummarymapper.SpecificLeave(user.getEmpnum(), 1, ttstr); List<KqglAssoRelationSummary> overtitotal = kqglassorelationsummarymapper.SpecificLeave(user.getEmpnum(), 1, ttstr,org_code);
String[] overtimes = new String[overtitotal.size()]; String[] overtimes = new String[overtitotal.size()];
int o = 0; int o = 0;
if(overtitotal.size() > 0) { if(overtitotal.size() > 0) {
...@@ -483,7 +483,7 @@ public class RealTimeUpdate{ ...@@ -483,7 +483,7 @@ public class RealTimeUpdate{
} }
} }
//具体出差天数 //具体出差天数
List<KqglAssoRelationSummary> trtotal = kqglassorelationsummarymapper.SpecificLeave(user.getEmpnum(), 3, ttstr); List<KqglAssoRelationSummary> trtotal = kqglassorelationsummarymapper.SpecificLeave(user.getEmpnum(), 3, ttstr,org_code);
String[] travels = new String[trtotal.size()]; String[] travels = new String[trtotal.size()];
int cx = 0; int cx = 0;
if(trtotal.size()>0) { if(trtotal.size()>0) {
...@@ -493,7 +493,7 @@ public class RealTimeUpdate{ ...@@ -493,7 +493,7 @@ public class RealTimeUpdate{
} }
} }
//具体外出天数 //具体外出天数
List<KqglAssoRelationSummary> goouttotal = kqglassorelationsummarymapper.SpecificLeave(user.getEmpnum(), 4, ttstr); List<KqglAssoRelationSummary> goouttotal = kqglassorelationsummarymapper.SpecificLeave(user.getEmpnum(), 4, ttstr,org_code);
String[] goouts = new String[goouttotal.size()]; String[] goouts = new String[goouttotal.size()];
int wc = 0; int wc = 0;
if(goouttotal.size()>0) { if(goouttotal.size()>0) {
...@@ -503,7 +503,7 @@ public class RealTimeUpdate{ ...@@ -503,7 +503,7 @@ public class RealTimeUpdate{
} }
} }
//具体补卡天数 //具体补卡天数
List<KqglAssoRelationSummary> cardtotal = kqglassorelationsummarymapper.SpecificLeave(user.getEmpnum(), 5, ttstr); List<KqglAssoRelationSummary> cardtotal = kqglassorelationsummarymapper.SpecificLeave(user.getEmpnum(), 5, ttstr,org_code);
String[] cards = new String[cardtotal.size()]; String[] cards = new String[cardtotal.size()];
int bk = 0; int bk = 0;
if(cardtotal.size()>0) { if(cardtotal.size()>0) {
...@@ -596,7 +596,7 @@ public class RealTimeUpdate{ ...@@ -596,7 +596,7 @@ public class RealTimeUpdate{
/******/ /******/
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).eq(KqglAssoRelationSummary::getOrgCode, org_code));
String leavetype = "未知";//请假类型 String leavetype = "未知";//请假类型
String company = "未知";//请假单位 String company = "未知";//请假单位
if(lea != null) { if(lea != null) {
...@@ -612,17 +612,17 @@ public class RealTimeUpdate{ ...@@ -612,17 +612,17 @@ public class RealTimeUpdate{
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;
} }
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).eq(KqglAssoRelationSummary::getOrgCode, org_code));
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).eq(KqglAssoRelationSummary::getOrgCode, org_code));
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).eq(KqglAssoRelationSummary::getOrgCode, org_code));
buka = "#"+"已补卡:"+(lea.getStartTime()).substring(5, 16); buka = "#"+"已补卡:"+(lea.getStartTime()).substring(5, 16);
} }
...@@ -630,7 +630,7 @@ public class RealTimeUpdate{ ...@@ -630,7 +630,7 @@ public class RealTimeUpdate{
String company = "未知",method = "无";//加班单位、加班补偿方式 String company = "未知",method = "无";//加班单位、加班补偿方式
List<KqglAssoRelationSummary> leas = KqglAssoRelationSummary.builder().build().selectList(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 1)); List<KqglAssoRelationSummary> leas = KqglAssoRelationSummary.builder().build().selectList(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 1).eq(KqglAssoRelationSummary::getOrgCode, org_code));
for(KqglAssoRelationSummary lea : leas) { for(KqglAssoRelationSummary lea : leas) {
//最小加班单位 1:按分钟加班、2:按半小时加班、3:按小时加班、4:按半天加班、5:按天加班 //最小加班单位 1:按分钟加班、2:按半小时加班、3:按小时加班、4:按半天加班、5:按天加班
......
...@@ -155,10 +155,9 @@ public class OSSController { ...@@ -155,10 +155,9 @@ public class OSSController {
@ApiOperation(value = "删除多个(谨慎使用,谨慎使用)", httpMethod = "DELETE", notes = "接口发布说明") @ApiOperation(value = "删除多个(谨慎使用,谨慎使用)", httpMethod = "DELETE", notes = "接口发布说明")
public Result<List<String>> delFiles(@CurrentUser UserBean userBean, @RequestBody OssDto ossDto) { public Result<List<String>> delFiles(@CurrentUser UserBean userBean, @RequestBody OssDto ossDto) {
List<String> list = null; List<String> list = null;
List<String> keys = null;
try { try {
List<String> keys = new ArrayList<String>();
for (String fileName : ossDto.getFileNames()) { for (String fileName : ossDto.getFileNames()) {
keys = new ArrayList<String>();
String key = "8timer2.0/" + userBean.getOrgCode() + "/" + ossDto.getMoudle() + "/" + fileName; String key = "8timer2.0/" + userBean.getOrgCode() + "/" + ossDto.getMoudle() + "/" + fileName;
keys.add(key); keys.add(key);
} }
......
...@@ -187,8 +187,10 @@ public class SocialSecurityFundController { ...@@ -187,8 +187,10 @@ public class SocialSecurityFundController {
SbgjjAssoCbfa cbfa = SbgjjAssoCbfa.builder().build(); SbgjjAssoCbfa cbfa = SbgjjAssoCbfa.builder().build();
cbfa.setCbmcName(insura.getName());//参保名称 cbfa.setCbmcName(insura.getName());//参保名称
cbfa.setCbcs(insura.getInsuredcities());//参保城市 cbfa.setCbcs(insura.getInsuredcities());//参保城市
cbfa.setSbcbfzmc(insura.getShebaoname());//社保参保方案名称 cbfa.setSbcbfzmc(insura.getShebaoname());//社保参保方案名称
cbfa.setGjjcbfamc(insura.getGongjijinname());//公积金参保方案名称 cbfa.setGjjcbfamc(insura.getGongjijinname());//公积金参保方案名称
cbfa.setFwf(Double.valueOf(insura.getFwf()));//服务费 (元/人/月) cbfa.setFwf(Double.valueOf(insura.getFwf()));//服务费 (元/人/月)
cbfa.setSbSbgjjid(insura.getShebaoid());//社保(公积金)方案库id cbfa.setSbSbgjjid(insura.getShebaoid());//社保(公积金)方案库id
cbfa.setGjjSbgjjid(insura.getGongjijinid());//(社保)公积金方案库id cbfa.setGjjSbgjjid(insura.getGongjijinid());//(社保)公积金方案库id
...@@ -200,6 +202,13 @@ public class SocialSecurityFundController { ...@@ -200,6 +202,13 @@ public class SocialSecurityFundController {
cbfa.setGjjmax(Double.valueOf(insura.getGjjmax())); cbfa.setGjjmax(Double.valueOf(insura.getGjjmax()));
cbfa.setQyid(userBean.getOrgCode()); cbfa.setQyid(userBean.getOrgCode());
if(insura.getIsGjjbl()) {
cbfa.setIsGjjbl(0);
}else {
cbfa.setIsGjjbl(1);
}
sbgjjassocbfamapper.sbgjjassocbfainsert(cbfa); sbgjjassocbfamapper.sbgjjassocbfainsert(cbfa);
int cbfaid = cbfa.getId(); int cbfaid = cbfa.getId();
...@@ -368,6 +377,12 @@ public class SocialSecurityFundController { ...@@ -368,6 +377,12 @@ public class SocialSecurityFundController {
cbfa.setSbmax(Double.valueOf(insura.getSbmax())); cbfa.setSbmax(Double.valueOf(insura.getSbmax()));
cbfa.setGjjmax(Double.valueOf(insura.getGjjmax())); cbfa.setGjjmax(Double.valueOf(insura.getGjjmax()));
if(insura.getIsGjjbl()) {
cbfa.setIsGjjbl(0);
}else {
cbfa.setIsGjjbl(1);
}
cbfa.updateById(); cbfa.updateById();
sbgjjassocbfzmxmapper.deleteBycbfaid(insura.getId()); sbgjjassocbfzmxmapper.deleteBycbfaid(insura.getId());
...@@ -519,7 +534,6 @@ public class SocialSecurityFundController { ...@@ -519,7 +534,6 @@ public class SocialSecurityFundController {
@ApiOperation(value = "投保", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "投保", httpMethod = "POST", notes = "接口发布说明")
public ResponseResult InsurancePlan(@CurrentUser UserBean userBean,@RequestBody InsureDto insuredto) { public ResponseResult InsurancePlan(@CurrentUser UserBean userBean,@RequestBody InsureDto insuredto) {
String[] usernums = insuredto.getUsernums(); String[] usernums = insuredto.getUsernums();
if(insuredto.getUsernum() > 0) { if(insuredto.getUsernum() > 0) {
...@@ -531,6 +545,7 @@ public class SocialSecurityFundController { ...@@ -531,6 +545,7 @@ public class SocialSecurityFundController {
if(usernums.length > 0){ if(usernums.length > 0){
for(int f=0;f<usernums.length;f++){ for(int f=0;f<usernums.length;f++){
SbgjjAdminCbry.builder().state(0).isUse(0).build().update(new QueryWrapper<SbgjjAdminCbry>().lambda().eq(SbgjjAdminCbry::getUserNum, Integer.valueOf(usernums[f])).eq(SbgjjAdminCbry::getQyid, userBean.getOrgCode()));
// Integer.valueOf(usernums[f]) // Integer.valueOf(usernums[f])
SbgjjAdminCbry cbry = SbgjjAdminCbry.builder().build(); SbgjjAdminCbry cbry = SbgjjAdminCbry.builder().build();
...@@ -902,7 +917,7 @@ public class SocialSecurityFundController { ...@@ -902,7 +917,7 @@ public class SocialSecurityFundController {
if(istb.getSbcbState() == 3 && istb.getGjjcbState() == 3) {//社保和公积金全部“停保”时 if(istb.getSbcbState() == 3 && istb.getGjjcbState() == 3) {//社保和公积金全部“停保”时
SbgjjAdminCbry up = SbgjjAdminCbry.builder().build(); SbgjjAdminCbry up = SbgjjAdminCbry.builder().build();
up.setId(stopi.getId()); up.setId(stopi.getId());
up.setState(0);//状态 1:使用中;0:历史记录 up.setState(1);//up.setState(0);//状态 1:使用中;0:历史记录
up.updateById(); up.updateById();
} }
...@@ -947,18 +962,18 @@ public class SocialSecurityFundController { ...@@ -947,18 +962,18 @@ public class SocialSecurityFundController {
// cbry.setId(insuredto.getId()); // cbry.setId(insuredto.getId());
// cbry.updateById(); // cbry.updateById();
int isUse = 1;//是否使用 0:否 1:是 // int isUse = 1;//是否使用 0:否 1:是
//
SbgjjAdminCbry ascb = SbgjjAdminCbry.builder().id(insuredto.getId()).build().selectById(); // SbgjjAdminCbry ascb = SbgjjAdminCbry.builder().id(insuredto.getId()).build().selectById();
//
if(ascb.getSbjlStatime().equals(insuredto.getJnmouth()) || ascb.getGjjjlStatime().equals(insuredto.getGjjJnmouth())) { // if(ascb.getSbjlStatime().equals(insuredto.getJnmouth()) || ascb.getGjjjlStatime().equals(insuredto.getGjjJnmouth())) {
isUse = 0; // isUse = 0;
} // }
SbgjjAdminCbry cbrytwo = SbgjjAdminCbry.builder().build(); SbgjjAdminCbry cbrytwo = SbgjjAdminCbry.builder().build();
cbrytwo.setState(0);//状态 1:使用中;0:历史记录 cbrytwo.setState(0);//状态 1:使用中;0:历史记录
cbrytwo.setId(insuredto.getId()); cbrytwo.setId(insuredto.getId());
cbrytwo.setIsUse(isUse); cbrytwo.setIsUse(0);
cbrytwo.updateById(); cbrytwo.updateById();
...@@ -1036,6 +1051,11 @@ public class SocialSecurityFundController { ...@@ -1036,6 +1051,11 @@ public class SocialSecurityFundController {
preval = formatDouble1(Double.valueOf(jishuxx)*gsh); preval = formatDouble1(Double.valueOf(jishuxx)*gsh);
} }
SbgjjAssoDetailed.builder().build().delete(new QueryWrapper<SbgjjAssoDetailed>().lambda().eq(SbgjjAssoDetailed::getUserId, insuredto.getUsernum())
.eq(SbgjjAssoDetailed::getAttributionTime, insuredto.getJnmouth()).eq(SbgjjAssoDetailed::getCbfzmxId, sbjs.getId()).eq(SbgjjAssoDetailed::getCoverageName, sbjs.getXz())
.eq(SbgjjAssoDetailed::getOrgCode, userBean.getOrgCode()));
SbgjjAssoDetailed deta = SbgjjAssoDetailed.builder().build(); SbgjjAssoDetailed deta = SbgjjAssoDetailed.builder().build();
deta.setUserId(insuredto.getUsernum()); deta.setUserId(insuredto.getUsernum());
deta.setAttributionTime(insuredto.getJnmouth());// deta.setAttributionTime(insuredto.getJnmouth());//
...@@ -1156,6 +1176,10 @@ public class SocialSecurityFundController { ...@@ -1156,6 +1176,10 @@ public class SocialSecurityFundController {
preval = formatDouble1(Double.valueOf(jishuxx)*gsh); preval = formatDouble1(Double.valueOf(jishuxx)*gsh);
} }
SbgjjAssoDetailed.builder().build().delete(new QueryWrapper<SbgjjAssoDetailed>().lambda().eq(SbgjjAssoDetailed::getUserId, insuredto.getUsernum())
.eq(SbgjjAssoDetailed::getAttributionTime, insuredto.getGjjJnmouth()).eq(SbgjjAssoDetailed::getCbfzmxId, gjjgs.getId()).eq(SbgjjAssoDetailed::getCoverageName, gjjgs.getXz())
.eq(SbgjjAssoDetailed::getOrgCode, userBean.getOrgCode()));
SbgjjAssoDetailed deta = SbgjjAssoDetailed.builder().build(); SbgjjAssoDetailed deta = SbgjjAssoDetailed.builder().build();
deta.setUserId(insuredto.getUsernum()); deta.setUserId(insuredto.getUsernum());
deta.setAttributionTime(insuredto.getGjjJnmouth());// deta.setAttributionTime(insuredto.getGjjJnmouth());//
......
This source diff could not be displayed because it is too large. You can view the blob instead.
package cn.timer.api.controller.xcgl;
import java.text.DecimalFormat;
import java.text.ParseException;
import java.text.ParsePosition;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
public class SalaryTool {
static SimpleDateFormat mat = new SimpleDateFormat("yyyy-MM-dd");
static SimpleDateFormat matM = new SimpleDateFormat("yyyy-MM");
/**
* 保留两位小数,四舍五入的一个老土的方法
* @param d
* @return
*/
public static double formatDouble(double d) {
return (double)Math.round(d*10000)/10000;
}
public static double formatDouble_(double d) {
double zhi = 0;
DecimalFormat df = new DecimalFormat("0.00");
zhi = Double.valueOf(df.format(d));
return zhi;
}
/**
* 获取两个日期相差的月数
* @param d2 较大的日期
* @param d1 较小的日期
* @return 如果d1>d2返回 月数差 否则返回0
*/
public static int getMonthDiff(String d1, String d2)throws ParseException {
Calendar c1 = Calendar.getInstance();
Calendar c2 = Calendar.getInstance();
//将String日期转换成date
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
java.util.Date date1=sdf.parse(d1);
java.util.Date date2=sdf.parse(d2);
c1.setTime(date1);
c2.setTime(date2);
//判断两个日期的大小
if(c2.getTimeInMillis() < c1.getTimeInMillis()) return 0;
int year1 = c1.get(Calendar.YEAR);
int year2 = c2.get(Calendar.YEAR);
int month1 = c1.get(Calendar.MONTH);
int month2 = c2.get(Calendar.MONTH);
int day1 = c1.get(Calendar.DAY_OF_MONTH);
int day2 = c2.get(Calendar.DAY_OF_MONTH);
// 获取年的差值 假设 d1 = 2015-9-30 d2 = 2015-12-16
int yearInterval = year2 - year1;
// 如果 d1的 月-日 小于 d2的 月-日 那么 yearInterval-- 这样就得到了相差的年数
if(month2 < month1 || month1 == month2 && day2 < day1) yearInterval --;
// 获取月数差值
int monthInterval = (month2 + 12) - month1 ;
if(day2 > day1) monthInterval ++;
monthInterval %= 12;
return yearInterval * 12 + monthInterval + 1;
}
public static Date strToDateLong(String strDate) {
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
ParsePosition pos = new ParsePosition(0);
Date strtodate = formatter.parse(strDate, pos);
return strtodate;
}
// 上个月
public static String getfirstlastTwo(String time) {
String firstnext;
Calendar c1 = Calendar.getInstance();
c1.setTime(strToDateLong(time)); // 设置为当前时间
c1.add(Calendar.MONTH, -1);
c1.set(Calendar.DAY_OF_MONTH, 1);
firstnext = mat.format(c1.getTime());
return firstnext;
}
public static String getlastlastTwo(String time) {
String lastnext;
Calendar ca1 = Calendar.getInstance();
ca1.setTime(strToDateLong(time)); // 设置为当前时间
ca1.add(Calendar.MONTH, -1);
ca1.set(Calendar.DAY_OF_MONTH, ca1.getActualMaximum(Calendar.DAY_OF_MONTH));
lastnext = mat.format(ca1.getTime());
return lastnext;
}
// 本月
public static String getfirstnowTwo(String time) {
String firstnow;
Calendar c = Calendar.getInstance();
c.setTime(strToDateLong(time)); // 设置为当前时间
c.add(Calendar.MONTH, 0);
c.set(Calendar.DAY_OF_MONTH, 1);
firstnow = mat.format(c.getTime());
return firstnow;
}
public static String getlastnowTwo(String time) {
String lastnow;
Calendar ca = Calendar.getInstance();
ca.setTime(strToDateLong(time)); // 设置为当前时间
ca.set(Calendar.DAY_OF_MONTH, ca.getActualMaximum(Calendar.DAY_OF_MONTH));
lastnow = mat.format(ca.getTime());
return lastnow;
}
// 下个月
public static String getfirstnextTwo(String time) {
String firstnext;
Calendar c1 = Calendar.getInstance();
c1.setTime(strToDateLong(time)); // 设置为当前时间
c1.add(Calendar.MONTH, 1);
c1.set(Calendar.DAY_OF_MONTH, 1);
firstnext = mat.format(c1.getTime());
return firstnext;
}
public static String getlastnextTwo(String time) {
String lastnext;
Calendar ca1 = Calendar.getInstance();
ca1.setTime(strToDateLong(time)); // 设置为当前时间
ca1.add(Calendar.MONTH, 1);
ca1.set(Calendar.DAY_OF_MONTH, ca1.getActualMaximum(Calendar.DAY_OF_MONTH));
lastnext = mat.format(ca1.getTime());
return lastnext;
}
/**
* 根据 年、月 获取对应的月份 的 天数
*/
public static int getDaysByYearMonth(int year, int month)
{
Calendar a = Calendar.getInstance();
a.set(Calendar.YEAR, year);
a.set(Calendar.MONTH, month - 1);
a.set(Calendar.DATE, 1);
a.roll(Calendar.DATE, -1);
int maxDate = a.get(Calendar.DATE);
return maxDate;
}
/**
* 获取月份起始日期
*
* @param date
* @return
* @throws ParseException
*/
public static String getMinMonthDate(String date) throws ParseException {
Calendar calendar = Calendar.getInstance();
calendar.setTime(mat.parse(date));
calendar.set(Calendar.DAY_OF_MONTH,
calendar.getActualMinimum(Calendar.DAY_OF_MONTH));
return mat.format(calendar.getTime());
}
/**
* 获取月份最后日期
*
* @param date
* @return
* @throws ParseException
*/
public static String getMaxMonthDate(String date) throws ParseException {
Calendar calendar = Calendar.getInstance();
calendar.setTime(mat.parse(date));
calendar.set(Calendar.DAY_OF_MONTH,
calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
return mat.format(calendar.getTime());
}
// 下个月
public static String getfirstnextMo(String time) {
String firstnext;
Calendar c1 = Calendar.getInstance();
c1.setTime(strToDateLong(time)); // 设置为当前时间
c1.add(Calendar.MONTH, 1);
c1.set(Calendar.DAY_OF_MONTH, 1);
firstnext = matM.format(c1.getTime());
return firstnext;
}
// 上个月
public static String getfirstlastMo(String time) {
String firstnext;
Calendar c1 = Calendar.getInstance();
c1.setTime(strToDateLong(time)); // 设置为当前时间
c1.add(Calendar.MONTH, -1);
c1.set(Calendar.DAY_OF_MONTH, 1);
firstnext = matM.format(c1.getTime());
return firstnext;
}
//##################################################################################################################################
// 上个月
public static String getfirstlast() {
String firstnext;
Calendar c1 = Calendar.getInstance();
c1.add(Calendar.MONTH, -1);
c1.set(Calendar.DAY_OF_MONTH, 1);
firstnext = mat.format(c1.getTime());
return firstnext;
}
public static String getlastlast() {
String lastnext;
Calendar ca1 = Calendar.getInstance();
ca1.add(Calendar.MONTH, -1);
ca1.set(Calendar.DAY_OF_MONTH, ca1.getActualMaximum(Calendar.DAY_OF_MONTH));
lastnext = mat.format(ca1.getTime());
return lastnext;
}
// 本月
public static String getfirstnow() {
String firstnow;
Calendar c = Calendar.getInstance();
c.add(Calendar.MONTH, 0);
c.set(Calendar.DAY_OF_MONTH, 1);
firstnow = mat.format(c.getTime());
return firstnow;
}
public static String getlastnow() {
String lastnow;
Calendar ca = Calendar.getInstance();
ca.set(Calendar.DAY_OF_MONTH, ca.getActualMaximum(Calendar.DAY_OF_MONTH));
lastnow = mat.format(ca.getTime());
return lastnow;
}
// 下个月
public static String getfirstnext() {
String firstnext;
Calendar c1 = Calendar.getInstance();
c1.add(Calendar.MONTH, 1);
c1.set(Calendar.DAY_OF_MONTH, 1);
firstnext = mat.format(c1.getTime());
return firstnext;
}
public static String getlastnext() {
String lastnext;
Calendar ca1 = Calendar.getInstance();
ca1.add(Calendar.MONTH, 1);
ca1.set(Calendar.DAY_OF_MONTH, ca1.getActualMaximum(Calendar.DAY_OF_MONTH));
lastnext = mat.format(ca1.getTime());
return lastnext;
}
}
...@@ -7,6 +7,7 @@ import org.springframework.stereotype.Repository; ...@@ -7,6 +7,7 @@ import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.bean.kqmk.KqglAssoDkjl; import cn.timer.api.bean.kqmk.KqglAssoDkjl;
import cn.timer.api.dto.xcgl.HolidayInquiryDto;
/** /**
* 打卡记录表 * 打卡记录表
...@@ -16,4 +17,10 @@ import cn.timer.api.bean.kqmk.KqglAssoDkjl; ...@@ -16,4 +17,10 @@ import cn.timer.api.bean.kqmk.KqglAssoDkjl;
@Repository @Repository
public interface KqglAssoDkjlMapper extends BaseMapper<KqglAssoDkjl> { public interface KqglAssoDkjlMapper extends BaseMapper<KqglAssoDkjl> {
List<KqglAssoDkjl> getDetailedRecordClock(Long start,Long end,Integer userId,String attdate,Integer qyid); List<KqglAssoDkjl> getDetailedRecordClock(Long start,Long end,Integer userId,String attdate,Integer qyid);
List<KqglAssoDkjl> LateleaveEarly(int qyid,int userid,String attdate);
HolidayInquiryDto MinutesLateLeaveEarly(int qyid,int userid,int mark,String attdate);
HolidayInquiryDto TimesBeingLateLeavingEarly(int qyid,int userid,int mark,String attdate);
} }
...@@ -18,7 +18,7 @@ public interface KqglAssoRelationSummaryMapper extends BaseMapper<KqglAssoRelati ...@@ -18,7 +18,7 @@ public interface KqglAssoRelationSummaryMapper extends BaseMapper<KqglAssoRelati
KqglAssoRelationSummary SecondaryValue(int userid, int approvaltype, String time); KqglAssoRelationSummary SecondaryValue(int userid, int approvaltype, String time);
List<KqglAssoRelationSummary> SpecificLeave(int userid,int approvaltype,String apptime); List<KqglAssoRelationSummary> SpecificLeave(int userid,int approvaltype,String apptime,int orgcode);
List<KqglAssoRelationSummary> LeaveInvestigation(int userid,int approvaltype,String apptime,int orgcode); List<KqglAssoRelationSummary> LeaveInvestigation(int userid,int approvaltype,String apptime,int orgcode);
...@@ -28,4 +28,6 @@ public interface KqglAssoRelationSummaryMapper extends BaseMapper<KqglAssoRelati ...@@ -28,4 +28,6 @@ public interface KqglAssoRelationSummaryMapper extends BaseMapper<KqglAssoRelati
KqglAssoRelationSummary Businessdayclockin(int userid,int approvaltype,String apptime,int orgcode); KqglAssoRelationSummary Businessdayclockin(int userid,int approvaltype,String apptime,int orgcode);
List<KqglAssoRelationSummary> HolidayDetails(int orgcode,String apptime,int rules_type,int userid);
} }
...@@ -23,5 +23,7 @@ public interface SbgjjAssoYjzdMapper extends BaseMapper<SbgjjAssoYjzd> { ...@@ -23,5 +23,7 @@ public interface SbgjjAssoYjzdMapper extends BaseMapper<SbgjjAssoYjzd> {
SbgjjAssoYjzd zcjsjginsurance(int usernum,int qyid,String zymonth); SbgjjAssoYjzd zcjsjginsurance(int usernum,int qyid,String zymonth);
List<MonthlyCheckoutSheetDto> MonthlycheckoutsheetList(MonthlyStatementDto monthlystatementdto); List<MonthlyCheckoutSheetDto> MonthlycheckoutsheetList(MonthlyStatementDto monthlystatementdto);
SbgjjAssoYjzd IndividualTotalsbgjj(String usernum,int qyid,String zymonth);
} }
package cn.timer.api.dao.xcgl;
import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.bean.xcgl.XcglAssoBszqsz;
/**
* 报税周期设置
* @author LAL 2020-10-09
*/
@Repository
public interface XcglAssoBszqszMapper extends BaseMapper<XcglAssoBszqsz> {
}
package cn.timer.api.dao.xcgl;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import cn.timer.api.bean.xcgl.XcglAssoGsjsmx;
import cn.timer.api.dto.xcgl.SearchSalariedPeopleDto;
import cn.timer.api.dto.xcgl.XcglAssoGsjsmxDto;
/**
* 个税计算明细
* @author LAL 2020-10-09
*/
@Repository
public interface XcglAssoGsjsmxMapper extends BaseMapper<XcglAssoGsjsmx> {
List<XcglAssoGsjsmxDto> SelectIndividualincomedetails(@Param("param") SearchSalariedPeopleDto searchsalariedpeopledto);
IPage<XcglAssoGsjsmxDto> SelectIndividualincomedetails(IPage<XcglAssoGsjsmxDto> page,@Param("param") SearchSalariedPeopleDto searchsalariedpeopledto);
List<XcglAssoGsjsmx> Allyearround(String year,String usernum,Integer qyid);
}
package cn.timer.api.dao.xcgl; package cn.timer.api.dao.xcgl;
import java.util.List; import java.util.List;
import cn.timer.api.dto.xcgl.PayslipSearchDto;
import cn.timer.api.dto.xcgl.SendpayslipBatchDto;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...@@ -19,8 +21,20 @@ public interface XcglAssoGztztMapper extends BaseMapper<XcglAssoGztzt> { ...@@ -19,8 +21,20 @@ public interface XcglAssoGztztMapper extends BaseMapper<XcglAssoGztzt> {
int deletexcglassogztzt(int gztszid); int deletexcglassogztzt(int gztszid);
List<PayslipDetailsDto> PayslipDetails(int gztszid,int qyid); List<PayslipDetailsDto> payslipSearch(PayslipSearchDto dto);
int deletegztztByxzzid(int xzzid); int deletegztztByxzzid(int xzzid);
/**
* 发送
* @param id
* @param fsType
*/
void payslipSend(Integer id, Integer fsType);
/**
* 批量发送
* @param dto
*/
void payslipSendBatch(SendpayslipBatchDto dto);
} }
...@@ -29,4 +29,6 @@ public interface XcglAssoJsgzzxMapper extends BaseMapper<XcglAssoJsgzzx> { ...@@ -29,4 +29,6 @@ public interface XcglAssoJsgzzxMapper extends BaseMapper<XcglAssoJsgzzx> {
List<CalculationOptionsDto> selectCalculationOptionsList(int xzzid,int userid); List<CalculationOptionsDto> selectCalculationOptionsList(int xzzid,int userid);
List<XcglAssoJsgzzx> selectSalarySectionList(int xzzid); List<XcglAssoJsgzzx> selectSalarySectionList(int xzzid);
List<XcglAssoJsgzzx> SalaryRuleGroupItem(int xzzid);
} }
package cn.timer.api.dao.xcgl;
import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.bean.xcgl.XcglAssoTaxFormula;
/**
* 个税税率表
* @author LAL 2020-10-09
*/
@Repository
public interface XcglAssoTaxFormulaMapper extends BaseMapper<XcglAssoTaxFormula> {
}
...@@ -8,6 +8,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -8,6 +8,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.bean.xcgl.XcglAssoXzb; import cn.timer.api.bean.xcgl.XcglAssoXzb;
import cn.timer.api.dto.xcgl.CalculationDto; import cn.timer.api.dto.xcgl.CalculationDto;
import cn.timer.api.dto.xcgl.CalculationValueDto; import cn.timer.api.dto.xcgl.CalculationValueDto;
import cn.timer.api.dto.xcgl.CheckSalaryStaffDto;
import cn.timer.api.dto.xcgl.HolidayInquiryDto;
import cn.timer.api.dto.xcgl.UserPersonnelDto;
/** /**
* 薪资表 * 薪资表
...@@ -19,8 +22,8 @@ public interface XcglAssoXzbMapper extends BaseMapper<XcglAssoXzb> { ...@@ -19,8 +22,8 @@ public interface XcglAssoXzbMapper extends BaseMapper<XcglAssoXzb> {
int xzbinsert(XcglAssoXzb xcglassoxzb); int xzbinsert(XcglAssoXzb xcglassoxzb);
int deleteByuserid(int userid,int xzzid,String xzyf); int deleteByuserid(int userid,int xzzid,String xzyf);
List<CalculationDto> CalculationResults(int xzzid,String xzyf,int orgcode); List<CalculationDto> CalculationResults(CheckSalaryStaffDto checksalary);
int deleteByAttendance(int userid,int xzzid,String xzyf); int deleteByAttendance(int userid,int xzzid,String xzyf);
...@@ -31,4 +34,19 @@ public interface XcglAssoXzbMapper extends BaseMapper<XcglAssoXzb> { ...@@ -31,4 +34,19 @@ public interface XcglAssoXzbMapper extends BaseMapper<XcglAssoXzb> {
CalculationValueDto lateearlyDeduction(int empnum,int xzzid,String salaryitem); CalculationValueDto lateearlyDeduction(int empnum,int xzzid,String salaryitem);
int ModifyImportedSalary(XcglAssoXzb xcglassoxzb); int ModifyImportedSalary(XcglAssoXzb xcglassoxzb);
void updateBatchXzxjg(List<XcglAssoXzb> list);
HolidayInquiryDto HolidayamountNum(int orgcode,String apptime,int rules_type,int userid);
HolidayInquiryDto Holidayamount(int orgcode,String apptime,int rules_type,int userid);
HolidayInquiryDto NumberOvertime(int orgcode,String apptime,int userid);
HolidayInquiryDto PeriodsOvertime(int orgcode,String apptime,int overtimetypeid,int userid);
List<UserPersonnelDto> UserPersonnel(int xzzid,int orgcode);
XcglAssoXzb PayInColumn(int xzxid,int userid,String xzyf);
} }
package cn.timer.api.dao.xcgl; package cn.timer.api.dao.xcgl;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import java.util.List; import java.util.List;
import cn.timer.api.dto.xcgl.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.bean.xcgl.XcglAssoXzdazdy; import cn.timer.api.bean.xcgl.XcglAssoXzdazdy;
import cn.timer.api.dto.xcgl.ChangeSalaryDto;
import cn.timer.api.dto.xcgl.FixedSalaryStaffDto;
import cn.timer.api.dto.xcgl.SearchSalariedPeopleDto;
/** /**
...@@ -25,12 +24,14 @@ public interface XcglAssoXzdazdyMapper extends BaseMapper<XcglAssoXzdazdy> { ...@@ -25,12 +24,14 @@ public interface XcglAssoXzdazdyMapper extends BaseMapper<XcglAssoXzdazdy> {
int insertxcglassoxzdazdyList(List<XcglAssoXzdazdy> xcglassoxzdazdy); int insertxcglassoxzdazdyList(List<XcglAssoXzdazdy> xcglassoxzdazdy);
int dazdyupdate(XcglAssoXzdazdy xcglassoxzdazdy); int dazdyupdate(XcglAssoXzdazdy xcglassoxzdazdy);
List<FixedSalaryStaffDto> selectFixedSalaryStaff(SearchSalariedPeopleDto search); IPage<FixedSalaryStaffDto> selectFixedSalaryStaff(IPage<FixedSalaryStaffDto> page, @Param("param")SearchSalariedPeopleDto search);
List<ChangeSalaryDto> AchieveSalaryAdjustment(Integer orgcode,Integer empnum); List<ChangeSalaryDto> AchieveSalaryAdjustment(Integer orgcode,Integer empnum);
List<FixedSalaryStaffDto> SalaryAdjustmentRecord(Integer orgcode,Integer empnum); List<FixedSalaryStaffDto> SalaryAdjustmentRecord(Integer orgcode,Integer empnum);
XcglAssoXzdazdy SalaryFixedWages(String zdmc); XcglAssoXzdazdy SalaryFixedWages(String zdmc);
List<FixedSalaryStaffDto> selectPaygroupStaff(CheckSalaryStaffDto checksearch);
} }
package cn.timer.api.dao.xcgl; package cn.timer.api.dao.xcgl;
import java.util.List; import java.util.List;
import cn.timer.api.dto.xcgl.SalaryoptionsDto;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...@@ -15,6 +16,6 @@ import cn.timer.api.dto.xcgl.XcglAssoOptionDto; ...@@ -15,6 +16,6 @@ import cn.timer.api.dto.xcgl.XcglAssoOptionDto;
@Repository @Repository
public interface XcglSalaryItemMapper extends BaseMapper<XcglSalaryItem> { public interface XcglSalaryItemMapper extends BaseMapper<XcglSalaryItem> {
List<XcglAssoOptionDto> selectxcglsalaryitemList(); List<XcglAssoOptionDto> selectxcglsalaryitemList(SalaryoptionsDto dto);
} }
...@@ -21,4 +21,6 @@ public class AttqueryCriteriaDto extends Page { ...@@ -21,4 +21,6 @@ public class AttqueryCriteriaDto extends Page {
@ApiModelProperty(value = "部门ID", example = "") @ApiModelProperty(value = "部门ID", example = "")
private Integer deptid; private Integer deptid;
private Integer turnover_status;
} }
package cn.timer.api.dto.kqmk;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class CalculatingCompensationDto {
// private String salary_month;//薪资月
private Integer pay_group_id;//薪资组id
}
...@@ -29,6 +29,8 @@ public class EmployeeLeaveBalanceDto { ...@@ -29,6 +29,8 @@ public class EmployeeLeaveBalanceDto {
@ApiModelProperty(value = "入职日期 ", example = "字段说明") @ApiModelProperty(value = "入职日期 ", example = "字段说明")
private Integer orgcode; private Integer orgcode;
private Integer turnover_status;
@ApiModelProperty(value = "表数据", example = "字段说明") @ApiModelProperty(value = "表数据", example = "字段说明")
List<BalanceSheetDataDto> balanceTo; List<BalanceSheetDataDto> balanceTo;
......
...@@ -24,6 +24,8 @@ public class InsuranceSchemeDto implements Serializable { ...@@ -24,6 +24,8 @@ public class InsuranceSchemeDto implements Serializable {
SocialfundDto[] gongjijin; SocialfundDto[] gongjijin;
int gongjijinid; int gongjijinid;
Boolean isGjjbl;//0:不办理;1:办理
String sbmin; String sbmin;
String gjjmin; String gjjmin;
......
package cn.timer.api.dto.xcgl;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class APPPayslipPeriodDto {
private Integer userid;
private String xzyf;
}
...@@ -19,10 +19,10 @@ public class AdditionalDeductionDto implements Serializable { ...@@ -19,10 +19,10 @@ public class AdditionalDeductionDto implements Serializable {
String name; String name;
String phone; String phone;
String empNum; String empNum;
int zljy; Double zljy;
int zfdk; Double zfdk;
int zfzj; Double zfzj;
int sylr; Double sylr;
int jxjy; Double jxjy;
int lj; Double lj;
} }
package cn.timer.api.dto.xcgl;
import java.io.Serializable;
import java.util.List;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class AppPaysSalaryOneDto implements Serializable{/**
*
*/
private static final long serialVersionUID = 193839030071552299L;
private String itemname;//基本工资、岗位津贴、事假、事假扣款......
private Double deduction;//扣款额
private String fieldone;//字段1(共2次、共11.5小时=1.44天)
private String fieldtwo;//字段2(共迟到8/分钟,早退20/分钟)
List<AppPaysSalaryTwoDto> detailed;
}
package cn.timer.api.dto.xcgl;
import java.io.Serializable;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class AppPaysSalaryTwoDto implements Serializable{/**
*
*/
private static final long serialVersionUID = 5773269251839518331L;
private String term;//早退时间、迟到时间....
private String specifictime;//时间 08:25
private Double field;//字段 8、3.5....
}
package cn.timer.api.dto.xcgl;
import java.io.Serializable;
import java.util.List;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class AppPayslipDetailsDto implements Serializable{
/**
*
*/
private static final long serialVersionUID = 1672310141723169753L;
private Integer id;// 工资条id
private Double netsalary;// 实发工资
private String wagetime;// 工资时间
private Integer userid;// 用户id
private Integer sfyqrgz;// 是否已确认工资
List<AppPaysSalaryOneDto> specific = null;
}
package cn.timer.api.dto.xcgl;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BuildPayGroupDto {
@ApiModelProperty(value = "薪资月份", example = "2020-09")
String xzyf;
}
package cn.timer.api.dto.xcgl;
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 CheckSalaryStaffDto extends Page{
@ApiModelProperty(value="姓名/工号 ",example="姓名/工号")
String text;
@ApiModelProperty(value="薪资组id ",example="薪资组id")
int paygroupid;
@ApiModelProperty(value="薪资月份 ",example="薪资月份")
private String xzyf;
@ApiModelProperty(value="企业编号 ",example="企业编号")
int orgcode;
}
package cn.timer.api.dto.xcgl;
import java.util.List;
import cn.timer.api.bean.xcgl.XcglAssoJsgzzx;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class FloatingDataDto {
List<UserPersonnelDto> users;
List<XcglAssoJsgzzx> jsgzzx;
}
package cn.timer.api.dto.xcgl;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class HolidayInquiryDto {
int num;
double balance;
}
package cn.timer.api.dto.xcgl;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ImportDescriptionDto {
int success = 0;//成功
int failure = 0;//失败
int toupdate = 0;//更新
String[] names;
}
package cn.timer.api.dto.xcgl;
import java.io.Serializable;
import cn.timer.api.dto.xcgl.SpecialDeductionDto.SpecialDeductionDtoBuilder;
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 IndividualTaxDetailsDto extends Page implements Serializable{
/**
*
*/
private static final long serialVersionUID = 1L;
@ApiModelProperty(value="用户手机号 ",example="用户手机号")
private String phone;
@ApiModelProperty(value="用户姓名 ",example="用户姓名")
private String userName;
@ApiModelProperty(value="薪资月 ",example="薪资月")
private String salaryMonth;
@ApiModelProperty(value="税款所属月份 ",example="税款所属月份")
private String taxMonth;
@ApiModelProperty(value="本月个税 ",example="本月个税")
private String thmonthPersonal;
@ApiModelProperty(value="累计子女教育 ",example="累计子女教育")
private String cumZljy;
@ApiModelProperty(value="累计住房贷款利息 ",example="累计住房贷款利息")
private String cumZfdklx;
@ApiModelProperty(value="累计住房租金 ",example="累计住房租金")
private String cumZfzj;
@ApiModelProperty(value="累计赡养老人 ",example="累计赡养老人")
private String cumSylr;
@ApiModelProperty(value="累计继续教育 ",example="累计继续教育")
private String cumJxjy;
@ApiModelProperty(value="累计专项附加扣除 ",example="累计专项附加扣除")
private String cumZxfjkc;
@ApiModelProperty(value="计税类型 ",example="计税类型")
private String taxType;
@ApiModelProperty(value="本期收入 ",example="本期收入")
private String currentIncome;
@ApiModelProperty(value="本期专项扣除 ",example="本期专项扣除")
private String currentSpecialDeduction;
@ApiModelProperty(value="累计收入额 ",example="累计收入额")
private String cumSre;
@ApiModelProperty(value="累计减除费用 ",example="累计减除费用")
private String cumJcfy;
@ApiModelProperty(value="累计专项扣除 ",example="累计专项扣除")
private String cumZxkc;
@ApiModelProperty(value="累计其他扣除 ",example="累计其他扣除")
private String cumQtkc;
@ApiModelProperty(value="累计应纳税所得额 ",example="累计应纳税所得额")
private String cumYnssde;
@ApiModelProperty(value="税率 ",example="税率")
private String taxRate;
@ApiModelProperty(value="速算扣除数 ",example="速算扣除数")
private String quickCalculationDeduction;
@ApiModelProperty(value="累计应纳税额 ",example="累计应纳税额")
private String cumYnse;
@ApiModelProperty(value="累计已预缴税额 ",example="累计已预缴税额")
private String cumYyjse;
@ApiModelProperty(value="累计应补(退)税额 ",example="累计应补(退)税额")
private String cumYbtse;
}
package cn.timer.api.dto.xcgl;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ModifysalaryruleDto {
private Integer jsgzzxid;// 计薪规则组项id
private Integer xcjsgzid;// 薪酬计算规则公式id
private String formula;// 公式
/**
* 公式变量值1
*/
private double dygk;
/**
* 公式变量值2
*/
private double degk;
}
...@@ -22,6 +22,20 @@ public class PayTermDto implements Serializable { ...@@ -22,6 +22,20 @@ public class PayTermDto implements Serializable {
String xremarks;// 项备注 String xremarks;// 项备注
Integer xgsid;// 项对应的公式id Integer xgsid;// 项对应的公式id
String xgsgs;// 项公式 String xgsgs;// 项公式
Integer xiscustom;//是否自定义项(0:否;1:是)
Integer xrulestate;//
/**
* 公式变量值1
*/
private double xdygk;
/**
* 公式变量值2
*/
private double xdegk;
Integer xjxgzid;// Integer xjxgzid;//
Integer xoptionid;
} }
...@@ -23,4 +23,8 @@ public class PayslipDetailsDto implements Serializable { ...@@ -23,4 +23,8 @@ public class PayslipDetailsDto implements Serializable {
String dept; String dept;
String post; String post;
/**
* 实发工资
*/
private double sfgz;
} }
package cn.timer.api.dto.xcgl;
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 PayslipSearchDto extends Page {
@ApiModelProperty(value="姓名/工号 ",example="姓名/工号")
String text;
@ApiModelProperty(value="薪资组id ",example="薪资组id")
Integer xzzid;
@ApiModelProperty(value="工资条组id ",example="工资条组id")
Integer gztszid;
@ApiModelProperty(value="发送状态 ",example="发送状态")
private Integer fsType;
@ApiModelProperty(value="确认状态 ",example="确认状态")
private Integer qrType;
@ApiModelProperty(value="企业编号 ",example="企业编号")
Integer orgcode;
}
package cn.timer.api.dto.xcgl;
import java.io.Serializable;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PushPayslipDto implements Serializable {
/**
*
*/
private static final long serialVersionUID = 6984424343409821996L;
private Integer gztid;//工资条id
private Integer xzzid;//薪资组id
private Integer userid;// 用户id
private String xzyf;// 薪资月份
}
...@@ -15,6 +15,9 @@ public class SalaryFieldDto implements Serializable {/** ...@@ -15,6 +15,9 @@ public class SalaryFieldDto implements Serializable {/**
*/ */
private static final long serialVersionUID = 2131188736263992532L; private static final long serialVersionUID = 2131188736263992532L;
List<ComputeUserDto> comuser; // List<ComputeUserDto> comuser;
List<CalculationDto> comuser;
List<CalculatedFieldDto> calfie; List<CalculatedFieldDto> calfie;
} }
package cn.timer.api.dto.xcgl;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SalaryRulesDto {
Integer xzzid;
Integer state;//0 未
}
package cn.timer.api.dto.xcgl;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SalaryoptionsDto {
/**
* 状态 1:系统项;2:非系统项
*/
private Integer opttype;
}
package cn.timer.api.dto.xcgl;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SendpayslipBatchDto {
private List<Integer> ids;
}
...@@ -50,6 +50,6 @@ public class SpecialDeductionDto extends Page implements Serializable { ...@@ -50,6 +50,6 @@ public class SpecialDeductionDto extends Page implements Serializable {
@ApiModelProperty(value = "继续教育", example = "A") @ApiModelProperty(value = "继续教育", example = "A")
private String jxjy; private String jxjy;
@ApiModelProperty(value = "累计专项附加扣除", example = "A") // @ApiModelProperty(value = "累计专项附加扣除", example = "A")
private String lj; // private String lj;
} }
package cn.timer.api.dto.xcgl;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserPersonnelDto {
String orgcode;
int empnum;
String empname;
String dept;//部门
String post;//职位
}
package cn.timer.api.dto.xcgl;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class XcglAssoGsjsmxDto implements Serializable{
/**
*
*/
private static final long serialVersionUID = 7019484399933503292L;
@ApiModelProperty(value = "员工手机号", example = "员工手机号")
private String phone;
@ApiModelProperty(value = "用户id ", example = "用户id")
private String userNum;
@ApiModelProperty(value = "用户姓名 ", example = "用户姓名")
private String userName;
@ApiModelProperty(value = "薪资月 ", example = "薪资月")
private String salaryMonth;
@ApiModelProperty(value = "税款所属月份 ", example = "税款所属月份")
private String taxMonth;
@ApiModelProperty(value = "本月个税 ", example = "本月个税")
private Double thmonthPersonal;
@ApiModelProperty(value = "累计子女教育 ", example = "累计子女教育")
private Double cumZljy;
@ApiModelProperty(value = "累计住房贷款利息 ", example = "累计住房贷款利息")
private Double cumZfdklx;
@ApiModelProperty(value = "累计住房租金 ", example = "累计住房租金")
private Double cumZfzj;
@ApiModelProperty(value = "累计赡养老人 ", example = "累计赡养老人")
private Double cumSylr;
@ApiModelProperty(value = "累计继续教育 ", example = "累计继续教育")
private Double cumJxjy;
@ApiModelProperty(value = "累计专项附加扣除 ", example = "累计专项附加扣除")
private Double cumZxfjkc;
@ApiModelProperty(value = "计税类型 ", example = "计税类型")
private String taxType;
@ApiModelProperty(value = "本期收入 ", example = "本期收入")
private Double currentIncome;
@ApiModelProperty(value = "本期专项扣除 ", example = "本期专项扣除")
private Double currentSpecialDeduction;
@ApiModelProperty(value = "累计收入额 ", example = "累计收入额")
private Double cumSre;
@ApiModelProperty(value = "累计减除费用 ", example = "累计减除费用")
private Double cumJcfy;
@ApiModelProperty(value = "累计专项扣除 ", example = "累计专项扣除")
private Double cumZxkc;
@ApiModelProperty(value = "累计其他扣除 ", example = "累计其他扣除")
private Double cumQtkc;
@ApiModelProperty(value = "累计应纳税所得额 ", example = "累计应纳税所得额")
private Double cumYnssde;
@ApiModelProperty(value = "税率 ", example = "税率")
private Double taxRate;
@ApiModelProperty(value = "速算扣除数 ", example = "速算扣除数")
private Double quickCalculationDeduction;
@ApiModelProperty(value = "累计应纳税额 ", example = "累计应纳税额")
private Double cumYnse;
@ApiModelProperty(value = "累计已预缴税额 ", example = "累计已预缴税额")
private Double cumYyjse;
@ApiModelProperty(value = "累计应补(退)税额 ", example = "累计应补(退)税额")
private Double cumYbtse;
@ApiModelProperty(value = "企业id 企业id", example = "101")
private Integer qyid;
}
...@@ -194,6 +194,7 @@ config-8timer: ...@@ -194,6 +194,7 @@ config-8timer:
machine8timerUrl: 'http://test-8timer-fk.youlingrc.com' machine8timerUrl: 'http://test-8timer-fk.youlingrc.com'
#machine8timerUrl: 'http://192.168.3.38:8088' #machine8timerUrl: 'http://192.168.3.38:8088'
authentication-code: '888888' authentication-code: '888888'
prescription: 8 #一天工作8小时
register-free-time: 90 #系统赠送时间 register-free-time: 90 #系统赠送时间
register-company-max-num: 100 #默认最大公司数量 register-company-max-num: 100 #默认最大公司数量
register-childAccount-max-num: 10 #默认最大子账号数量 register-childAccount-max-num: 10 #默认最大子账号数量
......
...@@ -169,6 +169,7 @@ config-8timer: ...@@ -169,6 +169,7 @@ config-8timer:
machine8timerUrl: 'http://record.8timer.cn' machine8timerUrl: 'http://record.8timer.cn'
#machine8timerUrl: 'http://192.168.3.38:8088' #machine8timerUrl: 'http://192.168.3.38:8088'
authentication-code: '' authentication-code: ''
prescription: 8 #一天工作8小时
register-free-time: 90 #系统赠送时间 register-free-time: 90 #系统赠送时间
register-company-max-num: 100 register-company-max-num: 100
register-childAccount-max-num: 10 register-childAccount-max-num: 10
......
...@@ -168,6 +168,7 @@ config-8timer: ...@@ -168,6 +168,7 @@ config-8timer:
machine8timerUrl: 'http://test-8timer-fk.youlingrc.com' machine8timerUrl: 'http://test-8timer-fk.youlingrc.com'
#machine8timerUrl: 'http://192.168.3.38:8088' #machine8timerUrl: 'http://192.168.3.38:8088'
authentication-code: '888888' authentication-code: '888888'
prescription: 8 #一天工作8小时
register-free-time: 90 #系统赠送时间 register-free-time: 90 #系统赠送时间
register-company-max-num: 100 register-company-max-num: 100
register-childAccount-max-num: 10 register-childAccount-max-num: 10
......
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true" scanPeriod="60 seconds" debug="false">
<!--2、设置上下文名称 每个logger都关联到logger上下文,默认上下文名称为“default”。但可以使用设置成其他名字,用于区分不同应用程序的记录。
一旦设置,不能修改,可以通过 %contextName 来打印日志上下文名称,一般来说我们不用这个属性,可有可无。 -->
<!--<contextName>cool_is_life</contextName> -->
<!--3、设置变量 用来定义变量值的标签, 有两个属性,name和value;其中name的值是变量的名称,value的值时变量定义的值。 通过定义的值会被插入到logger上下文中。定义变量后,可以使“${}”来使用变量。 -->
<!--<property name="log.path" value="/logs/logback.log" /> -->
<!--<property name="log.path" value="/logs/logback" /> -->
<property name="logback.logdir" value="/deploy/logs/" />
<property name="logback.appname" value="8timer-api" />
<!--4、appender用来格式化日志输出节点,有俩个属性name和class,class用来指定哪种输出策略,常用就是控制台输出策略和文件输出策略。
控制台输出 ConsoleAppender 输出到文件 RollingFileAppender -->
<!--输出到控制台 -->
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{YYYY-MM-dd HH:mm:ss.SSS} %-5level [%thread] %logger - %msg%n</pattern>
<charset>UTF-8</charset>
</encoder>
</appender>
<!--输出到文件 -->
<appender name="file" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!--如果只是想要 Info 级别的日志,只是过滤 info 还是会输出 Error 日志,因为 Error 的级别高,所以我们使用下面的策略,可以避免输出
Error 的日志 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<!--过滤 Error -->
<level>ERROR</level>
<!--匹配到就禁止 -->
<onMatch>DENY</onMatch>
<!--没有匹配到就允许 -->
<onMismatch>ACCEPT</onMismatch>
</filter>
<!--日志名称,如果没有File 属性,那么只会使用FileNamePattern的文件路径规则,如果同时有<File>和<FileNamePattern>,那么当天日志是<File>,明天会自动把今天
的日志改名为今天的日期。即,<File> 的日志都是当天的。 -->
<file>${logback.logdir}/${logback.appname}.info.log</file>
<!--滚动策略,按照时间滚动 TimeBasedRollingPolicy -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!--文件路径,定义了日志的切分方式——把每一天的日志归档到一个文件中,以防止日志填满整个磁盘空间 -->
<FileNamePattern>${logback.logdir}/bak/${logback.appname}.info.%d{yyyy-MM-dd}.%i.log
</FileNamePattern>
<!--只保留最近7天的日志 -->
<maxHistory>7</maxHistory>
<!--用来指定日志文件的上限大小,那么到了这个值,就会删除旧的日志 -->
<totalSizeCap>1GB</totalSizeCap>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>%d{YYYY-MM-dd HH:mm:ss.SSS} %-5level [%thread] %logger - %msg%n</pattern>
</encoder>
</appender>
<appender name="fileErrorLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!--如果只是想要 Error 级别的日志,那么需要过滤一下,默认是 info 级别的,ThresholdFilter -->
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>error</level>
</filter>
<!--日志名称,如果没有File 属性,那么只会使用FileNamePattern的文件路径规则 如果同时有<File>和<FileNamePattern>,那么当天日志是<File>,明天会自动把今天
的日志改名为今天的日期。即,<File> 的日志都是当天的。 -->
<File>${logback.logdir}/${logback.appname}.error.log</File>
<!--滚动策略,按照时间滚动 TimeBasedRollingPolicy -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!--文件路径,定义了日志的切分方式——把每一天的日志归档到一个文件中,以防止日志填满整个磁盘空间 -->
<FileNamePattern>${logback.logdir}/bak/${logback.appname}.error.%d{yyyy-MM-dd}.%i.log
</FileNamePattern>
<!--只保留最近7天的日志 -->
<maxHistory>7</maxHistory>
<!--用来指定日志文件的上限大小,那么到了这个值,就会删除旧的日志 -->
<!--<totalSizeCap>1GB</totalSizeCap> -->
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<!--日志输出编码格式化 -->
<encoder>
<charset>UTF-8</charset>
<pattern>%d [%thread] %-5level %logger{36} %line - %msg%n</pattern>
</encoder>
</appender>
<!--1、root节点是必选节点,用来指定最基础的日志输出级别,只有一个level属性。 level:用来设置打印级别,大小写无关:TRACE,
DEBUG, INFO, WARN, ERROR, ALL 和 OFF,不能设置为INHERITED或者同义词NULL。 默认是DEBUG。 可以包含零个或多个元素,标识这个appender将会添加到这个loger。 -->
<root level="INFO">
<appender-ref ref="console" />
<appender-ref ref="file" />
<appender-ref ref="fileErrorLog" />
</root>
</configuration>
\ No newline at end of file
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
<result column="department" property="department" /> <result column="department" property="department" />
<result column="rztime" property="rztime" /> <result column="rztime" property="rztime" />
<result column="orgcode" property="orgcode" /> <result column="orgcode" property="orgcode" />
<result column="turnover_status" property="turnover_status" />
<collection property="balanceTo" ofType="cn.timer.api.dto.kqmk.BalanceSheetDataDto"> <collection property="balanceTo" ofType="cn.timer.api.dto.kqmk.BalanceSheetDataDto">
<result column="leaverulesid" property="leaverulesid"/> <result column="leaverulesid" property="leaverulesid"/>
<result column="balancedays" property="balancedays"/> <result column="balancedays" property="balancedays"/>
...@@ -75,12 +76,12 @@ ...@@ -75,12 +76,12 @@
emp.`name` as empname, emp.`name` as empname,
emp.org_code as orgcode, emp.org_code as orgcode,
IFNULL(c.name,'') as department, IFNULL(c.name,'') as department,
IFNULL(emp.rz_time,'') as rztime IFNULL(emp.rz_time,'') as rztime,
IFNULL((select em.job_status from yggl_main_lzb em where em.emp_num = emp.emp_num and em.org_code = emp.org_code),0) as turnover_status
from yggl_main_emp emp from yggl_main_emp emp
LEFT JOIN zzgl_bmgw_m as gw on gw.id = emp.bmgw_id 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 zzgl_bmgw_m as c ON c.id = gw.up_id
where emp.org_code = #{param.orgCode} where emp.org_code = #{param.orgCode}
and emp.job_status != 3
<if test="param.query != null and param.query != ''"> <if test="param.query != null and param.query != ''">
and ( emp.`name` like CONCAT('%',#{param.query},'%') or and ( emp.`name` like CONCAT('%',#{param.query},'%') or
emp.emp_num like CONCAT('%',#{param.query},'%') or emp.emp_num like CONCAT('%',#{param.query},'%') or
...@@ -89,6 +90,32 @@ ...@@ -89,6 +90,32 @@
<if test="param.deptid != null and param.deptid != ''"> <if test="param.deptid != null and 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}) 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>
<if test="param.turnover_status == 0">
and emp.emp_num not in (select em.emp_num from yggl_main_lzb em where em.org_code = #{param.orgCode} and em.job_status = 3)
</if>
<if test="param.turnover_status == 1">
UNION
SELECT emp.emp_num AS empnum,
emp.`name` AS empname,
emp.org_code AS orgcode,
IFNULL(c. NAME, '') AS department,
IFNULL(emp.rz_time, '') AS rztime,
IFNULL((select em.job_status from yggl_main_lzb em where em.emp_num = emp.emp_num and em.org_code = emp.org_code),0) as turnover_status
FROM yggl_main_lzb 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
WHERE 1=1
<if test="param.query != null and param.query != ''">
and ( emp.`name` like CONCAT('%',#{param.query},'%') or
emp.emp_num like CONCAT('%',#{param.query},'%') or
c.name like CONCAT('%',#{param.query},'%'))
</if>
<if test="param.deptid != null and 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>
and emp.org_code = #{param.orgCode}
AND emp.job_status = 3
</if>
<!--and c.id = #{param.deptid} <!--and c.id = #{param.deptid}
ORDER BY emp.emp_num DESC ORDER BY emp.emp_num DESC
......
...@@ -36,7 +36,17 @@ ...@@ -36,7 +36,17 @@
ordernum, ordernum,
totals totals
</sql> </sql>
<select id="HolidayDetails" resultMap="BaseResultMap">
select su.*
from kqgl_asso_relation_summary su
where su.approval_type = 2
and su.org_code = #{orgcode}
and su.ordernum = 1
and SUBSTR(su.app_time,1,7) = #{apptime}
and su.leave_type_id = (select ru.id from kqgl_asso_leave_rules ru where ru.org_code = #{orgcode} and ru.rules_type = #{rules_type})
and su.user_id = #{userid}
</select>
<select id="SecondaryValue" resultMap="BaseResultMap"> <select id="SecondaryValue" resultMap="BaseResultMap">
select a.user_id, select a.user_id,
...@@ -56,6 +66,7 @@ ...@@ -56,6 +66,7 @@
where res.user_id = #{userid} where res.user_id = #{userid}
and res.approval_type = #{approvaltype} and res.approval_type = #{approvaltype}
and SUBSTR(res.app_time,1,7) = #{apptime} and SUBSTR(res.app_time,1,7) = #{apptime}
and res.org_code = #{orgcode}
</select> </select>
<select id="LeaveInvestigation" resultMap="BaseResultMap"> <select id="LeaveInvestigation" resultMap="BaseResultMap">
......
...@@ -183,7 +183,7 @@ ...@@ -183,7 +183,7 @@
cbry.gjjjl_statime as gjjjlstatime, cbry.gjjjl_statime as gjjjlstatime,
cbry.gjjjljs as gjjjljs cbry.gjjjljs as gjjjljs
from yggl_main_emp emp from yggl_main_emp emp
LEFT JOIN sbgjj_admin_cbry as cbry on cbry.user_num = emp.emp_num and cbry.state = 1 LEFT JOIN sbgjj_admin_cbry as cbry on cbry.user_num = emp.emp_num and cbry.state = 1 and cbry.qyid = #{orgcode}
LEFT JOIN (select m.name as post,um.name as dept,m.id as mid LEFT JOIN (select m.name as post,um.name as dept,m.id as mid
from zzgl_bmgw_m m from zzgl_bmgw_m m
left join zzgl_bmgw_m um on um.id = m.up_id left join zzgl_bmgw_m um on um.id = m.up_id
......
...@@ -17,39 +17,10 @@ ...@@ -17,39 +17,10 @@
<result column="gjjmin" property="gjjmin" /> <result column="gjjmin" property="gjjmin" />
<result column="sbmax" property="sbmax" /> <result column="sbmax" property="sbmax" />
<result column="gjjmax" property="gjjmax" /> <result column="gjjmax" property="gjjmax" />
<result column="is_gjjbl" property="isGjjbl" />
</resultMap> </resultMap>
<sql id="Base_Column_List">
id,
cbmc_name,
cbcs,
sbcbfzmc,
gjjcbfamc,
fwf,
sb_sbgjjid,
gjj_sbgjjid,
qyid,
sbmin,
gjjmin,
sbmax,
gjjmax
</sql>
<sql id="Base_Column_List_Alias">
id SbgjjAssoCbfa_id,
cbmc_name SbgjjAssoCbfa_cbmc_name,
cbcs SbgjjAssoCbfa_cbcs,
sbcbfzmc SbgjjAssoCbfa_sbcbfzmc,
gjjcbfamc SbgjjAssoCbfa_gjjcbfamc,
fwf SbgjjAssoCbfa_fwf,
sb_sbgjjid SbgjjAssoCbfa_sb_sbgjjid,
gjj_sbgjjid SbgjjAssoCbfa_gjj_sbgjjid,
qyid SbgjjAssoCbfa_qyid,
sbmin SbgjjAssoCbfa_sbmin,
gjjmin SbgjjAssoCbfa_gjjmin,
sbmax SbgjjAssoCbfa_sbmax,
gjjmax SbgjjAssoCbfa_gjjmax
</sql>
<insert id="sbgjjassocbfainsert" parameterType="cn.timer.api.bean.sbgjj.SbgjjAssoCbfa" useGeneratedKeys="true" keyProperty="id"> <insert id="sbgjjassocbfainsert" parameterType="cn.timer.api.bean.sbgjj.SbgjjAssoCbfa" useGeneratedKeys="true" keyProperty="id">
...@@ -89,7 +60,10 @@ ...@@ -89,7 +60,10 @@
sbmax, sbmax,
</if> </if>
<if test ='null != gjjmax'> <if test ='null != gjjmax'>
gjjmax gjjmax,
</if>
<if test ='null != isGjjbl'>
is_gjjbl
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
...@@ -127,52 +101,14 @@ ...@@ -127,52 +101,14 @@
#{sbmax}, #{sbmax},
</if> </if>
<if test ='null != gjjmax'> <if test ='null != gjjmax'>
#{gjjmax} #{gjjmax},
</if>
<if test ='null != isGjjbl'>
#{isGjjbl}
</if> </if>
</trim> </trim>
</insert> </insert>
<!-- <delete id="delete" >
DELETE FROM sbgjj_asso_cbfa
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.sbgjj.SbgjjAssoCbfa">
UPDATE sbgjj_asso_cbfa
<set>
<if test ='null != cbmcName'>cbmc_name = #{cbmcName},</if>
<if test ='null != cbcs'>cbcs = #{cbcs},</if>
<if test ='null != sbcbfzmc'>sbcbfzmc = #{sbcbfzmc},</if>
<if test ='null != gjjcbfamc'>gjjcbfamc = #{gjjcbfamc},</if>
<if test ='null != fwf'>fwf = #{fwf},</if>
<if test ='null != sbSbgjjid'>sb_sbgjjid = #{sbSbgjjid},</if>
<if test ='null != gjjSbgjjid'>gjj_sbgjjid = #{gjjSbgjjid},</if>
<if test ='null != qyid'>qyid = #{qyid},</if>
<if test ='null != sbmin'>sbmin = #{sbmin},</if>
<if test ='null != gjjmin'>gjjmin = #{gjjmin},</if>
<if test ='null != sbmax'>sbmax = #{sbmax},</if>
<if test ='null != gjjmax'>gjjmax = #{gjjmax}</if>
</set>
WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM sbgjj_asso_cbfa
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM sbgjj_asso_cbfa
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM sbgjj_asso_cbfa
</select>
-->
</mapper> </mapper>
\ No newline at end of file
...@@ -126,6 +126,10 @@ ...@@ -126,6 +126,10 @@
</foreach> </foreach>
</insert> </insert>
<delete id="deleteBycbfaid" >
DELETE FROM sbgjj_asso_cbfzmx
WHERE cbfaid = #{cbfaid}
</delete>
<!-- <insert id="insert" parameterType="cn.timer.api.bean.sbgjj.SbgjjAssoCbfzmx" useGeneratedKeys="true" keyProperty="id"> <!-- <insert id="insert" parameterType="cn.timer.api.bean.sbgjj.SbgjjAssoCbfzmx" useGeneratedKeys="true" keyProperty="id">
INSERT INTO sbgjj_asso_cbfzmx INSERT INTO sbgjj_asso_cbfzmx
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
......
...@@ -85,6 +85,21 @@ ...@@ -85,6 +85,21 @@
cbryid SbgjjAssoYjzd_cbryid cbryid SbgjjAssoYjzd_cbryid
</sql> </sql>
<select id="IndividualTotalsbgjj" resultMap="BaseResultMap">
select * from sbgjj_asso_yjzd yj
where yj.cbryid = (
select cb.id from sbgjj_admin_cbry cb
where cb.user_num = #{usernum}
and cb.qyid = #{qyid}
and cb.id in (select yj.cbryid from sbgjj_asso_yjzd yj
where yj.zymonth = #{zymonth}
and yj.user_num = #{usernum})
and cb.state = 1
and cb.is_use = 1
)
and yj.qyid = #{qyid}
</select>
<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,
......
...@@ -16,6 +16,10 @@ ...@@ -16,6 +16,10 @@
<result column="qyid" property="qyid" /> <result column="qyid" property="qyid" />
<result column="pxfs" property="pxfs" /> <result column="pxfs" property="pxfs" />
<result column="monthtime" property="monthtime" /> <result column="monthtime" property="monthtime" />
<result column="xzyf" property="xzyf" />
<result column="is_xzgz" property="isXzgz" />
<result column="is_xzsd" property="isXzsd" />
</resultMap> </resultMap>
<resultMap id="PayrollExceptionDtoMap" type="cn.timer.api.dto.xcgl.PayrollExceptionDto" > <resultMap id="PayrollExceptionDtoMap" type="cn.timer.api.dto.xcgl.PayrollExceptionDto" >
......
<?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.xcgl.XcglAssoBszqszMapper">
<resultMap id="BaseResultMap" type="cn.timer.api.bean.xcgl.XcglAssoBszqsz" >
<id column="id" property="id" />
<result column="tax_return_cycle" property="taxReturnCycle" />
<result column="qyid" property="qyid" />
</resultMap>
<sql id="Base_Column_List">
id,
tax_return_cycle,
qyid
</sql>
<sql id="Base_Column_List_Alias">
id XcglAssoBszqsz_id,
tax_return_cycle XcglAssoBszqsz_tax_return_cycle,
qyid XcglAssoBszqsz_qyid
</sql>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.xcgl.XcglAssoBszqsz">
INSERT INTO xcgl_asso_bszqsz
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != taxReturnCycle'>
tax_return_cycle,
</if>
<if test ='null != qyid'>
qyid
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != taxReturnCycle'>
#{taxReturnCycle},
</if>
<if test ='null != qyid'>
#{qyid}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM xcgl_asso_bszqsz
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.xcgl.XcglAssoBszqsz">
UPDATE xcgl_asso_bszqsz
<set>
<if test ='null != taxReturnCycle'>tax_return_cycle = #{taxReturnCycle},</if>
<if test ='null != qyid'>qyid = #{qyid}</if>
</set>
WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM xcgl_asso_bszqsz
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM xcgl_asso_bszqsz
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM xcgl_asso_bszqsz
</select>
-->
</mapper>
\ No newline at end of file
<?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.xcgl.XcglAssoGsjsmxMapper">
<resultMap id="BaseResultMap" type="cn.timer.api.bean.xcgl.XcglAssoGsjsmx" >
<result column="Id" property="id" />
<result column="user_num" property="userNum" />
<result column="user_name" property="userName" />
<result column="salary_month" property="salaryMonth" />
<result column="tax_month" property="taxMonth" />
<result column="thmonth_personal" property="thmonthPersonal" />
<result column="cum_zljy" property="cumZljy" />
<result column="cum_zfdklx" property="cumZfdklx" />
<result column="cum_zfzj" property="cumZfzj" />
<result column="cum_sylr" property="cumSylr" />
<result column="cum_jxjy" property="cumJxjy" />
<result column="cum_zxfjkc" property="cumZxfjkc" />
<result column="tax_type" property="taxType" />
<result column="current_income" property="currentIncome" />
<result column="current_special_deduction" property="currentSpecialDeduction" />
<result column="cum_sre" property="cumSre" />
<result column="cum_jcfy" property="cumJcfy" />
<result column="cum_zxkc" property="cumZxkc" />
<result column="cum_qtkc" property="cumQtkc" />
<result column="cum_ynssde" property="cumYnssde" />
<result column="tax_rate" property="taxRate" />
<result column="quick_calculation_deduction" property="quickCalculationDeduction" />
<result column="cum_ynse" property="cumYnse" />
<result column="cum_yyjse" property="cumYyjse" />
<result column="cum_ybtse" property="cumYbtse" />
<result column="qyid" property="qyid" />
</resultMap>
<resultMap id="BaseXcglAssoGsjsmxDto" type="cn.timer.api.dto.xcgl.XcglAssoGsjsmxDto" >
<result column="phone" property="phone" />
<result column="user_num" property="userNum" />
<result column="user_name" property="userName" />
<result column="salary_month" property="salaryMonth" />
<result column="tax_month" property="taxMonth" />
<result column="thmonth_personal" property="thmonthPersonal" />
<result column="cum_zljy" property="cumZljy" />
<result column="cum_zfdklx" property="cumZfdklx" />
<result column="cum_zfzj" property="cumZfzj" />
<result column="cum_sylr" property="cumSylr" />
<result column="cum_jxjy" property="cumJxjy" />
<result column="cum_zxfjkc" property="cumZxfjkc" />
<result column="tax_type" property="taxType" />
<result column="current_income" property="currentIncome" />
<result column="current_special_deduction" property="currentSpecialDeduction" />
<result column="cum_sre" property="cumSre" />
<result column="cum_jcfy" property="cumJcfy" />
<result column="cum_zxkc" property="cumZxkc" />
<result column="cum_qtkc" property="cumQtkc" />
<result column="cum_ynssde" property="cumYnssde" />
<result column="tax_rate" property="taxRate" />
<result column="quick_calculation_deduction" property="quickCalculationDeduction" />
<result column="cum_ynse" property="cumYnse" />
<result column="cum_yyjse" property="cumYyjse" />
<result column="cum_ybtse" property="cumYbtse" />
<result column="qyid" property="qyid" />
</resultMap>
<select id="SelectIndividualincomedetails" resultMap="BaseXcglAssoGsjsmxDto">
select em.phone,
gs.*
from xcgl_asso_gsjsmx gs
LEFT JOIN yggl_main_emp as em on em.emp_num = gs.user_num and em.org_code = #{param.orgcode}
where gs.qyid = #{param.orgcode}
<if test="param.datetime != ''" >
and gs.salary_month = #{param.datetime}
</if>
<if test="param.status != ''" >
and em.job_status = #{param.status}
</if>
<if test="param.text != ''" >
and (em.`name` like CONCAT('%',#{param.text},'%') or em.emp_num = #{param.text})
</if>
</select>
<select id="Allyearround" resultMap="BaseResultMap">
select * from xcgl_asso_gsjsmx gs
where 1=1
and SUBSTR(gs.salary_month,1,4) = #{year}
and gs.user_num = #{usernum}
and gs.qyid = #{qyid}
</select>
</mapper>
\ No newline at end of file
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
<result column="yhqm" property="yhqm" /> <result column="yhqm" property="yhqm" />
<result column="qyid" property="qyid" /> <result column="qyid" property="qyid" />
<result column="gztszid" property="gztszid" /> <result column="gztszid" property="gztszid" />
<result column="sfgz" property="sfgz" />
<result column="xzzid" property="xzzid" />
</resultMap> </resultMap>
<resultMap id="PayslipDetailsMap" type="cn.timer.api.dto.xcgl.PayslipDetailsDto" > <resultMap id="PayslipDetailsMap" type="cn.timer.api.dto.xcgl.PayslipDetailsDto" >
...@@ -23,6 +25,7 @@ ...@@ -23,6 +25,7 @@
<result column="fstype" property="fstype" /> <result column="fstype" property="fstype" />
<result column="cktype" property="cktype" /> <result column="cktype" property="cktype" />
<result column="qrtype" property="qrtype" /> <result column="qrtype" property="qrtype" />
<result column="sfgz" property="sfgz" />
<result column="dept" property="dept" /> <result column="dept" property="dept" />
<result column="post" property="post" /> <result column="post" property="post" />
</resultMap> </resultMap>
...@@ -37,7 +40,8 @@ ...@@ -37,7 +40,8 @@
fkyj, fkyj,
yhqm, yhqm,
qyid, qyid,
gztszid gztszid,
sfgz
</sql> </sql>
<sql id="Base_Column_List_Alias"> <sql id="Base_Column_List_Alias">
...@@ -47,13 +51,14 @@ ...@@ -47,13 +51,14 @@
fs_type XcglAssoGztzt_fs_type, fs_type XcglAssoGztzt_fs_type,
ck_type XcglAssoGztzt_ck_type, ck_type XcglAssoGztzt_ck_type,
qr_type XcglAssoGztzt_qr_type, qr_type XcglAssoGztzt_qr_type,
sfgz XcglAssoGztzt_sfgz,
fkyj XcglAssoGztzt_fkyj, fkyj XcglAssoGztzt_fkyj,
yhqm XcglAssoGztzt_yhqm, yhqm XcglAssoGztzt_yhqm,
qyid XcglAssoGztzt_qyid, qyid XcglAssoGztzt_qyid,
gztszid XcglAssoGztzt_gztszid gztszid XcglAssoGztzt_gztszid
</sql> </sql>
<select id="PayslipDetails" resultMap="PayslipDetailsMap"> <select id="payslipSearch" resultMap="PayslipDetailsMap">
select emp.`name` as empname, select emp.`name` as empname,
case emp.job_status case emp.job_status
when 0 then '试用' when 0 then '试用'
...@@ -64,16 +69,26 @@ ...@@ -64,16 +69,26 @@
gztzt.ck_type as cktype, gztzt.ck_type as cktype,
gztzt.qr_type as qrtype, gztzt.qr_type as qrtype,
gztzt.id, gztzt.id,
gztzt.sfgz,
bmgw.dept, bmgw.dept,
bmgw.post bmgw.post
from xcgl_asso_gztzt gztzt from xcgl_asso_gztzt gztzt
LEFT JOIN yggl_main_emp as emp on emp.emp_num = gztzt.userid and emp.org_code = #{qyid} LEFT JOIN yggl_main_emp as emp on emp.emp_num = gztzt.userid and emp.org_code = #{orgcode}
LEFT JOIN (select m.name as post,um.name as dept,m.id as mid LEFT JOIN (select m.name as post,um.name as dept,m.id as mid
from zzgl_bmgw_m m from zzgl_bmgw_m m
left join zzgl_bmgw_m um on um.id = m.up_id left join zzgl_bmgw_m um on um.id = m.up_id
) as bmgw on bmgw.mid = emp.bmgw_id ) as bmgw on bmgw.mid = emp.bmgw_id
where gztzt.gztszid = #{gztszid} <if test="xzzid != null">
and gztzt.qyid = #{qyid} LEFT JOIN xcgl_asso_xzury xzury ON xzury.userid = emp.id and xzury.xzzid = #{xzzid}
</if>
where gztzt.qyid = #{orgcode}
<if test="gztszid != null"> and gztzt.gztszid = #{gztszid} </if>
<if test="fsType != null"> and gztzt.fs_type = #{fsType} </if>
<if test="qrType != null"> and gztzt.qr_type = #{qrType} </if>
<if test="xzzid != null"> and xzury.xzzid = #{xzzid} </if>
<if test="text != null and text != ''" >
and (emp.`name` like CONCAT('%',#{text},'%') or emp.emp_num = #{text})
</if>
</select> </select>
<delete id="deletexcglassogztzt" > <delete id="deletexcglassogztzt" >
...@@ -89,7 +104,7 @@ ...@@ -89,7 +104,7 @@
</delete> </delete>
<insert id="insertxcglassogztztList" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id" > <insert id="insertxcglassogztztList" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id" >
insert into xcgl_asso_gztzt (userid,xzyf,fs_type,ck_type,qr_type,fkyj,yhqm,qyid,gztszid) insert into xcgl_asso_gztzt (userid,xzyf,fs_type,ck_type,qr_type,fkyj,yhqm,qyid,gztszid,sfgz)
<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" >
...@@ -113,6 +128,9 @@ ...@@ -113,6 +128,9 @@
<if test="item.yhqm != null" > <if test="item.yhqm != null" >
#{item.yhqm,jdbcType=VARCHAR}, #{item.yhqm,jdbcType=VARCHAR},
</if> </if>
<if test="item.sfgz != null" >
#{item.sfgz,jdbcType=DOUBLE},
</if>
<if test="item.qyid != null" > <if test="item.qyid != null" >
#{item.qyid,jdbcType=INTEGER}, #{item.qyid,jdbcType=INTEGER},
</if> </if>
...@@ -123,107 +141,19 @@ ...@@ -123,107 +141,19 @@
</foreach> </foreach>
</insert> </insert>
<!-- 发送工资条 操作 -->
<update id="payslipSend" parameterType="java.lang.Integer">
UPDATE xcgl_asso_gztzt SET fs_type = #{fsType}
WHERE id = #{id}
</update>
<!-- <insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.xcgl.XcglAssoGztzt"> <!-- 发送工资条 批量发送 -->
INSERT INTO xcgl_asso_gztzt <update id="payslipSendBatch">
<trim prefix="(" suffix=")" suffixOverrides=","> UPDATE xcgl_asso_gztzt SET fs_type = 1
<if test ='null != userid'> WHERE fs_type in (0, 2)
userid, AND id in
</if> <foreach collection="ids" index="index" item="item" open="(" separator="," close=")">
<if test ='null != xzyf'> #{item}
xzyf, </foreach>
</if> </update>
<if test ='null != fsType'>
fs_type,
</if>
<if test ='null != ckType'>
ck_type,
</if>
<if test ='null != qrType'>
qr_type,
</if>
<if test ='null != fkyj'>
fkyj,
</if>
<if test ='null != yhqm'>
yhqm,
</if>
<if test ='null != qyid'>
qyid,
</if>
<if test ='null != gztszid'>
gztszid
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != userid'>
#{userid},
</if>
<if test ='null != xzyf'>
#{xzyf},
</if>
<if test ='null != fsType'>
#{fsType},
</if>
<if test ='null != ckType'>
#{ckType},
</if>
<if test ='null != qrType'>
#{qrType},
</if>
<if test ='null != fkyj'>
#{fkyj},
</if>
<if test ='null != yhqm'>
#{yhqm},
</if>
<if test ='null != qyid'>
#{qyid},
</if>
<if test ='null != gztszid'>
#{gztszid}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM xcgl_asso_gztzt
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.xcgl.XcglAssoGztzt">
UPDATE xcgl_asso_gztzt
<set>
<if test ='null != userid'>userid = #{userid},</if>
<if test ='null != xzyf'>xzyf = #{xzyf},</if>
<if test ='null != fsType'>fs_type = #{fsType},</if>
<if test ='null != ckType'>ck_type = #{ckType},</if>
<if test ='null != qrType'>qr_type = #{qrType},</if>
<if test ='null != fkyj'>fkyj = #{fkyj},</if>
<if test ='null != yhqm'>yhqm = #{yhqm},</if>
<if test ='null != qyid'>qyid = #{qyid},</if>
<if test ='null != qyid'>gztszid = #{gztszid}</if>
</set>
WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM xcgl_asso_gztzt
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM xcgl_asso_gztzt
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM xcgl_asso_gztzt
</select>
-->
</mapper> </mapper>
\ No newline at end of file
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
<result column="xzzid" property="xzzid" /> <result column="xzzid" property="xzzid" />
<result column="rulestate" property="rulestate" /> <result column="rulestate" property="rulestate" />
<result column="optionid" property="optionid" /> <result column="optionid" property="optionid" />
<result column="is_custom" property="isCustom" />
</resultMap> </resultMap>
...@@ -30,7 +31,11 @@ ...@@ -30,7 +31,11 @@
<result column="xremarks" property="xremarks"/> <result column="xremarks" property="xremarks"/>
<result column="xgsid" property="xgsid"/> <result column="xgsid" property="xgsid"/>
<result column="xgsgs" property="xgsgs"/> <result column="xgsgs" property="xgsgs"/>
<result column="xdygk" property="xdygk"/>
<result column="xdegk" property="xdegk"/>
<result column="xjxgzid" property="xjxgzid"/> <result column="xjxgzid" property="xjxgzid"/>
<result column="xiscustom" property="xiscustom"/>
<result column="xrulestate" property="xrulestate"/>
</resultMap> </resultMap>
...@@ -39,40 +44,13 @@ ...@@ -39,40 +44,13 @@
<result column="salaryitem" property="salaryitem"/> <result column="salaryitem" property="salaryitem"/>
<result column="rsz" property="rsz"/> <result column="rsz" property="rsz"/>
</resultMap> </resultMap>
<sql id="Base_Column_List">
id,
salaryitem,
yhmbzd,
rule,
type,
addtime,
adduserid,
jxgzid,
remarks,
gsid,
gsgs,
xzzid,
rulestate,
optionid
</sql>
<sql id="Base_Column_List_Alias"> <select id="SalaryRuleGroupItem" resultMap="BaseResultMap">
id XcglAssoJsgzzx_id, select * from xcgl_asso_jsgzzx js
salaryitem XcglAssoJsgzzx_salaryitem, where js.xzzid = #{xzzid}
yhmbzd XcglAssoJsgzzx_yhmbzd, ORDER BY js.rulestate = 2 or js.rulestate = 3 ASC,
rule XcglAssoJsgzzx_rule, js.id ASC
type XcglAssoJsgzzx_type, </select>
addtime XcglAssoJsgzzx_addtime,
adduserid XcglAssoJsgzzx_adduserid,
jxgzid XcglAssoJsgzzx_jxgzid,
remarks XcglAssoJsgzzx_remarks,
gsid XcglAssoJsgzzx_gsid,
gsgs XcglAssoJsgzzx_gsgs,
xzzid XcglAssoJsgzzx_xzzid,
rulestate XcglAssoJsgzzx_rulestate,
optionid XcglAssoJsgzzx_optionid
</sql>
<select id="selectSalarySectionList" resultMap="BaseResultMap"> <select id="selectSalarySectionList" resultMap="BaseResultMap">
select jsgzzx.* from xcgl_asso_jsgzzx jsgzzx select jsgzzx.* from xcgl_asso_jsgzzx jsgzzx
...@@ -91,7 +69,11 @@ ...@@ -91,7 +69,11 @@
gzzx.jxgzid as xjxgzid, gzzx.jxgzid as xjxgzid,
gzzx.remarks as xremarks, gzzx.remarks as xremarks,
gzzx.gsid as xgsid, gzzx.gsid as xgsid,
gzzx.gsgs as xgsgs gzzx.gsgs as xgsgs,
gzzx.dygk as xdygk,
gzzx.degk as xdegk,
gzzx.is_custom as xiscustom,
gzzx.rulestate as xrulestate
from xcgl_asso_jsgzzx gzzx from xcgl_asso_jsgzzx gzzx
where gzzx.jxgzid = 0 where gzzx.jxgzid = 0
and gzzx.xzzid = #{xzzid} and gzzx.xzzid = #{xzzid}
...@@ -116,7 +98,7 @@ ...@@ -116,7 +98,7 @@
</delete> </delete>
<insert id="insertxcglassojsgzzxList" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id" > <insert id="insertxcglassojsgzzxList" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id" >
insert into xcgl_asso_jsgzzx (salaryitem,yhmbzd,rule,type,addtime,adduserid,jxgzid,remarks,gsid,gsgs,xzzid,rulestate,optionid) insert into xcgl_asso_jsgzzx (salaryitem,yhmbzd,rule,type,addtime,adduserid,jxgzid,remarks,gsid,gsgs,dygk,degk,xzzid,rulestate,optionid)
<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.salaryitem != null" > <if test="item.salaryitem != null" >
...@@ -149,6 +131,14 @@ ...@@ -149,6 +131,14 @@
<if test="item.gsgs != null" > <if test="item.gsgs != null" >
#{item.gsgs,jdbcType=VARCHAR}, #{item.gsgs,jdbcType=VARCHAR},
</if> </if>
<if test="item.dygk != null" >
#{item.dygk,jdbcType=DOUBLE},
</if>
<if test="item.degk != null" >
#{item.degk,jdbcType=DOUBLE},
</if>
<if test="item.xzzid != null" > <if test="item.xzzid != null" >
#{item.xzzid,jdbcType=INTEGER}, #{item.xzzid,jdbcType=INTEGER},
</if> </if>
...@@ -203,7 +193,10 @@ ...@@ -203,7 +193,10 @@
rulestate, rulestate,
</if> </if>
<if test ='null != optionid'> <if test ='null != optionid'>
optionid optionid,
</if>
<if test ='null != isCustom'>
is_custom
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
...@@ -244,7 +237,10 @@ ...@@ -244,7 +237,10 @@
#{rulestate}, #{rulestate},
</if> </if>
<if test ='null != optionid'> <if test ='null != optionid'>
#{optionid} #{optionid},
</if>
<if test ='null != isCustom'>
#{isCustom}
</if> </if>
</trim> </trim>
</insert> </insert>
...@@ -264,32 +260,12 @@ ...@@ -264,32 +260,12 @@
<if test ='null != gsgs'>gsgs = #{gsgs},</if> <if test ='null != gsgs'>gsgs = #{gsgs},</if>
<if test ='null != xzzid'>xzzid = #{xzzid},</if> <if test ='null != xzzid'>xzzid = #{xzzid},</if>
<if test ='null != rulestate'>rulestate = #{rulestate},</if> <if test ='null != rulestate'>rulestate = #{rulestate},</if>
<if test ='null != optionid'>optionid = #{optionid}</if> <if test ='null != optionid'>optionid = #{optionid},</if>
<if test ='null != optionid'>is_custom = #{isCustom}</if>
</set> </set>
WHERE id = #{id} WHERE id = #{id}
</update> </update>
<!-- <delete id="delete" >
DELETE FROM xcgl_asso_jsgzzx
WHERE id = #{id}
</delete>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM xcgl_asso_jsgzzx
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM xcgl_asso_jsgzzx
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM xcgl_asso_jsgzzx
</select> -->
</mapper> </mapper>
\ No newline at end of file
...@@ -29,7 +29,12 @@ ...@@ -29,7 +29,12 @@
<result column="xremarks" property="xremarks"/> <result column="xremarks" property="xremarks"/>
<result column="xgsid" property="xgsid"/> <result column="xgsid" property="xgsid"/>
<result column="xgsgs" property="xgsgs"/> <result column="xgsgs" property="xgsgs"/>
<result column="xdygk" property="xdygk"/>
<result column="xdegk" property="xdegk"/>
<result column="xjxgzid" property="xjxgzid"/> <result column="xjxgzid" property="xjxgzid"/>
<result column="xoptionid" property="xoptionid"/>
<result column="xiscustom" property="xiscustom"/>
<result column="xrulestate" property="xrulestate"/>
</collection> </collection>
</resultMap> </resultMap>
...@@ -179,8 +184,13 @@ ...@@ -179,8 +184,13 @@
gzzx.remarks as xremarks, gzzx.remarks as xremarks,
gzzx.gsid as xgsid, gzzx.gsid as xgsid,
gzzx.gsgs as xgsgs, gzzx.gsgs as xgsgs,
gzzx.dygk as xdygk,
gzzx.degk as xdegk,
gzzx.jxgzid as xjxgzid, gzzx.jxgzid as xjxgzid,
jxgz.xzzid as zxzzid gzzx.optionid as xoptionid,
jxgz.xzzid as zxzzid,
gzzx.is_custom as xiscustom,
gzzx.rulestate as xrulestate
from xcgl_asso_jxgz jxgz from xcgl_asso_jxgz jxgz
LEFT JOIN xcgl_asso_jsgzzx as gzzx on gzzx.jxgzid = jxgz.id LEFT JOIN xcgl_asso_jsgzzx as gzzx on gzzx.jxgzid = jxgz.id
where jxgz.xzzid = #{xzzid} where jxgz.xzzid = #{xzzid}
......
<?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.xcgl.XcglAssoTaxFormulaMapper">
<resultMap id="BaseResultMap" type="cn.timer.api.bean.xcgl.XcglAssoTaxFormula" >
<id column="id" property="id" />
<result column="taxablestart" property="taxablestart" />
<result column="taxableend" property="taxableend" />
<result column="taxrate" property="taxrate" />
<result column="deductions" property="deductions" />
<result column="qyid" property="qyid" />
</resultMap>
<sql id="Base_Column_List">
id,
taxablestart,
taxableend,
taxrate,
deductions,
qyid
</sql>
<sql id="Base_Column_List_Alias">
id XcglAssoTaxFormula_id,
taxablestart XcglAssoTaxFormula_taxablestart,
taxableend XcglAssoTaxFormula_taxableend,
taxrate XcglAssoTaxFormula_taxrate,
deductions XcglAssoTaxFormula_deductions,
qyid XcglAssoTaxFormula_qyid
</sql>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.xcgl.XcglAssoTaxFormula">
INSERT INTO xcgl_asso_tax_formula
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != taxablestart'>
taxablestart,
</if>
<if test ='null != taxableend'>
taxableend,
</if>
<if test ='null != taxrate'>
taxrate,
</if>
<if test ='null != deductions'>
deductions,
</if>
<if test ='null != qyid'>
qyid
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != taxablestart'>
#{taxablestart},
</if>
<if test ='null != taxableend'>
#{taxableend},
</if>
<if test ='null != taxrate'>
#{taxrate},
</if>
<if test ='null != deductions'>
#{deductions},
</if>
<if test ='null != qyid'>
#{qyid}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM xcgl_asso_tax_formula
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.xcgl.XcglAssoTaxFormula">
UPDATE xcgl_asso_tax_formula
<set>
<if test ='null != taxablestart'>taxablestart = #{taxablestart},</if>
<if test ='null != taxableend'>taxableend = #{taxableend},</if>
<if test ='null != taxrate'>taxrate = #{taxrate},</if>
<if test ='null != deductions'>deductions = #{deductions},</if>
<if test ='null != qyid'>qyid = #{qyid}</if>
</set>
WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM xcgl_asso_tax_formula
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM xcgl_asso_tax_formula
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM xcgl_asso_tax_formula
</select>
-->
</mapper>
\ No newline at end of file
...@@ -10,6 +10,12 @@ ...@@ -10,6 +10,12 @@
<result column="dygk" property="dygk" /> <result column="dygk" property="dygk" />
<result column="degk" property="degk" /> <result column="degk" property="degk" />
<result column="type" property="type" /> <result column="type" property="type" />
<result column="optionid" property="optionid" />
<result column="dygk_text" property="dygkText" />
<result column="degk_text" property="degkText" />
<result column="rulestate" property="rulestate" />
<result column="defaulttype" property="defaulttype" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
...@@ -33,7 +39,7 @@ ...@@ -33,7 +39,7 @@
<select id="QuerySalaryRules" resultMap="BaseResultMap"> <select id="QuerySalaryRules" resultMap="BaseResultMap">
select * from xcgl_asso_xcjsgz jsgz select * from xcgl_asso_xcjsgz jsgz
where jsgz.formulaname = #{formulaname} where jsgz.formulaname = #{formulaname}
ORDER BY jsgz.id ASC LIMIT 1 and jsgz.defaulttype = 1
</select> </select>
<!-- <!--
......
...@@ -34,6 +34,19 @@ ...@@ -34,6 +34,19 @@
<result column="xzxid" property="xzxid"/> <result column="xzxid" property="xzxid"/>
<result column="xzxjg" property="xzxjg"/> <result column="xzxjg" property="xzxjg"/>
</resultMap> </resultMap>
<resultMap id="UserPersonnelDtoMap" type="cn.timer.api.dto.xcgl.UserPersonnelDto" >
<result column="orgcode" property="orgcode" />
<result column="empnum" property="empnum" />
<result column="empname" property="empname" />
<result column="dept" property="dept" />
<result column="post" property="post" />
</resultMap>
<resultMap id="HolidayInquiryDtoMap" type="cn.timer.api.dto.xcgl.HolidayInquiryDto" >
<result column="num" property="num" />
<result column="balance" property="balance" />
</resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, id,
...@@ -52,6 +65,75 @@ ...@@ -52,6 +65,75 @@
xzxjg XcglAssoXzb_xzxjg, xzxjg XcglAssoXzb_xzxjg,
qyid XcglAssoXzb_qyid qyid XcglAssoXzb_qyid
</sql> </sql>
<select id="PayInColumn" resultMap="BaseResultMap">
select * from xcgl_asso_xzb zx
where zx.xzxid = (select gg.id from xcgl_asso_jsgzzx gg
where gg.optionid = 70
and gg.xzzid = (select jsg.xzzid from xcgl_asso_jsgzzx jsg
where jsg.id = #{xzxid})
)
and zx.userid = #{userid}
and zx.xzyf = #{xzyf}
</select>
<select id="UserPersonnel" resultMap="UserPersonnelDtoMap">
select aa.orgcode,aa.empnum,aa.empname,aa.dept,aa.post
from (select emp.org_code as orgcode,
emp.emp_num as empnum,
emp.`name` as empname,
bmgw.dept,
bmgw.post
from yggl_main_emp emp
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 emp.emp_num in (select xzury.userid from xcgl_asso_xzury xzury where xzury.xzzid = #{xzzid})
) as aa
where aa.orgcode = #{orgcode}
</select>
<select id="HolidayamountNum" resultMap="HolidayInquiryDtoMap">
select COUNT(*) as num
from kqgl_asso_relation_summary su
where su.approval_type = 2
and su.org_code = #{orgcode}
and su.ordernum = 1
and SUBSTR(su.app_time,1,7) = #{apptime}
and su.leave_type_id = (select ru.id from kqgl_asso_leave_rules ru where ru.org_code = #{orgcode} and ru.rules_type = #{rules_type})
and su.user_id = #{userid}
</select>
<select id="Holidayamount" resultMap="HolidayInquiryDtoMap">
select IFNULL(SUM(su.duration),0) as balance
from kqgl_asso_relation_summary su
where su.approval_type = 2
and su.org_code = #{orgcode}
and su.ordernum = 1
and SUBSTR(su.app_time,1,7) = #{apptime}
and su.leave_type_id = (select ru.id from kqgl_asso_leave_rules ru where ru.org_code = #{orgcode} and ru.rules_type = #{rules_type})
and su.user_id = #{userid}
</select>
<select id="NumberOvertime" resultMap="HolidayInquiryDtoMap">
select COUNT(*) as num
from kqgl_asso_relation_summary su
where su.approval_type = 5
and su.org_code = #{orgcode}
and SUBSTR(su.app_time,1,7) = #{apptime}
and su.user_id = #{userid}
</select>
<select id="PeriodsOvertime" resultMap="HolidayInquiryDtoMap">
select IFNULL(SUM(su.duration),0) as balance
from kqgl_asso_relation_summary su
where su.approval_type = 1
and su.org_code = #{orgcode}
and SUBSTR(su.app_time,1,7) = #{apptime}
and su.overtime_type_id = #{overtimetypeid}
and su.user_id = #{userid}
</select>
<select id="CalculationResults" resultMap="CalculationDtoMap"> <select id="CalculationResults" resultMap="CalculationDtoMap">
select aa.orgcode,aa.empid,aa.empnum,aa.empname,aa.xzbid,aa.xzyf, select aa.orgcode,aa.empid,aa.empnum,aa.empname,aa.xzbid,aa.xzyf,
...@@ -73,9 +155,10 @@ ...@@ -73,9 +155,10 @@
from zzgl_bmgw_m m from zzgl_bmgw_m m
left join zzgl_bmgw_m um on um.id = m.up_id left join zzgl_bmgw_m um on um.id = m.up_id
) as bmgw on bmgw.mid = emp.bmgw_id ) as bmgw on bmgw.mid = emp.bmgw_id
where emp.emp_num in (select xzury.userid from xcgl_asso_xzury xzury where xzury.xzzid = #{xzzid}) where emp.emp_num in (select xzury.userid from xcgl_asso_xzury xzury where xzury.xzzid = #{paygroupid})
and xzbs.xzyf = #{xzyf} or xzbs.xzyf = '' <if test="text != null and text != ''" >
and emp.emp_num in (select xzury.userid from xcgl_asso_xzury xzury where xzury.xzzid = #{xzzid}) and (emp.`name` like CONCAT('%',#{text},'%') or emp.emp_num = #{text})
</if>
) as aa ) as aa
where aa.orgcode = #{orgcode} where aa.orgcode = #{orgcode}
</select> </select>
...@@ -119,14 +202,15 @@ ...@@ -119,14 +202,15 @@
<delete id="deleteByuserid" > <delete id="deleteByuserid" >
<!-- DELETE FROM xcgl_asso_xzb <!-- DELETE FROM xcgl_asso_xzb
WHERE userid = #{userid} -->
DELETE FROM xcgl_asso_xzb
WHERE userid = #{userid} WHERE userid = #{userid}
and xzxid not in(select jsgzzx.id from xcgl_asso_jsgzzx jsgzzx and xzxid not in(select jsgzzx.id from xcgl_asso_jsgzzx jsgzzx
LEFT JOIN xcgl_asso_option as opt on opt.id = jsgzzx.optionid LEFT JOIN xcgl_asso_option as opt on opt.id = jsgzzx.optionid
where opt.itemid = 2 where opt.itemid = 2
and jsgzzx.xzzid = #{xzzid}) and jsgzzx.xzzid = #{xzzid})
and xzyf = #{xzyf} -->
DELETE FROM xcgl_asso_xzb
WHERE userid = #{userid}
and xzyf = #{xzyf} and xzyf = #{xzyf}
</delete> </delete>
...@@ -192,6 +276,17 @@ ...@@ -192,6 +276,17 @@
and xzyf = #{xzyf} and xzyf = #{xzyf}
and xzxid = #{xzxid} and xzxid = #{xzxid}
</update> </update>
<!-- 批量更新薪资结果 -->
<update id="updateBatchXzxjg" parameterType="java.util.List">
<foreach collection="list" item="item" index="index" open="" close="" separator=";">
UPDATE xcgl_asso_xzb
<set>
xzxjg=${item.xzxjg}
</set>
where id = ${item.id}
</foreach>
</update>
<!-- <delete id="delete" > <!-- <delete id="delete" >
DELETE FROM xcgl_asso_xzb DELETE FROM xcgl_asso_xzb
......
...@@ -62,12 +62,9 @@ ...@@ -62,12 +62,9 @@
<select id="selectxcglassoxzdazdy" resultMap="BaseResultMap"> <select id="selectxcglassoxzdazdy" resultMap="BaseResultMap">
select * from xcgl_asso_xzdazdy xzzdy select * from xcgl_asso_xzdazdy xzzdy
where xzzdy.qyid = #{qyid} where xzzdy.qyid = #{qyid}
and xzzdy.zdmc = '基本工资' and xzzdy.zdmc in ('底薪','岗位津贴')
or xzzdy.zdmc = '绩效工资'
or xzzdy.zdmc = '岗位津贴'
or xzzdy.zdmc = '加班工资'
</select> </select>
<select id="SalaryFixedWages" resultMap="BaseResultMap"> <select id="SalaryFixedWages" resultMap="BaseResultMap">
...@@ -200,10 +197,47 @@ ...@@ -200,10 +197,47 @@
from yggl_main_emp emp from yggl_main_emp emp
LEFT JOIN xcgl_asso_xzdadx as dadx on dadx.userid = emp.emp_num and dadx.txzt = 0 LEFT JOIN xcgl_asso_xzdadx as dadx on dadx.userid = emp.emp_num and dadx.txzt = 0
LEFT JOIN xcgl_asso_xzdaz as xzdaz on xzdaz.xzdadxid = dadx.id LEFT JOIN xcgl_asso_xzdaz as xzdaz on xzdaz.xzdadxid = dadx.id
where emp.org_code = #{orgcode} where emp.org_code = #{param.orgcode}
<if test="status != ''" > <if test="param.status != ''" >
and emp.job_status = #{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> </if>
</select>
<select id="selectPaygroupStaff" resultMap="FixedSalaryStaffMap">
select emp.emp_num empnum,
emp.`name` empname,
case emp.job_type
when 0 then '全职'
when 1 then '实习生'
when 2 then '兼职'
when 3 then '劳务派遣'
when 4 then '劳务'
when 5 then '派遣'
when 6 then '外包'
else '退休返聘' end as empjobtype,
case emp.job_status
when 0 then '试用'
when 1 then '正式'
when 2 then '离职中'
else '已离职' end as empjobstatus,
SUBSTR(emp.rz_time,1,10) emprztime ,
SUBSTR(emp.zz_time,1,10) empzztime,
IF(dadx.userid IS NOT NULL,1,0) as sfdx,
dadx.sxrq as tratime,
xzdaz.id as dazid,
xzdaz.xzdazdyid as xzdazdyid,
xzdaz.rsz as dazrsz,
xzdaz.xzdadxid as xzdadxid
from yggl_main_emp emp
LEFT JOIN xcgl_asso_xzdadx as dadx on dadx.userid = emp.emp_num and dadx.txzt = 0
LEFT JOIN xcgl_asso_xzdaz as xzdaz on xzdaz.xzdadxid = dadx.id
LEFT JOIN xcgl_asso_xzury as xz on xz.userid = emp.emp_num and xz.qyid = emp.org_code
where emp.org_code = #{orgcode}
and xz.xzzid = #{paygroupid}
<if test="text != ''" > <if test="text != ''" >
and (emp.`name` like CONCAT('%',#{text},'%') or emp.emp_num = #{text}) and (emp.`name` like CONCAT('%',#{text},'%') or emp.emp_num = #{text})
</if> </if>
...@@ -258,6 +292,7 @@ ...@@ -258,6 +292,7 @@
LEFT JOIN xcgl_asso_xzdaz as xzdaz on xzdaz.xzdadxid = dadx.id LEFT JOIN xcgl_asso_xzdaz as xzdaz on xzdaz.xzdadxid = dadx.id
where emp.org_code = #{orgcode} where emp.org_code = #{orgcode}
and emp.emp_num = #{empnum} and emp.emp_num = #{empnum}
and dadx.txzt = 1
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -72,15 +72,18 @@ ...@@ -72,15 +72,18 @@
zxfj.continueedu as jxjy, zxfj.continueedu as jxjy,
zxfj.totalmoney as lj zxfj.totalmoney as lj
from yggl_main_emp emp from yggl_main_emp emp
LEFT JOIN xcgl_asso_zxfjkc as zxfj on zxfj.userid = emp.emp_num LEFT JOIN xcgl_asso_zxfjkc as zxfj on zxfj.userid = emp.emp_num and zxfj.qyid = #{param.orgcode}
<if test="param.datetime != ''" > <if test="param.datetime != ''" >
and zxfj.taxmonth = #{param.datetime} and zxfj.taxmonth = #{param.datetime}
</if> </if>
where emp.org_code = #{param.orgcode} where emp.org_code = #{param.orgcode}
<if test="param.status != ''" > <if test="param.status != '' and param.status != '66'" >
and emp.job_status = #{param.status} and emp.job_status = #{param.status}
</if> </if>
<if test="param.status != '' and param.status == '66'" >
and emp.job_status in (0,1)
</if>
<if test="param.text != ''" > <if test="param.text != ''" >
and (emp.`name` like CONCAT('%',#{param.text},'%') or emp.emp_num = #{param.text}) and (emp.`name` like CONCAT('%',#{param.text},'%') or emp.emp_num = #{param.text})
</if> </if>
......
...@@ -41,6 +41,9 @@ ...@@ -41,6 +41,9 @@
opt.type as opttype opt.type as opttype
from xcgl_salary_item item from xcgl_salary_item item
LEFT JOIN xcgl_asso_option as opt on opt.itemid = item.id LEFT JOIN xcgl_asso_option as opt on opt.itemid = item.id
<where>
<if test="opttype != null"> opt.type = #{opttype}</if>
</where>
</select> </select>
......
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