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);
}
}
......@@ -70,5 +70,8 @@ public class SbgjjAssoCbfa extends Model<SbgjjAssoCbfa> {
@ApiModelProperty(value="公积金获取最大值",example="公积金获取最大值")
private Double gjjmax;
@ApiModelProperty(value="公积金(0:不办理;1:办理)",example="1")
private Integer isGjjbl;
}
\ No newline at end of file
......@@ -74,5 +74,13 @@ public class XcglAdminXzz extends Model<XcglAdminXzz> {
@ApiModelProperty(value="所属月份时间",example="2019-12")
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
......@@ -63,5 +63,11 @@ public class XcglAssoGztzt extends Model<XcglAssoGztzt> {
@ApiModelProperty(value="工资条组id",example="101")
private Integer gztszid;
@ApiModelProperty(value="实发工资",example="101")
private Double sfgz;
@ApiModelProperty(value="薪资组id",example="101")
private Integer xzzid;
}
\ No newline at end of file
......@@ -70,6 +70,12 @@ public class XcglAssoJsgzzx extends Model<XcglAssoJsgzzx> {
@ApiModelProperty(value="公式格式 ",example="系统提供/自定义公式")
private String gsgs;
@ApiModelProperty(value="公式变量值1 ",example="系统提供/公式变量值1")
private Double dygk;
@ApiModelProperty(value="公式变量值2 ",example="系统提供/公式变量值2")
private Double degk;
@ApiModelProperty(value="薪资组id ",example="薪资组id")
private Integer xzzid;
......@@ -78,4 +84,7 @@ public class XcglAssoJsgzzx extends Model<XcglAssoJsgzzx> {
@ApiModelProperty(value="薪资选项id",example="薪资选项id")
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> {
private String gsxs;
@ApiModelProperty(value = "字段一 ", example = "字段一")
private String dygk;
private Double dygk;
@ApiModelProperty(value = "字段二 ", example = "字段二")
private String degk;
private Double degk;
@ApiModelProperty(value = "类型(1:迟到早退扣款;2:事假扣款;3:病假扣款;4:入离职缺勤扣款;5:司龄;6:旷工扣款;7:加班费;8:司龄工资;9:应出勤天数;10:入离职缺勤天数;11:应发工资;12:个税;13:实发工资)")
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> {
private Integer xzxid;
@ApiModelProperty(value="薪资项结果 ",example="薪资项结果")
private String xzxjg;
private Double xzxjg;
@ApiModelProperty(value="企业id ",example="企业id")
private Integer qyid;
......
......@@ -172,7 +172,7 @@ public class ClockInController {
KqglAssoDkmx dkmc = KqglAssoDkmx.builder().build();
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 crdk = false;//当次打卡是否存在次日打卡
if(balan != null) {//前一天是否打过卡 去班次id查询是否存在次日打卡
......@@ -251,13 +251,13 @@ public class ClockInController {
}
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));
attdate = MethodCall(qyid,userid,yesterday);
attendance_date = startDateyesterday;
toweek = yesterday;
}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));
attendance_date = startDate;
toweek = putime;
......@@ -619,7 +619,7 @@ public class ClockInController {
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));
attdateyesterday = MethodCall(qyid,userid,yesterday);
......@@ -918,12 +918,12 @@ public class ClockInController {
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
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));
attendance_date = startDateyesterday;
toweek = yesterday;
}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));
attendance_date = startDate;
toweek = putime;
......@@ -1557,7 +1557,7 @@ public class ClockInController {
// KqglAssoDkmx dkmc = KqglAssoDkmx.builder().build();
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 crdk = false;//当次打卡是否存在次日打卡
if(balan != null) {//前一天是否打过卡 去班次id查询是否存在次日打卡
......@@ -1617,14 +1617,14 @@ public class ClockInController {
}
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));
attdate = MethodCall(qyid,userid,yesterday);
attendance_date = startDateyesterday;
toweek = yesterday;
putime = toweek;
}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));
attendance_date = startDate;
toweek = putime;
......@@ -2009,7 +2009,7 @@ public class ClockInController {
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));
attdateyesterday = MethodCall(qyid,userid,yesterday);
......@@ -2303,7 +2303,7 @@ public class ClockInController {
status_ = 2;
}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));
if(zydkmc == null) {//新增
KqglAssoDkmx pcd = KqglAssoDkmx.builder().build();
......@@ -2402,12 +2402,12 @@ public class ClockInController {
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
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));
attendance_date = startDateyesterday;
toweek = yesterday;
}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));
attendance_date = startDate;
toweek = putime;
......
......@@ -717,6 +717,18 @@ public class ClockInTool {
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) {
SimpleDateFormat sdf = new SimpleDateFormat(Format);
......@@ -753,4 +765,24 @@ public class ClockInTool {
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{
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()];
int l = 0;
if(leavetotal.size()>0) {
......@@ -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()];
int o = 0;
if(overtitotal.size() > 0) {
......@@ -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()];
int cx = 0;
if(trtotal.size()>0) {
......@@ -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()];
int wc = 0;
if(goouttotal.size()>0) {
......@@ -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()];
int bk = 0;
if(cardtotal.size()>0) {
......@@ -596,7 +596,7 @@ public class RealTimeUpdate{
/******/
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 company = "未知";//请假单位
if(lea != null) {
......@@ -612,17 +612,17 @@ public class RealTimeUpdate{
qinjia = "#"+(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"请"+leavetype+lea.getDuration()+company;
}
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()+"天";
}
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()+"天";
}
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);
}
......@@ -630,7 +630,7 @@ public class RealTimeUpdate{
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) {
//最小加班单位 1:按分钟加班、2:按半小时加班、3:按小时加班、4:按半天加班、5:按天加班
......
......@@ -155,10 +155,9 @@ public class OSSController {
@ApiOperation(value = "删除多个(谨慎使用,谨慎使用)", httpMethod = "DELETE", notes = "接口发布说明")
public Result<List<String>> delFiles(@CurrentUser UserBean userBean, @RequestBody OssDto ossDto) {
List<String> list = null;
List<String> keys = null;
try {
List<String> keys = new ArrayList<String>();
for (String fileName : ossDto.getFileNames()) {
keys = new ArrayList<String>();
String key = "8timer2.0/" + userBean.getOrgCode() + "/" + ossDto.getMoudle() + "/" + fileName;
keys.add(key);
}
......
......@@ -187,8 +187,10 @@ public class SocialSecurityFundController {
SbgjjAssoCbfa cbfa = SbgjjAssoCbfa.builder().build();
cbfa.setCbmcName(insura.getName());//参保名称
cbfa.setCbcs(insura.getInsuredcities());//参保城市
cbfa.setSbcbfzmc(insura.getShebaoname());//社保参保方案名称
cbfa.setGjjcbfamc(insura.getGongjijinname());//公积金参保方案名称
cbfa.setFwf(Double.valueOf(insura.getFwf()));//服务费 (元/人/月)
cbfa.setSbSbgjjid(insura.getShebaoid());//社保(公积金)方案库id
cbfa.setGjjSbgjjid(insura.getGongjijinid());//(社保)公积金方案库id
......@@ -200,6 +202,13 @@ public class SocialSecurityFundController {
cbfa.setGjjmax(Double.valueOf(insura.getGjjmax()));
cbfa.setQyid(userBean.getOrgCode());
if(insura.getIsGjjbl()) {
cbfa.setIsGjjbl(0);
}else {
cbfa.setIsGjjbl(1);
}
sbgjjassocbfamapper.sbgjjassocbfainsert(cbfa);
int cbfaid = cbfa.getId();
......@@ -368,6 +377,12 @@ public class SocialSecurityFundController {
cbfa.setSbmax(Double.valueOf(insura.getSbmax()));
cbfa.setGjjmax(Double.valueOf(insura.getGjjmax()));
if(insura.getIsGjjbl()) {
cbfa.setIsGjjbl(0);
}else {
cbfa.setIsGjjbl(1);
}
cbfa.updateById();
sbgjjassocbfzmxmapper.deleteBycbfaid(insura.getId());
......@@ -519,7 +534,6 @@ public class SocialSecurityFundController {
@ApiOperation(value = "投保", httpMethod = "POST", notes = "接口发布说明")
public ResponseResult InsurancePlan(@CurrentUser UserBean userBean,@RequestBody InsureDto insuredto) {
String[] usernums = insuredto.getUsernums();
if(insuredto.getUsernum() > 0) {
......@@ -531,6 +545,7 @@ public class SocialSecurityFundController {
if(usernums.length > 0){
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])
SbgjjAdminCbry cbry = SbgjjAdminCbry.builder().build();
......@@ -902,7 +917,7 @@ public class SocialSecurityFundController {
if(istb.getSbcbState() == 3 && istb.getGjjcbState() == 3) {//社保和公积金全部“停保”时
SbgjjAdminCbry up = SbgjjAdminCbry.builder().build();
up.setId(stopi.getId());
up.setState(0);//状态 1:使用中;0:历史记录
up.setState(1);//up.setState(0);//状态 1:使用中;0:历史记录
up.updateById();
}
......@@ -947,18 +962,18 @@ public class SocialSecurityFundController {
// cbry.setId(insuredto.getId());
// cbry.updateById();
int isUse = 1;//是否使用 0:否 1:是
SbgjjAdminCbry ascb = SbgjjAdminCbry.builder().id(insuredto.getId()).build().selectById();
if(ascb.getSbjlStatime().equals(insuredto.getJnmouth()) || ascb.getGjjjlStatime().equals(insuredto.getGjjJnmouth())) {
isUse = 0;
}
// int isUse = 1;//是否使用 0:否 1:是
//
// SbgjjAdminCbry ascb = SbgjjAdminCbry.builder().id(insuredto.getId()).build().selectById();
//
// if(ascb.getSbjlStatime().equals(insuredto.getJnmouth()) || ascb.getGjjjlStatime().equals(insuredto.getGjjJnmouth())) {
// isUse = 0;
// }
SbgjjAdminCbry cbrytwo = SbgjjAdminCbry.builder().build();
cbrytwo.setState(0);//状态 1:使用中;0:历史记录
cbrytwo.setId(insuredto.getId());
cbrytwo.setIsUse(isUse);
cbrytwo.setIsUse(0);
cbrytwo.updateById();
......@@ -1036,6 +1051,11 @@ public class SocialSecurityFundController {
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();
deta.setUserId(insuredto.getUsernum());
deta.setAttributionTime(insuredto.getJnmouth());//
......@@ -1156,6 +1176,10 @@ public class SocialSecurityFundController {
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();
deta.setUserId(insuredto.getUsernum());
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;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
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;
@Repository
public interface KqglAssoDkjlMapper extends BaseMapper<KqglAssoDkjl> {
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
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);
......@@ -28,4 +28,6 @@ public interface KqglAssoRelationSummaryMapper extends BaseMapper<KqglAssoRelati
KqglAssoRelationSummary Businessdayclockin(int userid,int approvaltype,String apptime,int orgcode);
List<KqglAssoRelationSummary> HolidayDetails(int orgcode,String apptime,int rules_type,int userid);
}
......@@ -24,4 +24,6 @@ public interface SbgjjAssoYjzdMapper extends BaseMapper<SbgjjAssoYjzd> {
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;
import java.util.List;
import cn.timer.api.dto.xcgl.PayslipSearchDto;
import cn.timer.api.dto.xcgl.SendpayslipBatchDto;
import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
......@@ -19,8 +21,20 @@ public interface XcglAssoGztztMapper extends BaseMapper<XcglAssoGztzt> {
int deletexcglassogztzt(int gztszid);
List<PayslipDetailsDto> PayslipDetails(int gztszid,int qyid);
List<PayslipDetailsDto> payslipSearch(PayslipSearchDto dto);
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> {
List<CalculationOptionsDto> selectCalculationOptionsList(int xzzid,int userid);
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;
import cn.timer.api.bean.xcgl.XcglAssoXzb;
import cn.timer.api.dto.xcgl.CalculationDto;
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;
/**
* 薪资表
......@@ -20,7 +23,7 @@ public interface XcglAssoXzbMapper extends BaseMapper<XcglAssoXzb> {
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);
......@@ -31,4 +34,19 @@ public interface XcglAssoXzbMapper extends BaseMapper<XcglAssoXzb> {
CalculationValueDto lateearlyDeduction(int empnum,int xzzid,String salaryitem);
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;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
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 com.baomidou.mybatisplus.core.mapper.BaseMapper;
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;
/**
......@@ -26,11 +25,13 @@ public interface XcglAssoXzdazdyMapper extends BaseMapper<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<FixedSalaryStaffDto> SalaryAdjustmentRecord(Integer orgcode,Integer empnum);
XcglAssoXzdazdy SalaryFixedWages(String zdmc);
List<FixedSalaryStaffDto> selectPaygroupStaff(CheckSalaryStaffDto checksearch);
}
package cn.timer.api.dao.xcgl;
import java.util.List;
import cn.timer.api.dto.xcgl.SalaryoptionsDto;
import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
......@@ -15,6 +16,6 @@ import cn.timer.api.dto.xcgl.XcglAssoOptionDto;
@Repository
public interface XcglSalaryItemMapper extends BaseMapper<XcglSalaryItem> {
List<XcglAssoOptionDto> selectxcglsalaryitemList();
List<XcglAssoOptionDto> selectxcglsalaryitemList(SalaryoptionsDto dto);
}
......@@ -21,4 +21,6 @@ public class AttqueryCriteriaDto extends Page {
@ApiModelProperty(value = "部门ID", example = "")
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 {
@ApiModelProperty(value = "入职日期 ", example = "字段说明")
private Integer orgcode;
private Integer turnover_status;
@ApiModelProperty(value = "表数据", example = "字段说明")
List<BalanceSheetDataDto> balanceTo;
......
......@@ -24,6 +24,8 @@ public class InsuranceSchemeDto implements Serializable {
SocialfundDto[] gongjijin;
int gongjijinid;
Boolean isGjjbl;//0:不办理;1:办理
String sbmin;
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 {
String name;
String phone;
String empNum;
int zljy;
int zfdk;
int zfzj;
int sylr;
int jxjy;
int lj;
Double zljy;
Double zfdk;
Double zfzj;
Double sylr;
Double jxjy;
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 {
String xremarks;// 项备注
Integer xgsid;// 项对应的公式id
String xgsgs;// 项公式
Integer xiscustom;//是否自定义项(0:否;1:是)
Integer xrulestate;//
/**
* 公式变量值1
*/
private double xdygk;
/**
* 公式变量值2
*/
private double xdegk;
Integer xjxgzid;//
Integer xoptionid;
}
......@@ -23,4 +23,8 @@ public class PayslipDetailsDto implements Serializable {
String dept;
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 {/**
*/
private static final long serialVersionUID = 2131188736263992532L;
List<ComputeUserDto> comuser;
// List<ComputeUserDto> comuser;
List<CalculationDto> comuser;
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 {
@ApiModelProperty(value = "继续教育", example = "A")
private String jxjy;
@ApiModelProperty(value = "累计专项附加扣除", example = "A")
private String lj;
// @ApiModelProperty(value = "累计专项附加扣除", example = "A")
// 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:
machine8timerUrl: 'http://test-8timer-fk.youlingrc.com'
#machine8timerUrl: 'http://192.168.3.38:8088'
authentication-code: '888888'
prescription: 8 #一天工作8小时
register-free-time: 90 #系统赠送时间
register-company-max-num: 100 #默认最大公司数量
register-childAccount-max-num: 10 #默认最大子账号数量
......
......@@ -169,6 +169,7 @@ config-8timer:
machine8timerUrl: 'http://record.8timer.cn'
#machine8timerUrl: 'http://192.168.3.38:8088'
authentication-code: ''
prescription: 8 #一天工作8小时
register-free-time: 90 #系统赠送时间
register-company-max-num: 100
register-childAccount-max-num: 10
......
......@@ -168,6 +168,7 @@ config-8timer:
machine8timerUrl: 'http://test-8timer-fk.youlingrc.com'
#machine8timerUrl: 'http://192.168.3.38:8088'
authentication-code: '888888'
prescription: 8 #一天工作8小时
register-free-time: 90 #系统赠送时间
register-company-max-num: 100
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 @@
<result column="department" property="department" />
<result column="rztime" property="rztime" />
<result column="orgcode" property="orgcode" />
<result column="turnover_status" property="turnover_status" />
<collection property="balanceTo" ofType="cn.timer.api.dto.kqmk.BalanceSheetDataDto">
<result column="leaverulesid" property="leaverulesid"/>
<result column="balancedays" property="balancedays"/>
......@@ -75,12 +76,12 @@
emp.`name` as empname,
emp.org_code as orgcode,
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
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 emp.org_code = #{param.orgCode}
and emp.job_status != 3
<if test="param.query != null and param.query != ''">
and ( emp.`name` like CONCAT('%',#{param.query},'%') or
emp.emp_num like CONCAT('%',#{param.query},'%') or
......@@ -89,6 +90,32 @@
<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>
<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}
ORDER BY emp.emp_num DESC
......
......@@ -37,6 +37,16 @@
totals
</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 a.user_id,
......@@ -56,6 +66,7 @@
where res.user_id = #{userid}
and res.approval_type = #{approvaltype}
and SUBSTR(res.app_time,1,7) = #{apptime}
and res.org_code = #{orgcode}
</select>
<select id="LeaveInvestigation" resultMap="BaseResultMap">
......
......@@ -183,7 +183,7 @@
cbry.gjjjl_statime as gjjjlstatime,
cbry.gjjjljs as gjjjljs
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
from zzgl_bmgw_m m
left join zzgl_bmgw_m um on um.id = m.up_id
......
......@@ -17,39 +17,10 @@
<result column="gjjmin" property="gjjmin" />
<result column="sbmax" property="sbmax" />
<result column="gjjmax" property="gjjmax" />
<result column="is_gjjbl" property="isGjjbl" />
</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">
......@@ -89,7 +60,10 @@
sbmax,
</if>
<if test ='null != gjjmax'>
gjjmax
gjjmax,
</if>
<if test ='null != isGjjbl'>
is_gjjbl
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
......@@ -127,52 +101,14 @@
#{sbmax},
</if>
<if test ='null != gjjmax'>
#{gjjmax}
#{gjjmax},
</if>
<if test ='null != isGjjbl'>
#{isGjjbl}
</if>
</trim>
</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>
\ No newline at end of file
......@@ -126,6 +126,10 @@
</foreach>
</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 INTO sbgjj_asso_cbfzmx
<trim prefix="(" suffix=")" suffixOverrides=",">
......
......@@ -85,6 +85,21 @@
cbryid SbgjjAssoYjzd_cbryid
</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 emp.`name` as empname,
yjzd.user_num as usernum,
......
......@@ -16,6 +16,10 @@
<result column="qyid" property="qyid" />
<result column="pxfs" property="pxfs" />
<result column="monthtime" property="monthtime" />
<result column="xzyf" property="xzyf" />
<result column="is_xzgz" property="isXzgz" />
<result column="is_xzsd" property="isXzsd" />
</resultMap>
<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 @@
<result column="yhqm" property="yhqm" />
<result column="qyid" property="qyid" />
<result column="gztszid" property="gztszid" />
<result column="sfgz" property="sfgz" />
<result column="xzzid" property="xzzid" />
</resultMap>
<resultMap id="PayslipDetailsMap" type="cn.timer.api.dto.xcgl.PayslipDetailsDto" >
......@@ -23,6 +25,7 @@
<result column="fstype" property="fstype" />
<result column="cktype" property="cktype" />
<result column="qrtype" property="qrtype" />
<result column="sfgz" property="sfgz" />
<result column="dept" property="dept" />
<result column="post" property="post" />
</resultMap>
......@@ -37,7 +40,8 @@
fkyj,
yhqm,
qyid,
gztszid
gztszid,
sfgz
</sql>
<sql id="Base_Column_List_Alias">
......@@ -47,13 +51,14 @@
fs_type XcglAssoGztzt_fs_type,
ck_type XcglAssoGztzt_ck_type,
qr_type XcglAssoGztzt_qr_type,
sfgz XcglAssoGztzt_sfgz,
fkyj XcglAssoGztzt_fkyj,
yhqm XcglAssoGztzt_yhqm,
qyid XcglAssoGztzt_qyid,
gztszid XcglAssoGztzt_gztszid
</sql>
<select id="PayslipDetails" resultMap="PayslipDetailsMap">
<select id="payslipSearch" resultMap="PayslipDetailsMap">
select emp.`name` as empname,
case emp.job_status
when 0 then '试用'
......@@ -64,16 +69,26 @@
gztzt.ck_type as cktype,
gztzt.qr_type as qrtype,
gztzt.id,
gztzt.sfgz,
bmgw.dept,
bmgw.post
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
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 gztzt.gztszid = #{gztszid}
and gztzt.qyid = #{qyid}
<if test="xzzid != null">
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>
<delete id="deletexcglassogztzt" >
......@@ -89,7 +104,7 @@
</delete>
<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=",">
(
<if test="item.userid != null" >
......@@ -113,6 +128,9 @@
<if test="item.yhqm != null" >
#{item.yhqm,jdbcType=VARCHAR},
</if>
<if test="item.sfgz != null" >
#{item.sfgz,jdbcType=DOUBLE},
</if>
<if test="item.qyid != null" >
#{item.qyid,jdbcType=INTEGER},
</if>
......@@ -123,107 +141,19 @@
</foreach>
</insert>
<!-- <insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.xcgl.XcglAssoGztzt">
INSERT INTO xcgl_asso_gztzt
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != userid'>
userid,
</if>
<if test ='null != xzyf'>
xzyf,
</if>
<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>
<!-- 发送工资条 操作 -->
<update id="payslipSend" parameterType="java.lang.Integer">
UPDATE xcgl_asso_gztzt SET fs_type = #{fsType}
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>
-->
<!-- 发送工资条 批量发送 -->
<update id="payslipSendBatch">
UPDATE xcgl_asso_gztzt SET fs_type = 1
WHERE fs_type in (0, 2)
AND id in
<foreach collection="ids" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</update>
</mapper>
\ No newline at end of file
......@@ -18,6 +18,7 @@
<result column="xzzid" property="xzzid" />
<result column="rulestate" property="rulestate" />
<result column="optionid" property="optionid" />
<result column="is_custom" property="isCustom" />
</resultMap>
......@@ -30,7 +31,11 @@
<result column="xremarks" property="xremarks"/>
<result column="xgsid" property="xgsid"/>
<result column="xgsgs" property="xgsgs"/>
<result column="xdygk" property="xdygk"/>
<result column="xdegk" property="xdegk"/>
<result column="xjxgzid" property="xjxgzid"/>
<result column="xiscustom" property="xiscustom"/>
<result column="xrulestate" property="xrulestate"/>
</resultMap>
......@@ -40,39 +45,12 @@
<result column="rsz" property="rsz"/>
</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">
id XcglAssoJsgzzx_id,
salaryitem XcglAssoJsgzzx_salaryitem,
yhmbzd XcglAssoJsgzzx_yhmbzd,
rule XcglAssoJsgzzx_rule,
type XcglAssoJsgzzx_type,
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="SalaryRuleGroupItem" resultMap="BaseResultMap">
select * from xcgl_asso_jsgzzx js
where js.xzzid = #{xzzid}
ORDER BY js.rulestate = 2 or js.rulestate = 3 ASC,
js.id ASC
</select>
<select id="selectSalarySectionList" resultMap="BaseResultMap">
select jsgzzx.* from xcgl_asso_jsgzzx jsgzzx
......@@ -91,7 +69,11 @@
gzzx.jxgzid as xjxgzid,
gzzx.remarks as xremarks,
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
where gzzx.jxgzid = 0
and gzzx.xzzid = #{xzzid}
......@@ -116,7 +98,7 @@
</delete>
<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=",">
(
<if test="item.salaryitem != null" >
......@@ -149,6 +131,14 @@
<if test="item.gsgs != null" >
#{item.gsgs,jdbcType=VARCHAR},
</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" >
#{item.xzzid,jdbcType=INTEGER},
</if>
......@@ -203,7 +193,10 @@
rulestate,
</if>
<if test ='null != optionid'>
optionid
optionid,
</if>
<if test ='null != isCustom'>
is_custom
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
......@@ -244,7 +237,10 @@
#{rulestate},
</if>
<if test ='null != optionid'>
#{optionid}
#{optionid},
</if>
<if test ='null != isCustom'>
#{isCustom}
</if>
</trim>
</insert>
......@@ -264,32 +260,12 @@
<if test ='null != gsgs'>gsgs = #{gsgs},</if>
<if test ='null != xzzid'>xzzid = #{xzzid},</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>
WHERE id = #{id}
</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>
\ No newline at end of file
......@@ -29,7 +29,12 @@
<result column="xremarks" property="xremarks"/>
<result column="xgsid" property="xgsid"/>
<result column="xgsgs" property="xgsgs"/>
<result column="xdygk" property="xdygk"/>
<result column="xdegk" property="xdegk"/>
<result column="xjxgzid" property="xjxgzid"/>
<result column="xoptionid" property="xoptionid"/>
<result column="xiscustom" property="xiscustom"/>
<result column="xrulestate" property="xrulestate"/>
</collection>
</resultMap>
......@@ -179,8 +184,13 @@
gzzx.remarks as xremarks,
gzzx.gsid as xgsid,
gzzx.gsgs as xgsgs,
gzzx.dygk as xdygk,
gzzx.degk as xdegk,
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
LEFT JOIN xcgl_asso_jsgzzx as gzzx on gzzx.jxgzid = jxgz.id
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 @@
<result column="dygk" property="dygk" />
<result column="degk" property="degk" />
<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>
<sql id="Base_Column_List">
......@@ -33,7 +39,7 @@
<select id="QuerySalaryRules" resultMap="BaseResultMap">
select * from xcgl_asso_xcjsgz jsgz
where jsgz.formulaname = #{formulaname}
ORDER BY jsgz.id ASC LIMIT 1
and jsgz.defaulttype = 1
</select>
<!--
......
......@@ -35,6 +35,19 @@
<result column="xzxjg" property="xzxjg"/>
</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">
id,
userid,
......@@ -53,6 +66,75 @@
qyid XcglAssoXzb_qyid
</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 aa.orgcode,aa.empid,aa.empnum,aa.empname,aa.xzbid,aa.xzyf,
aa.xzxid,aa.xzxjg,aa.dept,aa.post
......@@ -73,9 +155,10 @@
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})
and xzbs.xzyf = #{xzyf} or xzbs.xzyf = ''
and 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})
<if test="text != null and text != ''" >
and (emp.`name` like CONCAT('%',#{text},'%') or emp.emp_num = #{text})
</if>
) as aa
where aa.orgcode = #{orgcode}
</select>
......@@ -119,14 +202,15 @@
<delete id="deleteByuserid" >
<!-- DELETE FROM xcgl_asso_xzb
WHERE userid = #{userid} -->
DELETE FROM xcgl_asso_xzb
WHERE userid = #{userid}
and xzxid not in(select jsgzzx.id from xcgl_asso_jsgzzx jsgzzx
LEFT JOIN xcgl_asso_option as opt on opt.id = jsgzzx.optionid
where opt.itemid = 2
and jsgzzx.xzzid = #{xzzid})
and xzyf = #{xzyf} -->
DELETE FROM xcgl_asso_xzb
WHERE userid = #{userid}
and xzyf = #{xzyf}
</delete>
......@@ -193,6 +277,17 @@
and xzxid = #{xzxid}
</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 FROM xcgl_asso_xzb
WHERE id = #{id}
......
......@@ -64,10 +64,7 @@
<select id="selectxcglassoxzdazdy" resultMap="BaseResultMap">
select * from xcgl_asso_xzdazdy xzzdy
where xzzdy.qyid = #{qyid}
and xzzdy.zdmc = '基本工资'
or xzzdy.zdmc = '绩效工资'
or xzzdy.zdmc = '岗位津贴'
or xzzdy.zdmc = '加班工资'
and xzzdy.zdmc in ('底薪','岗位津贴')
</select>
<select id="SalaryFixedWages" resultMap="BaseResultMap">
......@@ -200,10 +197,47 @@
from yggl_main_emp emp
LEFT JOIN xcgl_asso_xzdadx as dadx on dadx.userid = emp.emp_num and dadx.txzt = 0
LEFT JOIN xcgl_asso_xzdaz as xzdaz on xzdaz.xzdadxid = dadx.id
where emp.org_code = #{orgcode}
<if test="status != ''" >
and emp.job_status = #{status}
where emp.org_code = #{param.orgcode}
<if test="param.status != ''" >
and emp.job_status = #{param.status}
</if>
<if test="param.text != ''" >
and (emp.`name` like CONCAT('%',#{param.text},'%') or emp.emp_num = #{param.text})
</if>
</select>
<select id="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 != ''" >
and (emp.`name` like CONCAT('%',#{text},'%') or emp.emp_num = #{text})
</if>
......@@ -258,6 +292,7 @@
LEFT JOIN xcgl_asso_xzdaz as xzdaz on xzdaz.xzdadxid = dadx.id
where emp.org_code = #{orgcode}
and emp.emp_num = #{empnum}
and dadx.txzt = 1
</select>
</mapper>
\ No newline at end of file
......@@ -72,15 +72,18 @@
zxfj.continueedu as jxjy,
zxfj.totalmoney as lj
from yggl_main_emp emp
LEFT JOIN xcgl_asso_zxfjkc as zxfj on zxfj.userid = emp.emp_num
LEFT JOIN xcgl_asso_zxfjkc as zxfj on zxfj.userid = emp.emp_num and zxfj.qyid = #{param.orgcode}
<if test="param.datetime != ''" >
and zxfj.taxmonth = #{param.datetime}
</if>
where emp.org_code = #{param.orgcode}
<if test="param.status != ''" >
<if test="param.status != '' and param.status != '66'" >
and emp.job_status = #{param.status}
</if>
<if test="param.status != '' and param.status == '66'" >
and emp.job_status in (0,1)
</if>
<if test="param.text != ''" >
and (emp.`name` like CONCAT('%',#{param.text},'%') or emp.emp_num = #{param.text})
</if>
......
......@@ -41,6 +41,9 @@
opt.type as opttype
from xcgl_salary_item item
LEFT JOIN xcgl_asso_option as opt on opt.itemid = item.id
<where>
<if test="opttype != null"> opt.type = #{opttype}</if>
</where>
</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