Commit e2f538dd by Administrator

Merge branch 'develop' into 'master'

Develop

See merge request 8timerv2/8timerapiv200!506
parents d38cfed3 a23f59d7
...@@ -402,7 +402,12 @@ ...@@ -402,7 +402,12 @@
<version>1.4.7.RELEASE</version> <version>1.4.7.RELEASE</version>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/net.sourceforge.htmlunit/htmlunit -->
<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
<version>2.43.0</version>
</dependency>
</dependencies> </dependencies>
<repositories> <repositories>
......
package cn.timer.api.bean.kqmk;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author LAL 2020-09-22
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "kqmk_redletter_day")
@ApiModel("节假日")
public class KqmkRedletterDay extends Model<KqmkRedletterDay> {
/**
*
*/
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "id id", example = "101")
private Integer id;
@ApiModelProperty(value = "日期 ", example = "日期")
private String holiday;
@ApiModelProperty(value = "假日名称 ", example = "假日名称")
private String holidayName;
@ApiModelProperty(value = "是否为节假日(0:否;1:是) 是否为节假日(0:否;1:是)", example = "101")
private Integer holidayStatus;
@ApiModelProperty(value = "年月", example = "101")
private String belongYearmonth;
}
\ No newline at end of file
...@@ -89,4 +89,7 @@ public class SbgjjAdminCbry extends Model<SbgjjAdminCbry> { ...@@ -89,4 +89,7 @@ public class SbgjjAdminCbry extends Model<SbgjjAdminCbry> {
@ApiModelProperty(value = "企业id", example = "101") @ApiModelProperty(value = "企业id", example = "101")
private Integer qyid; private Integer qyid;
@ApiModelProperty(value = "是否使用 0:否 1:是", example = "101")
private Integer isUse;
} }
\ No newline at end of file
...@@ -52,9 +52,15 @@ public class SbgjjAssoDetailed extends Model<SbgjjAssoDetailed> { ...@@ -52,9 +52,15 @@ public class SbgjjAssoDetailed extends Model<SbgjjAssoDetailed> {
@ApiModelProperty(value = "个人金额 ", example = "个人金额") @ApiModelProperty(value = "个人金额 ", example = "个人金额")
private Double personalAmount; private Double personalAmount;
@ApiModelProperty(value = "个人比例 ", example = "个人比例")
private String personalProportion;
@ApiModelProperty(value = "公司金额 ", example = "公司金额") @ApiModelProperty(value = "公司金额 ", example = "公司金额")
private Double companyAmount; private Double companyAmount;
@ApiModelProperty(value = "公司比例 ", example = "公司比例")
private String companyProportion;
@ApiModelProperty(value = "险种类型 1:社保;2:公积金", example = "101") @ApiModelProperty(value = "险种类型 1:社保;2:公积金", example = "101")
private Integer xzType; private Integer xzType;
...@@ -64,4 +70,14 @@ public class SbgjjAssoDetailed extends Model<SbgjjAssoDetailed> { ...@@ -64,4 +70,14 @@ public class SbgjjAssoDetailed extends Model<SbgjjAssoDetailed> {
@ApiModelProperty(value = "生成时间 生成时间", example = "101") @ApiModelProperty(value = "生成时间 生成时间", example = "101")
private Long addtime; private Long addtime;
@ApiModelProperty(value = "参保方案 ", example = "参保方案")
private String cbfns;
@ApiModelProperty(value = "社保基数 ", example = "社保基数")
private String sbjss;
@ApiModelProperty(value = "公积金基数 ", example = "公积金基数")
private String gjjjss;
} }
\ No newline at end of file
...@@ -208,6 +208,9 @@ public class YgglMainEmp extends Model<YgglMainEmp> { ...@@ -208,6 +208,9 @@ public class YgglMainEmp extends Model<YgglMainEmp> {
@ApiModelProperty(value="离职前状态 1试用、2正式 ",example="1试用、2正式") @ApiModelProperty(value="离职前状态 1试用、2正式 ",example="1试用、2正式")
private Integer beforeLeavingSts; private Integer beforeLeavingSts;
@ApiModelProperty(value="自定义工号",example="")
private String customNum;
@Transient @Transient
@TableField(exist = false) @TableField(exist = false)
private String workTime;//工龄 private String workTime;//工龄
......
...@@ -41,6 +41,7 @@ import cn.hutool.core.util.StrUtil; ...@@ -41,6 +41,7 @@ import cn.hutool.core.util.StrUtil;
import cn.timer.api.aspect.lang.annotation.Log; import cn.timer.api.aspect.lang.annotation.Log;
import cn.timer.api.aspect.lang.enums.BusinessType; import cn.timer.api.aspect.lang.enums.BusinessType;
import cn.timer.api.bean.jxgl.JxglBasicSetting; import cn.timer.api.bean.jxgl.JxglBasicSetting;
import cn.timer.api.bean.kqmk.KqglAssoBcsz;
import cn.timer.api.bean.kqmk.KqglAssoLeaveEmployeeBalance; import cn.timer.api.bean.kqmk.KqglAssoLeaveEmployeeBalance;
import cn.timer.api.bean.kqmk.KqglAssoLeaveRules; import cn.timer.api.bean.kqmk.KqglAssoLeaveRules;
import cn.timer.api.bean.kqmk.KqglAssoLeaveRulesT; import cn.timer.api.bean.kqmk.KqglAssoLeaveRulesT;
...@@ -545,6 +546,22 @@ public class LoginController { ...@@ -545,6 +546,22 @@ public class LoginController {
@Autowired @Autowired
private KqglAssoOvertimeRulesMMapper kqglassoovertimerulesmmapper; private KqglAssoOvertimeRulesMMapper kqglassoovertimerulesmmapper;
@GetMapping(value="/doublecheck/{checkobject}")
@ApiOperation(value = "检查注册公司名是否重复", httpMethod = "GET", notes = "接口发布说明")
public Result<Object> doublecheck(@PathVariable("checkobject") String checkobject) {
QyzxEntInfoM gsif = QyzxEntInfoM.builder().build().selectOne(new QueryWrapper<QyzxEntInfoM>().lambda().eq(QyzxEntInfoM::getName, checkobject));
if(gsif != null) {
return ResultUtil.success("呀,该公司名已被注册了!!!") ;
}else {
return ResultUtil.data(0,"操作成功!");
}
}
/** /**
* 注册企业 * 注册企业
* *
......
...@@ -523,7 +523,7 @@ public class CrmController { ...@@ -523,7 +523,7 @@ public class CrmController {
.ge(StringUtils.isNotBlank(startFollowTime), CrmClientData::getLastFollowTime, startFollowTime) .ge(StringUtils.isNotBlank(startFollowTime), CrmClientData::getLastFollowTime, startFollowTime)
.le(StringUtils.isNotBlank(endFollowTime), CrmClientData::getLastFollowTime, endFollowTime).like(!StrUtil.isBlank(like), CrmClientData::getBelongUserName, like).or() .le(StringUtils.isNotBlank(endFollowTime), CrmClientData::getLastFollowTime, endFollowTime).like(!StrUtil.isBlank(like), CrmClientData::getBelongUserName, like).or()
.like(!StrUtil.isBlank(like), CrmClientData::getClientName, like).or() .like(!StrUtil.isBlank(like), CrmClientData::getClientName, like).or()
.like(!StrUtil.isBlank(like), CrmClientData::getClientCellphone, like) .like(!StrUtil.isBlank(like), CrmClientData::getClientCellphone, like).having("org_code = {0}", orgCode).having("belong_user = {0}", empNum)
.orderByDesc(CrmClientData::getCreateTime)); .orderByDesc(CrmClientData::getCreateTime));
} }
......
...@@ -2029,7 +2029,7 @@ public class TimeCardController { ...@@ -2029,7 +2029,7 @@ public class TimeCardController {
double gzsc = 0; double gzsc = 0;
long rest_time = 0; long rest_time = 0;
if(dkbc.getStartTime() != null && dkbc.getEndTime() != null) { if(dkbc.getStartTime() != null && !("").equals(dkbc.getStartTime()) && dkbc.getEndTime() != null && !("").equals(dkbc.getEndTime())) {
long kaishixiuxi = Long.valueOf(ClockInTool.dateToStamp(punchattdate + " " +dkbc.getStartTime()+":00")); long kaishixiuxi = Long.valueOf(ClockInTool.dateToStamp(punchattdate + " " +dkbc.getStartTime()+":00"));
long jieshuxiuxi = Long.valueOf(ClockInTool.dateToStamp(punchattdate + " " +dkbc.getEndTime()+":00")); long jieshuxiuxi = Long.valueOf(ClockInTool.dateToStamp(punchattdate + " " +dkbc.getEndTime()+":00"));
rest_time = (jieshuxiuxi - kaishixiuxi)/1000/60;//休息时间 rest_time = (jieshuxiuxi - kaishixiuxi)/1000/60;//休息时间
......
package cn.timer.api.controller.kqgl.holiday;
import java.util.Date;
public class ChinaDate {
/**
* 公历时间
*/
private Date solarDate;
/**
* 农历日
*/
private String lunar;
/**
* 公历日
*/
private String solar;
/**
* 是否是 休
*/
private boolean isVacation = false;
/**
* 如果是 休情况下的假期名字
*/
private String VacationName = "非假期";
/**
* 是否是 班
*/
private boolean isWorkFlag = false;
private boolean isSaturday = false;
private boolean isSunday = false;
/**
* @return the solarDate
*/
public Date getSolarDate() {
return solarDate;
}
/**
* @param solarDate the solarDate to set
*/
public void setSolarDate(Date solarDate) {
this.solarDate = solarDate;
}
/**
* @return the lunar
*/
public String getLunar() {
return lunar;
}
/**
* @param lunar the lunar to set
*/
public void setLunar(String lunar) {
this.lunar = lunar;
}
/**
* @return the solar
*/
public String getSolar() {
return solar;
}
/**
* @param solar the solar to set
*/
public void setSolar(String solar) {
this.solar = solar;
}
/**
* @return the isVacation
*/
public boolean isVacation() {
return isVacation;
}
/**
* @param isVacation the isVacation to set
*/
public void setVacation(boolean isVacation) {
this.isVacation = isVacation;
}
/**
* @return the vacationName
*/
public String getVacationName() {
return VacationName;
}
/**
* @param vacationName the vacationName to set
*/
public void setVacationName(String vacationName) {
VacationName = vacationName;
}
/**
* @return the isWorkFlag
*/
public boolean isWorkFlag() {
return isWorkFlag;
}
/**
* @param isWorkFlag the isWorkFlag to set
*/
public void setWorkFlag(boolean isWorkFlag) {
this.isWorkFlag = isWorkFlag;
}
/**
* @return the isSaturday
*/
public boolean isSaturday() {
return isSaturday;
}
/**
* @param isSaturday the isSaturday to set
*/
public void setSaturday(boolean isSaturday) {
this.isSaturday = isSaturday;
}
/**
* @return the isSunday
*/
public boolean isSunday() {
return isSunday;
}
/**
* @param isSunday the isSunday to set
*/
public void setSunday(boolean isSunday) {
this.isSunday = isSunday;
}
}
\ No newline at end of file
package cn.timer.api.controller.kqgl.holiday;
import java.io.IOException;
import java.net.MalformedURLException;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException;
import com.gargoylesoftware.htmlunit.WebClient;
import com.gargoylesoftware.htmlunit.html.DomNodeList;
import com.gargoylesoftware.htmlunit.html.HtmlElement;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
import cn.timer.api.bean.kqmk.KqmkRedletterDay;
import cn.timer.api.dao.kqmk.KqmkRedletterDayMapper;
public class Main {
private static String latestVocationName = "";
public String getVocationName(DomNodeList<HtmlElement> htmlElements, String date) throws ParseException {
String rst = "";
boolean pastTimeFlag = false;
DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd");
Date paramDate = dateFormat.parse(date);
if (new Date().getTime() >= paramDate.getTime()) {
pastTimeFlag = true;
}
//first step //jugde if can get vocation name from html page
for (int i = 0; i < htmlElements.size(); i++) {
HtmlElement element = htmlElements.get(i);
if (element.getAttribute("class").indexOf("vacation") != -1) {
boolean hitFlag = false;
String voationName = "";
for (; i < htmlElements.size(); i++) {
HtmlElement elementTmp = htmlElements.get(i);
String liDate = elementTmp.getAttribute("date");
List<HtmlElement> lunar = elementTmp.getElementsByAttribute("span", "class", "lunar");
String lanarText = lunar.get(0).asText();
if (lanarText.equals("元旦")) {
voationName = "元旦";
} else if (lanarText.equals("除夕") || lanarText.equals("春节")) {
voationName = "春节";
} else if (lanarText.equals("清明")) {
voationName = "清明";
} else if (lanarText.equals("国际劳动节")) {
voationName = "国际劳动节";
} else if (lanarText.equals("端午节")) {
voationName = "端午节";
} else if (lanarText.equals("中秋节")) {
voationName = "中秋节";
} else if (lanarText.equals("国庆节")) {
voationName = "国庆节";
}
if (liDate.equals(date)) {
hitFlag = true;
}
if (elementTmp.getAttribute("class").indexOf("vacation") == -1) {
break;
}
}
if (hitFlag == true && !voationName.equals("")) {
rst = voationName;
break;
}
} else {
continue;
}
}
//if first step fail(rarely), get from the latest Vocation name
if (rst.equals("")) {
System.out.println("warning: fail to get vocation name from html page.");
//you can judge by some simple rule
//from the latest Vocation name
rst = Main.latestVocationName;
} else if (pastTimeFlag == true) {
//更新《当前时间,且最近一次的可见的假期名
Main.latestVocationName = rst;
}
return rst;
}
public List<ChinaDate> getCurrentDateInfo() {
WebClient webClient = null;
List<ChinaDate> dateList = null;
try {
DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd");
dateList = new ArrayList<ChinaDate>();
webClient = new WebClient();
HtmlPage page = webClient.getPage("http://hao.360.cn/rili/");
//最大等待60秒
for (int k = 0; k < 60; k++) {
if (!page.getElementById("M-dates").asText().equals(""))
break;
Thread.sleep(1000);
}
//睡了8秒,等待页面加载完成...,有时候,页面可能获取不到,不稳定()
//Thread.sleep(8000);
DomNodeList<HtmlElement> htmlElements = page.getElementById("M-dates").getElementsByTagName("li");
//System.out.println(htmlElements.size());
for (HtmlElement element : htmlElements) {
ChinaDate chinaDate = new ChinaDate();
List<HtmlElement> lunar = element.getElementsByAttribute("span", "class", "lunar");
List<HtmlElement> solar = element.getElementsByAttribute("div", "class", "solar");
chinaDate.setLunar(lunar.get(0).asText());
chinaDate.setSolar(solar.get(0).asText());
chinaDate.setSolarDate(dateFormat.parse(element.getAttribute("date")));
if (element.getAttribute("class").indexOf("vacation") != -1) {
chinaDate.setVacation(true);
chinaDate.setVacationName(this.getVocationName(htmlElements, element.getAttribute("date")));
}
if (element.getAttribute("class").indexOf("weekend") != -1
&& element.getAttribute("class").indexOf("last") == -1) {
chinaDate.setSaturday(true);
}
if (element.getAttribute("class").indexOf("last weekend") != -1) {
chinaDate.setSunday(true);
}
if (element.getAttribute("class").indexOf("work") != -1) {
chinaDate.setWorkFlag(true);
} else if (chinaDate.isSaturday() == false && chinaDate.isSunday() == false
&& chinaDate.isVacation() == false) {
chinaDate.setWorkFlag(true);
} else {
chinaDate.setWorkFlag(false);
}
dateList.add(chinaDate);
}
} catch (Exception e) {
e.printStackTrace();
System.out.println("get date from http://hao.360.cn/rili/ error~");
} finally {
webClient.close();
}
return dateList;
}
public ChinaDate getTodayInfo() {
List<ChinaDate> dateList = this.getCurrentDateInfo();
DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd");
for (ChinaDate date : dateList) {
if (dateFormat.format(date.getSolarDate()).equals(dateFormat.format(new Date()))) {
return date;
}
}
return new ChinaDate();
}
public static void main(String[] args) throws FailingHttpStatusCodeException, MalformedURLException, IOException, InterruptedException {
List<ChinaDate> dateList = new Main().getCurrentDateInfo();
ChinaDate today = new Main().getTodayInfo();
DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd");
System.out.println("本月详情:");
String yymm = new SimpleDateFormat("yyyy-MM").format(new Date()).toString();//
for (ChinaDate date : dateList) {
// System.out.println(dateFormat.format(date.getSolarDate()) + " " + date.getVacationName());
// System.out.println(dateFormat.format(date.getSolarDate()).replaceAll("/", "-") + " " + date.getVacationName());
String str = dateFormat.format(date.getSolarDate()).replaceAll("/", "-");
//INSERT INTO kqmk_redletter_day VALUES ( value1, value2,...valueN );
String jieri = date.getVacationName();
boolean status = jieri.contains("节");
int holidaystatus = 0;
if(status) {
holidaystatus = 1;
}
System.out.println("INSERT INTO kqmk_redletter_day(holiday,holiday_name,holiday_status,belong_yearmonth) VALUES(" + '"'+str +'"'+ "," +'"'+date.getVacationName()+'"'+ "," +holidaystatus+ "," + '"'+yymm+'"'+ ");");
}
// System.out.println("------------------------------------------------------------------------");
// System.out.println("今日详情:");
// System.out.println("日期:" + today.getSolarDate());
// System.out.println("农历:" + today.getLunar());
// System.out.println("公历:" + today.getSolar());
// System.out.println("假期名:" + today.getVacationName());
// System.out.println("是否周六:" + today.isSaturday());
// System.out.println("是否周日:" + today.isSunday());
// System.out.println("是否休假:" + today.isVacation());
// System.out.println("是否工作日:" + today.isWorkFlag());
// System.out.println("已发生的最近一次假期:" + Main.latestVocationName);
}
}
...@@ -763,7 +763,7 @@ public class KqglServiceImpl implements KqglService { ...@@ -763,7 +763,7 @@ public class KqglServiceImpl implements KqglService {
double gzsc = 0; double gzsc = 0;
long rest_time = 0; long rest_time = 0;
if(shif.getStartTime() != null && shif.getEndTime() != null) { if(shif.getStartTime() != null && !("").equals(shif.getStartTime()) && shif.getEndTime() != null && !("").equals(shif.getEndTime())) {
long kaishixiuxi = Long.valueOf(ClockInTool.dateToStamp(cardrepltime + " " +shif.getStartTime()+":00")); long kaishixiuxi = Long.valueOf(ClockInTool.dateToStamp(cardrepltime + " " +shif.getStartTime()+":00"));
long jieshuxiuxi = Long.valueOf(ClockInTool.dateToStamp(cardrepltime + " " +shif.getEndTime()+":00")); long jieshuxiuxi = Long.valueOf(ClockInTool.dateToStamp(cardrepltime + " " +shif.getEndTime()+":00"));
rest_time = (jieshuxiuxi - kaishixiuxi)/1000/60;//休息时间 rest_time = (jieshuxiuxi - kaishixiuxi)/1000/60;//休息时间
......
...@@ -13,6 +13,7 @@ import java.util.Map; ...@@ -13,6 +13,7 @@ import java.util.Map;
import javax.annotation.Resource; import javax.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
...@@ -23,8 +24,12 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -23,8 +24,12 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import cn.timer.api.bean.kqgl.AttendanceGroup; import cn.timer.api.bean.kqgl.AttendanceGroup;
import cn.timer.api.bean.kqgl.AttendanceReport; import cn.timer.api.bean.kqgl.AttendanceReport;
import cn.timer.api.bean.kqgl.AttendanceWeeklySch; import cn.timer.api.bean.kqgl.AttendanceWeeklySch;
...@@ -48,6 +53,7 @@ import cn.timer.api.bean.xcgl.XcglAssoZxfjkc; ...@@ -48,6 +53,7 @@ import cn.timer.api.bean.xcgl.XcglAssoZxfjkc;
import cn.timer.api.bean.yggl.YgglMainEmp; import cn.timer.api.bean.yggl.YgglMainEmp;
import cn.timer.api.config.annotation.CurrentUser; import cn.timer.api.config.annotation.CurrentUser;
import cn.timer.api.config.annotation.UserBean; import cn.timer.api.config.annotation.UserBean;
import cn.timer.api.config.validation.ValidList;
import cn.timer.api.dao.kqgl.AttendanceGroupMapper; import cn.timer.api.dao.kqgl.AttendanceGroupMapper;
import cn.timer.api.dao.kqgl.AttendanceWeeklySchMapper; import cn.timer.api.dao.kqgl.AttendanceWeeklySchMapper;
import cn.timer.api.dao.kqgl.PunchCardDetailsMapper; import cn.timer.api.dao.kqgl.PunchCardDetailsMapper;
...@@ -97,10 +103,12 @@ import cn.timer.api.dto.xcgl.SalaryGroupGroupingDto; ...@@ -97,10 +103,12 @@ import cn.timer.api.dto.xcgl.SalaryGroupGroupingDto;
import cn.timer.api.dto.xcgl.SalaryItemRulesDto; import cn.timer.api.dto.xcgl.SalaryItemRulesDto;
import cn.timer.api.dto.xcgl.SalaryPersonFieldDto; import cn.timer.api.dto.xcgl.SalaryPersonFieldDto;
import cn.timer.api.dto.xcgl.SearchSalariedPeopleDto; import cn.timer.api.dto.xcgl.SearchSalariedPeopleDto;
import cn.timer.api.dto.xcgl.SpecialDeductionDto;
import cn.timer.api.dto.xcgl.SwitchSalaryDateDto; import cn.timer.api.dto.xcgl.SwitchSalaryDateDto;
import cn.timer.api.dto.xcgl.TjSalaryItemDot; import cn.timer.api.dto.xcgl.TjSalaryItemDot;
import cn.timer.api.dto.xcgl.XcglAssoOptionDto; import cn.timer.api.dto.xcgl.XcglAssoOptionDto;
import cn.timer.api.dto.xcgl.YdMobilePacketDto; import cn.timer.api.dto.xcgl.YdMobilePacketDto;
import cn.timer.api.dto.yggl.AddygdaDto;
import cn.timer.api.utils.DateUtil; import cn.timer.api.utils.DateUtil;
import cn.timer.api.utils.ResponseResult; import cn.timer.api.utils.ResponseResult;
import cn.timer.api.utils.Result; import cn.timer.api.utils.Result;
...@@ -1920,8 +1928,6 @@ public class SalaryManagementController { ...@@ -1920,8 +1928,6 @@ public class SalaryManagementController {
/** /**
* 获取附加扣除数据 * 获取附加扣除数据
*/ */
// @GetMapping(value = "/obtainidedu")
// @ApiOperation(value = "获取附加扣除数据", httpMethod = "GET", notes = "接口发布说明")
@PostMapping(value = "/obtainidedu") @PostMapping(value = "/obtainidedu")
@ApiOperation(value = "获取附加扣除数据", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "获取附加扣除数据", httpMethod = "POST", notes = "接口发布说明")
public ResponseResult ObtainAdditionalDeduction(@CurrentUser UserBean userBean,@RequestBody SearchSalariedPeopleDto search) { public ResponseResult ObtainAdditionalDeduction(@CurrentUser UserBean userBean,@RequestBody SearchSalariedPeopleDto search) {
...@@ -1935,55 +1941,35 @@ public class SalaryManagementController { ...@@ -1935,55 +1941,35 @@ public class SalaryManagementController {
search.setStatus("3"); search.setStatus("3");
} }
List<AdditionalDeductionDto> fjkclist = xcglassozxfjkcmapper.selectAdditionalDeduction(search); List<AdditionalDeductionDto> fjkclist = xcglassozxfjkcmapper.selectAdditionalDeductiontwo(search);
return new ResponseResult().success("获取附加扣除数据成功", fjkclist); return new ResponseResult().success("获取附加扣除数据成功", fjkclist);
} }
/**
* 查询列表-获取附加扣除数据-分页
*/
@PostMapping(value = "/select_leave_rules")
@ApiOperation(value = "获取附加扣除数据-分页", httpMethod = "POST", notes = "接口发布说明")
public Result<Object> selectleaverules(@CurrentUser UserBean userBean, @RequestBody SearchSalariedPeopleDto search) {
IPage<AdditionalDeductionDto> page = new Page<AdditionalDeductionDto>(
search.getCurrentPage() == null ? 1 : search.getCurrentPage(),
search.getTotalPage() == null ? 10 : search.getTotalPage());
search.setOrgcode(userBean.getOrgCode());
if(("0").equals(search.getStatus())) {//全部
search.setStatus("");
}else if(("1").equals(search.getStatus())) {//在职
search.setStatus("0");
}else {
search.setStatus("3");
}
IPage<AdditionalDeductionDto> pageAs = xcglassozxfjkcmapper.selectAdditionalDeduction(page, search);
List<AdditionalDeductionDto> listAs = pageAs.getRecords();
return ResultUtil.data(pageAs, listAs, "操作成功!");
}
// @PostMapping(value = "/programme")
// @ApiOperation(value = "获取附加扣除数据搜索/分页", httpMethod = "POST", notes = "接口发布说明")
// public Result<Object> programme(@CurrentUser UserBean userBean,@RequestBody AdditionalkcDto kcdto) {
//
// String n = kcdto.getName();
// int s = kcdto.getState();
// String d = kcdto.getDate();
//
//
// /*
// * Page<AdditionalDeductionDto> page = new Page<AdditionalDeductionDto>(
// * kcdto.getCurrentPage() == null ? 1 : kcdto.getCurrentPage(),
// * kcdto.getTotalPage() == null ? 10 : kcdto.getTotalPage());
// */
//
// PageHelper.startPage(kcdto.getCurrentPage() == null ? 1 : kcdto.getCurrentPage(), kcdto.getTotalPage() == null ? 10 : kcdto.getTotalPage());
//
//
// //List<AdditionalDeductionDto> fjkclist = xcglassozxfjkcmapper.selectAdditionalDeduction(userBean.getOrgCode());
//
// Page<AdditionalDeductionDto> fjkcpage = xcglassozxfjkcmapper.selectAdditionalDeduction(userBean.getOrgCode());
//
// List<AdditionalDeductionDto> fjkclist = fjkcpage.getRecords();
//
// fjkcpage.getCurrent();
// fjkcpage.getPages();
// fjkcpage.getTotal();
// fjkcpage.getSize();
//
//
//// QueryWrapper<SbgjjAssoCbfa> queryWrapper = new QueryWrapper<>();
//// queryWrapper.eq("qyid",userBean.getOrgCode()).and(!StrUtil.hasBlank(c), wq -> wq.likeRight("cbcs", c));
////
//// IPage<SbgjjAssoCbfa> sbgjjassocbfaPage = SbgjjAssoCbfa.builder().build().selectPage(page, queryWrapper);
////
//// IPage<AdditionalDeductionDto> sbgjjassocbfaPage =
//// List<SbgjjAssoCbfa> sbgjjassocbfaEmps = sbgjjassocbfaPage.getRecords();
//// sbgjjassocbfaPage.getCurrent();
//// sbgjjassocbfaPage.getPages();
//// sbgjjassocbfaPage.getTotal();
//// sbgjjassocbfaPage.getSize();
//
// return ResultUtil.data2(fjkcpage, fjkclist, "方案搜索成功");
// }
/** /**
...@@ -2197,6 +2183,91 @@ public class SalaryManagementController { ...@@ -2197,6 +2183,91 @@ public class SalaryManagementController {
return new ResponseResult().success("成功", gztz); return new ResponseResult().success("成功", gztz);
} }
/**
* 导入专项附加扣除
*/
@PostMapping(value = "/import_special_additional_deduction")
@ApiOperation(value = "导入专项附加扣除", httpMethod = "POST", notes = "接口发布说明")
public Result<JSONObject> importSpecialAdditionalDeduction(@CurrentUser UserBean userBean,
@Validated @RequestBody ValidList<SpecialDeductionDto> specialdeductiondto) throws Exception {
Integer orgCode = userBean.getOrgCode();
for (SpecialDeductionDto spec : specialdeductiondto) {
String name = spec.getName();
String phone = spec.getPhone();
String date = spec.getDate();
YgglMainEmp ygl = YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getName, name)
.eq(YgglMainEmp::getPhone, phone).eq(YgglMainEmp::getOrgCode, orgCode));
XcglAssoZxfjkc xcg = XcglAssoZxfjkc.builder().build().selectOne(new QueryWrapper<XcglAssoZxfjkc>().lambda().eq(XcglAssoZxfjkc::getTaxmonth, date)
.eq(XcglAssoZxfjkc::getQyid, userBean.getOrgCode()).eq(XcglAssoZxfjkc::getUserid, ygl.getEmpNum()));
if(xcg == null) {
XcglAssoZxfjkc xcglas = XcglAssoZxfjkc.builder().build();
xcglas.setUserid(ygl.getEmpNum());
xcglas.setTaxmonth(date);
xcglas.setChildrenedu(Double.valueOf(spec.getZljy()));//子女教育
xcglas.setHouseloans(Double.valueOf(spec.getZfdk()));//住房贷款利息
xcglas.setHouserents(Double.valueOf(spec.getZfzj()));//住房租金
xcglas.setSupportolder(Double.valueOf(spec.getSylr()));//赡养老人
xcglas.setContinueedu(Double.valueOf(spec.getJxjy()));//继续教育
BigDecimal num1 = new BigDecimal(spec.getZljy());
BigDecimal num2 = new BigDecimal(spec.getZfdk());
double result1 = num1.add(num2).doubleValue();
BigDecimal num3 = new BigDecimal(result1);
BigDecimal num4 = new BigDecimal(spec.getZfzj());
double result2 = num3.add(num4).doubleValue();
BigDecimal num5 = new BigDecimal(result2);
BigDecimal num6 = new BigDecimal(spec.getSylr());
double result3 = num5.add(num6).doubleValue();
BigDecimal num7 = new BigDecimal(result3);
BigDecimal num8 = new BigDecimal(spec.getJxjy());
double result = num7.add(num8).doubleValue();
xcglas.setTotalmoney(result);//累计专项附加扣除
xcglas.setQyid(userBean.getOrgCode());
xcglas.setAddtime(new Date().getTime());
xcglassozxfjkcmapper.insertXcglAssoZxfjkc(xcglas);
}else {
XcglAssoZxfjkc fjkc = XcglAssoZxfjkc.builder().build();
fjkc.setId(xcg.getId());
fjkc.setChildrenedu(Double.valueOf(spec.getZljy()));//子女教育
fjkc.setHouseloans(Double.valueOf(spec.getZfdk()));//住房贷款利息
fjkc.setHouserents(Double.valueOf(spec.getZfzj()));//住房租金
fjkc.setSupportolder(Double.valueOf(spec.getSylr()));//赡养老人
fjkc.setContinueedu(Double.valueOf(spec.getJxjy()));//继续教育
BigDecimal num1 = new BigDecimal(spec.getZljy());
BigDecimal num2 = new BigDecimal(spec.getZfdk());
double result1 = num1.add(num2).doubleValue();
BigDecimal num3 = new BigDecimal(result1);
BigDecimal num4 = new BigDecimal(spec.getZfzj());
double result2 = num3.add(num4).doubleValue();
BigDecimal num5 = new BigDecimal(result2);
BigDecimal num6 = new BigDecimal(spec.getSylr());
double result3 = num5.add(num6).doubleValue();
BigDecimal num7 = new BigDecimal(result3);
BigDecimal num8 = new BigDecimal(spec.getJxjy());
double result = num7.add(num8).doubleValue();
fjkc.setTotalmoney(Double.valueOf(result));//累计专项附加扣除
xcglassozxfjkcmapper.updateXcglAssoZxfjkc(fjkc);
}
}
return ResultUtil.success("成功");
}
/****************************************************************************/ /****************************************************************************/
/****************************************************************************/ /****************************************************************************/
......
...@@ -248,10 +248,12 @@ public class YgglController { ...@@ -248,10 +248,12 @@ public class YgglController {
public Result<Object> addygda(@CurrentUser UserBean userBean, @Validated @RequestBody AddygdaDto addygdaDto) public Result<Object> addygda(@CurrentUser UserBean userBean, @Validated @RequestBody AddygdaDto addygdaDto)
throws Exception { throws Exception {
Integer orgCode = userBean.getOrgCode(); Integer orgCode = userBean.getOrgCode();
String customNum = addygdaDto.getCustomNum();//自定义工号
String name = addygdaDto.getName(); String name = addygdaDto.getName();
String phone = addygdaDto.getPhone(); String phone = addygdaDto.getPhone();
Integer zjType = addygdaDto.getZjType(); Integer zjType = addygdaDto.getZjType();
String zjNum = addygdaDto.getZjNum(); String zjNum = addygdaDto.getZjNum();
int attgroupid = addygdaDto.getAttgroupid();//考勤组id
boolean isvalid = true; boolean isvalid = true;
switch (zjType) { switch (zjType) {
case 0: case 0:
...@@ -306,7 +308,11 @@ public class YgglController { ...@@ -306,7 +308,11 @@ public class YgglController {
.status(CommonEnum.U_STS_ON.getType()).build().insert(); .status(CommonEnum.U_STS_ON.getType()).build().insert();
ygglMainEmp = YgglMainEmp.builder().name(name).phone(phone).zjType(zjType).zjNum(zjNum).jobType(jobType) ygglMainEmp = YgglMainEmp.builder().name(name).phone(phone).zjType(zjType).zjNum(zjNum).jobType(jobType)
.jobStatus(jobStatus.SHIYONG.getType()).rzTime(rzTime).syq(syq).sex(sex) .jobStatus(jobStatus.SHIYONG.getType()).rzTime(rzTime).syq(syq).sex(sex)
.empNum(login.getId()).orgCode(orgCode).bmgwId(bmgwId).build(); .empNum(login.getId()).orgCode(orgCode).bmgwId(bmgwId).customNum(customNum).build();
if(addygdaDto.getAttgroupid() != null) {
KqglAssoYhkqz.builder().kqzid(attgroupid).userid(login.getId()).qyid(userBean.getOrgCode()).build().insert();
}
if(syq == 0) { if(syq == 0) {
ygglMainEmp.setZzTime(rzTime); ygglMainEmp.setZzTime(rzTime);
......
...@@ -33,7 +33,7 @@ public interface PunchRecordMapper { ...@@ -33,7 +33,7 @@ public interface PunchRecordMapper {
PunchRecord MaintenancePunchCard(Long start,Long end,Integer userId); PunchRecord MaintenancePunchCard(Long start,Long end,Integer userId);
List<PunchRecord> getMaintenancePunchCardList(Long start,Long end,Integer userId); List<PunchRecord> getMaintenancePunchCardList(Long start,Long end,Integer userId,Integer qyid);
List<PunchRecord> selFuzzyOriginalAttendance(AttendanceDetails attendancedetails); List<PunchRecord> selFuzzyOriginalAttendance(AttendanceDetails attendancedetails);
......
package cn.timer.api.dao.kqmk;
import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.bean.kqmk.KqmkRedletterDay;
/**
* 节假日
*
* @author LAL 2020-09-22
*/
@Repository
public interface KqmkRedletterDayMapper extends BaseMapper<KqmkRedletterDay> {
}
package cn.timer.api.dao.xcgl; package cn.timer.api.dao.xcgl;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import cn.timer.api.bean.xcgl.XcglAssoZxfjkc; import cn.timer.api.bean.xcgl.XcglAssoZxfjkc;
import cn.timer.api.dto.kqmk.AttqueryCriteriaDto;
import cn.timer.api.dto.kqmk.KqglMainKqzDto;
import cn.timer.api.dto.xcgl.AdditionalDeductionDto; import cn.timer.api.dto.xcgl.AdditionalDeductionDto;
import cn.timer.api.dto.xcgl.SearchSalariedPeopleDto; import cn.timer.api.dto.xcgl.SearchSalariedPeopleDto;
...@@ -19,7 +23,11 @@ public interface XcglAssoZxfjkcMapper extends BaseMapper<XcglAssoZxfjkc> { ...@@ -19,7 +23,11 @@ public interface XcglAssoZxfjkcMapper extends BaseMapper<XcglAssoZxfjkc> {
int insertXcglAssoZxfjkc(XcglAssoZxfjkc xcglassozxfjkc); int insertXcglAssoZxfjkc(XcglAssoZxfjkc xcglassozxfjkc);
List<AdditionalDeductionDto> selectAdditionalDeduction(SearchSalariedPeopleDto searchsalariedpeopledto); List<AdditionalDeductionDto> selectAdditionalDeductiontwo(SearchSalariedPeopleDto searchsalariedpeopledto);
int updateXcglAssoZxfjkc(XcglAssoZxfjkc xcglassozxfjkc); int updateXcglAssoZxfjkc(XcglAssoZxfjkc xcglassozxfjkc);
IPage<AdditionalDeductionDto> selectAdditionalDeduction(IPage<AdditionalDeductionDto> page,@Param("param") SearchSalariedPeopleDto searchsalariedpeopledto);
} }
...@@ -16,6 +16,11 @@ public class MonthlyCheckoutSheetDto implements Serializable { ...@@ -16,6 +16,11 @@ public class MonthlyCheckoutSheetDto implements Serializable {
private static final long serialVersionUID = 4192763674865997955L; private static final long serialVersionUID = 4192763674865997955L;
String empname; String empname;
int usernum; int usernum;
String dept;
String post;
String rztime;
String totalmoney; String totalmoney;
String gsjltotal; String gsjltotal;
String grjltotal; String grjltotal;
......
...@@ -16,4 +16,5 @@ public class MonthlyStatementDto implements Serializable {/** ...@@ -16,4 +16,5 @@ public class MonthlyStatementDto implements Serializable {/**
int orgcode; int orgcode;
String title; String title;
String mon; String mon;
int usernum;
} }
...@@ -27,7 +27,7 @@ public class MySummaryQueryDto extends Page{ ...@@ -27,7 +27,7 @@ public class MySummaryQueryDto extends Page{
@ApiModelProperty(value = "关键字 标题/审批人名称/审批总汇id", example = "") @ApiModelProperty(value = "关键字 标题/审批人名称/审批总汇id", example = "")
private String query; private String query;
@ApiModelProperty(value = "状态 0审批中 1审批撤销 2审批通过/审批完成 3审批拒绝", example = "0") @ApiModelProperty(value = "状态 0审批中 1审批撤销 2审批通过/审批完成 3审批拒绝 4 已审批 5全部", example = "0")
private Integer sts; private Integer sts;
@ApiModelProperty(value = "开始时间 ", example = "") @ApiModelProperty(value = "开始时间 ", example = "")
...@@ -39,7 +39,7 @@ public class MySummaryQueryDto extends Page{ ...@@ -39,7 +39,7 @@ public class MySummaryQueryDto extends Page{
@NotNull(message = ValidationMsg.NOTNULL) @NotNull(message = ValidationMsg.NOTNULL)
@DecimalMax(value = "3",message = ValidationMsg.DECIMALMAX+" 只能为 0我发起的 1抄送我的 2我审批的 3全部") @DecimalMax(value = "3",message = ValidationMsg.DECIMALMAX+" 只能为 0我发起的 1抄送我的 2我审批的 3全部")
@DecimalMin(value = "0",message = ValidationMsg.DECIMALMIN+" 只能为 0我发起的 1抄送我的 2我审批的 3全部") @DecimalMin(value = "0",message = ValidationMsg.DECIMALMIN+" 只能为 0我发起的 1抄送我的 2我审批的 3全部")
@ApiModelProperty(value = "0我发起的 1抄送我的 2我审批的", example = "0") @ApiModelProperty(value = "0我发起的 1抄送我的 2我审批的 3全部", example = "0")
private Integer type; private Integer type;
} }
...@@ -15,7 +15,9 @@ public class AdditionalDeductionDto implements Serializable { ...@@ -15,7 +15,9 @@ public class AdditionalDeductionDto implements Serializable {
*/ */
private static final long serialVersionUID = -3829908201010471272L; private static final long serialVersionUID = -3829908201010471272L;
int zxfjid; int zxfjid;
String date;
String name; String name;
String phone;
String empNum; String empNum;
int zljy; int zljy;
int zfdk; int zfdk;
......
...@@ -2,6 +2,7 @@ package cn.timer.api.dto.xcgl; ...@@ -2,6 +2,7 @@ package cn.timer.api.dto.xcgl;
import java.io.Serializable; import java.io.Serializable;
import cn.timer.api.utils.Page;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
...@@ -15,7 +16,7 @@ import lombok.NoArgsConstructor; ...@@ -15,7 +16,7 @@ import lombok.NoArgsConstructor;
@Builder @Builder
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
public class SearchSalariedPeopleDto implements Serializable { public class SearchSalariedPeopleDto extends Page {
private static final long serialVersionUID = 6251994337286870380L; private static final long serialVersionUID = 6251994337286870380L;
......
package cn.timer.api.dto.xcgl;
import java.io.Serializable;
import java.util.Date;
import com.alibaba.fastjson.annotation.JSONField;
import cn.timer.api.utils.Page;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SpecialDeductionDto extends Page implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "时间", example = "1")
private String date;
// @JSONField(format="yyyy-MM")
// @ApiModelProperty(value="时间 ",example="时间")
// private Date date;
@ApiModelProperty(value = "姓名", example = "1")
private String name;
@ApiModelProperty(value = "电话号码", example = "1")
private String phone;
@ApiModelProperty(value = "子女教育", example = "1")
private String zljy;
@ApiModelProperty(value = "住房贷款利息", example = "1")
private String zfdk;
@ApiModelProperty(value = "住房租金", example = "86")
private String zfzj;
@ApiModelProperty(value = "赡养老人", example = "赡养老人")
private String sylr;
@ApiModelProperty(value = "继续教育", example = "A")
private String jxjy;
@ApiModelProperty(value = "累计专项附加扣除", example = "A")
private String lj;
}
...@@ -73,5 +73,11 @@ public class AddygdaDto extends Page implements Serializable{ ...@@ -73,5 +73,11 @@ public class AddygdaDto extends Page implements Serializable{
@ApiModelProperty(value="部门岗位id",example="0") @ApiModelProperty(value="部门岗位id",example="0")
private Integer bmgwId; private Integer bmgwId;
@ApiModelProperty(value="自定义工号",example="1001")
private String customNum;
@ApiModelProperty(value="考勤组id",example="0")
private Integer attgroupid;
} }
...@@ -388,6 +388,8 @@ ...@@ -388,6 +388,8 @@
and dkjl.user_id = #{userId,jdbcType=INTEGER} and dkjl.user_id = #{userId,jdbcType=INTEGER}
and dkjl.`status` != 0 and dkjl.`status` != 0
and dkjl.sort != 0 and dkjl.sort != 0
and dkjl.qyid = #{qyid}
and dkjl.dkmxid != 0
ORDER BY dkjl.id ASC ORDER BY dkjl.id ASC
</select> </select>
......
...@@ -71,21 +71,6 @@ ...@@ -71,21 +71,6 @@
</sql> </sql>
<select id="selectPageByQueryLeaveBalance" resultMap="LeaveBalanceMap"> <select id="selectPageByQueryLeaveBalance" resultMap="LeaveBalanceMap">
<!-- SELECT emp.emp_num as empnum,
emp.`name` as empname,
IFNULL(c.name,'') as department,
IFNULL(emp.rz_time,'') as rztime,
yz.leave_rules_id as leaverulesid,
yz.balancedays
from yggl_main_emp emp
LEFT JOIN zzgl_bmgw_m as gw on gw.id = emp.bmgw_id
LEFT JOIN zzgl_bmgw_m as c ON c.id = gw.up_id
LEFT JOIN (select bal.leave_rules_id,bal.userid,SUM(bal.balance_days) as balancedays
from kqgl_asso_leave_balance bal
where bal.org_code = #{param.orgCode}
GROUP BY bal.userid,bal.leave_rules_id) as yz on yz.userid = emp.emp_num
where emp.org_code = #{param.orgCode} -->
SELECT emp.emp_num as empnum, SELECT emp.emp_num as empnum,
emp.`name` as empname, emp.`name` as empname,
emp.org_code as orgcode, emp.org_code as orgcode,
...@@ -102,9 +87,11 @@ ...@@ -102,9 +87,11 @@
c.name like CONCAT('%',#{param.query},'%')) c.name like CONCAT('%',#{param.query},'%'))
</if> </if>
<if test="param.deptid != null and param.deptid != ''"> <if test="param.deptid != null and param.deptid != ''">
and c.id = #{param.deptid} and c.id in (select m.id from zzgl_bmgw_m m where m.up_id = #{param.deptid}) or (c.id =#{param.deptid})
</if> </if>
<!-- ORDER BY emp.emp_num DESC <!--and c.id = #{param.deptid}
ORDER BY emp.emp_num DESC
LEFT JOIN kqgl_asso_leave_employee_balance as yz on yz.userid = emp.emp_num LEFT JOIN kqgl_asso_leave_employee_balance as yz on yz.userid = emp.emp_num
yz.leave_rules_id as leaverulesid, yz.leave_rules_id as leaverulesid,
yz.balance_days as balancedays--> yz.balance_days as balancedays-->
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.timer.api.dao.kqmk.KqmkRedletterDayMapper">
<resultMap id="BaseResultMap" type="cn.timer.api.bean.kqmk.KqmkRedletterDay" >
<id column="id" property="id" />
<result column="holiday" property="holiday" />
<result column="holiday_name" property="holidayName" />
<result column="holiday_status" property="holidayStatus" />
<result column="belong_yearmonth" property="belongYearmonth" />
</resultMap>
</mapper>
\ No newline at end of file
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
<result column="qyid" property="qyid" /> <result column="qyid" property="qyid" />
<result column="sbfaid" property="sbfaid" /> <result column="sbfaid" property="sbfaid" />
<result column="gjjfaid" property="gjjfaid" /> <result column="gjjfaid" property="gjjfaid" />
<result column="is_use" property="isUse" />
</resultMap> </resultMap>
<resultMap id="InsuredPersonnelMap" type="cn.timer.api.dto.sbgjj.InsuredPersonnelDto" > <resultMap id="InsuredPersonnelMap" type="cn.timer.api.dto.sbgjj.InsuredPersonnelDto" >
...@@ -122,6 +123,13 @@ ...@@ -122,6 +123,13 @@
gjjfaid gjjfaid
</sql> </sql>
<sql id="salary_List">
id,org_code,emp_num,age,appopenid,area,birthday,blood_type,bmgw_id,province_id,province,district_id,district,city_id,
city,edu,english_name,head_url,hk_address,hk_type,is_jrkq,is_married,is_pregnant,jg_id,jg,job_status,job_type,language,
address,mpopenid,mz,name,openid,job_num,password,phone,qq,rz_time,sex,sfzyx_time,sjzz_time,syq,unionid,wechat,work_address,work_email,
work_phone,zj_num,zj_type,zpqd,zy,zz_remark,zz_time,zzmm,update_man,update_time,is_manager,before_leaving_sts,bmgw_name,custom_num
</sql>
<sql id="Base_Column_List_Alias"> <sql id="Base_Column_List_Alias">
id SbgjjAdminCbry_id, id SbgjjAdminCbry_id,
user_num SbgjjAdminCbry_user_num, user_num SbgjjAdminCbry_user_num,
...@@ -146,10 +154,11 @@ ...@@ -146,10 +154,11 @@
</sql> </sql>
<select id="EmployeeListByorgCode" resultMap="YgglEmpInfoMap"> <select id="EmployeeListByorgCode" resultMap="YgglEmpInfoMap">
select * from yggl_main_emp select <include refid="salary_List" />
from yggl_main_emp
where org_code = #{orgCode,jdbcType=VARCHAR} where org_code = #{orgCode,jdbcType=VARCHAR}
and job_status = 1 and job_status != 3
and emp_num not in (select cbry.user_num from sbgjj_admin_cbry cbry where cbry.qyid = #{orgCode,jdbcType=VARCHAR}) and emp_num not in (select cbry.user_num from sbgjj_admin_cbry cbry where cbry.qyid = #{orgCode,jdbcType=VARCHAR})
</select> </select>
...@@ -277,7 +286,10 @@ ...@@ -277,7 +286,10 @@
sbfaid, sbfaid,
</if> </if>
<if test ='null != gjjfaid'> <if test ='null != gjjfaid'>
gjjfaid gjjfaid,
</if>
<if test ='null != isUse'>
is_use
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
...@@ -336,7 +348,10 @@ ...@@ -336,7 +348,10 @@
#{sbfaid}, #{sbfaid},
</if> </if>
<if test ='null != gjjfaid'> <if test ='null != gjjfaid'>
#{gjjfaid} #{gjjfaid},
</if>
<if test ='null != isUse'>
#{isUse}
</if> </if>
</trim> </trim>
</insert> </insert>
......
...@@ -10,40 +10,21 @@ ...@@ -10,40 +10,21 @@
<result column="cbfzmx_id" property="cbfzmxId" /> <result column="cbfzmx_id" property="cbfzmxId" />
<result column="coverage_name" property="coverageName" /> <result column="coverage_name" property="coverageName" />
<result column="personal_amount" property="personalAmount" /> <result column="personal_amount" property="personalAmount" />
<result column="personal_proportion" property="personalProportion" />
<result column="company_amount" property="companyAmount" /> <result column="company_amount" property="companyAmount" />
<result column="company_proportion" property="companyProportion" />
<result column="xz_type" property="xzType" /> <result column="xz_type" property="xzType" />
<result column="org_code" property="orgCode" /> <result column="org_code" property="orgCode" />
<result column="addtime" property="addtime" /> <result column="addtime" property="addtime" />
</resultMap>
<sql id="Base_Column_List">
id,
user_id,
attribution_time,
cbfzmx_id,
coverage_name,
personal_amount,
company_amount,
xz_type,
org_code,
addtime
</sql>
<sql id="Base_Column_List_Alias"> <result column="cbfns" property="cbfns" />
id SbgjjAssoDetailed_id, <result column="sbjss" property="sbjss" />
user_id SbgjjAssoDetailed_user_id, <result column="gjjjss" property="gjjjss" />
attribution_time SbgjjAssoDetailed_attribution_time, </resultMap>
cbfzmx_id SbgjjAssoDetailed_cbfzmx_id,
coverage_name SbgjjAssoDetailed_coverage_name,
personal_amount SbgjjAssoDetailed_personal_amount,
company_amount SbgjjAssoDetailed_company_amount,
xz_type SbgjjAssoDetailed_xz_type,
org_code SbgjjAssoDetailed_org_code,
addtime SbgjjAssoDetailed_addtime
</sql>
<insert id="insertsbgjjassodetailedList" parameterType="java.util.List" > <insert id="insertsbgjjassodetailedList" parameterType="java.util.List" >
insert into sbgjj_asso_detailed (user_id,attribution_time,cbfzmx_id,coverage_name,personal_amount,company_amount,xz_type,org_code,addtime) insert into sbgjj_asso_detailed (user_id,attribution_time,cbfzmx_id,coverage_name,personal_amount,personal_proportion,company_amount,company_proportion,xz_type,org_code,addtime,cbfns,sbjss,gjjjss)
<foreach collection="list" item="item" index="index" open="values " close="" separator=","> <foreach collection="list" item="item" index="index" open="values " close="" separator=",">
( (
<if test="item.userId != null" > <if test="item.userId != null" >
...@@ -61,9 +42,15 @@ ...@@ -61,9 +42,15 @@
<if test="item.personalAmount != null" > <if test="item.personalAmount != null" >
#{item.personalAmount}, #{item.personalAmount},
</if> </if>
<if test="item.personalProportion != null" >
#{item.personalProportion},
</if>
<if test="item.companyAmount != null" > <if test="item.companyAmount != null" >
#{item.companyAmount}, #{item.companyAmount},
</if> </if>
<if test="item.companyProportion != null" >
#{item.companyProportion},
</if>
<if test="item.xzType != null" > <if test="item.xzType != null" >
#{item.xzType}, #{item.xzType},
</if> </if>
...@@ -71,115 +58,20 @@ ...@@ -71,115 +58,20 @@
#{item.orgCode}, #{item.orgCode},
</if> </if>
<if test="item.addtime != null" > <if test="item.addtime != null" >
#{item.addtime} #{item.addtime},
</if>
)
</foreach>
</insert>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.sbgjj.SbgjjAssoDetailed">
INSERT INTO sbgjj_asso_detailed
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != userId'>
user_id,
</if>
<if test ='null != attributionTime'>
attribution_time,
</if>
<if test ='null != cbfzmxId'>
cbfzmx_id,
</if>
<if test ='null != coverageName'>
coverage_name,
</if>
<if test ='null != personalAmount'>
personal_amount,
</if>
<if test ='null != companyAmount'>
company_amount,
</if> </if>
<if test ='null != xzType'> <if test="item.cbfns != null" >
xz_type, #{item.cbfns},
</if> </if>
<if test ='null != orgCode'> <if test="item.sbjss != null" >
org_code, #{item.sbjss},
</if> </if>
<if test ='null != addtime'> <if test="item.gjjjss != null" >
addtime #{item.gjjjss}
</if> </if>
</trim> )
<trim prefix="values (" suffix=")" suffixOverrides=","> </foreach>
<if test ='null != userId'>
#{userId},
</if>
<if test ='null != attributionTime'>
#{attributionTime},
</if>
<if test ='null != cbfzmxId'>
#{cbfzmxId},
</if>
<if test ='null != coverageName'>
#{coverageName},
</if>
<if test ='null != personalAmount'>
#{personalAmount},
</if>
<if test ='null != companyAmount'>
#{companyAmount},
</if>
<if test ='null != xzType'>
#{xzType},
</if>
<if test ='null != orgCode'>
#{orgCode},
</if>
<if test ='null != addtime'>
#{addtime}
</if>
</trim>
</insert> </insert>
<delete id="delete" >
DELETE FROM sbgjj_asso_detailed
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.sbgjj.SbgjjAssoDetailed">
UPDATE sbgjj_asso_detailed
<set>
<if test ='null != userId'>user_id = #{userId},</if>
<if test ='null != attributionTime'>attribution_time = #{attributionTime},</if>
<if test ='null != cbfzmxId'>cbfzmx_id = #{cbfzmxId},</if>
<if test ='null != coverageName'>coverage_name = #{coverageName},</if>
<if test ='null != personalAmount'>personal_amount = #{personalAmount},</if>
<if test ='null != companyAmount'>company_amount = #{companyAmount},</if>
<if test ='null != xzType'>xz_type = #{xzType},</if>
<if test ='null != orgCode'>org_code = #{orgCode},</if>
<if test ='null != addtime'>addtime = #{addtime}</if>
</set>
WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM sbgjj_asso_detailed
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM sbgjj_asso_detailed
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM sbgjj_asso_detailed
</select>
-->
</mapper> </mapper>
\ No newline at end of file
...@@ -88,6 +88,9 @@ ...@@ -88,6 +88,9 @@
<select id="MonthlycheckoutsheetList" resultMap="MonthlyCheckoutSheetMap"> <select id="MonthlycheckoutsheetList" resultMap="MonthlyCheckoutSheetMap">
select emp.`name` as empname, select emp.`name` as empname,
yjzd.user_num as usernum, yjzd.user_num as usernum,
bmgw.dept,
bmgw.post,
emp.rz_time as rztime,
yjzd.totalmoney, yjzd.totalmoney,
yjzd.gsjltotal, yjzd.gsjltotal,
yjzd.grjltotal, yjzd.grjltotal,
...@@ -105,14 +108,20 @@ ...@@ -105,14 +108,20 @@
yjzd.cbryid yjzd.cbryid
from sbgjj_asso_yjzd yjzd from sbgjj_asso_yjzd yjzd
LEFT JOIN yggl_main_emp as emp on emp.emp_num = yjzd.user_num LEFT JOIN yggl_main_emp as emp on emp.emp_num = yjzd.user_num
LEFT JOIN (select m.name as post,um.name as dept,m.id as mid
from zzgl_bmgw_m m
left join zzgl_bmgw_m um on um.id = m.up_id
) as bmgw on bmgw.mid = emp.bmgw_id
where yjzd.cbryid in (select cbry.id from sbgjj_admin_cbry cbry where yjzd.cbryid in (select cbry.id from sbgjj_admin_cbry cbry
where cbry.state = 1 where cbry.is_use = 1
and cbry.qyid = #{orgcode}) and cbry.qyid = #{orgcode})
and yjzd.zymonth = #{mon} and yjzd.zymonth = #{mon}
and emp.org_code = #{orgcode} and emp.org_code = #{orgcode}
<if test="title != null" > <if test="title != null" >
and (emp.`name` like CONCAT('%',#{title},'%') or emp.emp_num = #{title}) and (emp.`name` like CONCAT('%',#{title},'%') or emp.emp_num = #{title})
</if> </if>
<!-- cbry.state = 1 ==> 1=1 -->
</select> </select>
<select id="zcjsjginsurance" resultMap="BaseResultMap"> <select id="zcjsjginsurance" resultMap="BaseResultMap">
......
...@@ -19,7 +19,9 @@ ...@@ -19,7 +19,9 @@
<resultMap id="AdditionalDeductionMap" type="cn.timer.api.dto.xcgl.AdditionalDeductionDto" > <resultMap id="AdditionalDeductionMap" type="cn.timer.api.dto.xcgl.AdditionalDeductionDto" >
<result column="zxfjid" property="zxfjid" /> <result column="zxfjid" property="zxfjid" />
<result column="date" property="date" />
<result column="name" property="name" /> <result column="name" property="name" />
<result column="phone" property="phone" />
<result column="empNum" property="empNum" /> <result column="empNum" property="empNum" />
<result column="zljy" property="zljy" /> <result column="zljy" property="zljy" />
<result column="zfdk" property="zfdk" /> <result column="zfdk" property="zfdk" />
...@@ -60,7 +62,36 @@ ...@@ -60,7 +62,36 @@
<select id="selectAdditionalDeduction" resultMap="AdditionalDeductionMap"> <select id="selectAdditionalDeduction" resultMap="AdditionalDeductionMap">
select emp.`name` as name, select emp.`name` as name,
emp.emp_num as empNum, emp.emp_num as empNum,
emp.phone,
zxfj.id as zxfjid, zxfj.id as zxfjid,
zxfj.taxmonth as date,
zxfj.childrenedu as zljy,
zxfj.houseloans as zfdk,
zxfj.houserents as zfzj,
zxfj.supportolder as sylr,
zxfj.continueedu as jxjy,
zxfj.totalmoney as lj
from yggl_main_emp emp
LEFT JOIN xcgl_asso_zxfjkc as zxfj on zxfj.userid = emp.emp_num
<if test="param.datetime != ''" >
and zxfj.taxmonth = #{param.datetime}
</if>
where emp.org_code = #{param.orgcode}
<if test="param.status != ''" >
and emp.job_status = #{param.status}
</if>
<if test="param.text != ''" >
and (emp.`name` like CONCAT('%',#{param.text},'%') or emp.emp_num = #{param.text})
</if>
</select>
<select id="selectAdditionalDeductiontwo" resultMap="AdditionalDeductionMap">
select emp.`name` as name,
emp.emp_num as empNum,
emp.phone,
zxfj.id as zxfjid,
zxfj.taxmonth as date,
zxfj.childrenedu as zljy, zxfj.childrenedu as zljy,
zxfj.houseloans as zfdk, zxfj.houseloans as zfdk,
zxfj.houserents as zfzj, zxfj.houserents as zfzj,
......
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