部门历史版本构建
薪资计算及展示, 使用部门历史版本构建 新增钉钉的招待餐券回调接口 新增员工离职后, 同步删除餐饮打卡机照片
This commit is contained in:
parent
faf571877f
commit
140fb75010
@ -171,8 +171,8 @@ public class RzAttendanceStatisticalServiceImpl extends ServiceImpl<RzAttendance
|
||||
RzAttendanceStatistical rzAttendanceStatistical = getBaseMapper().getRzAttendanceStatisticalByDateAndName(sysStaff.getUserId(),date);
|
||||
if(StringUtils.isNotNull(rzAttendanceStatistical)){
|
||||
//判断名称和部门是否一样。不一样操作修改
|
||||
//if(!rzAttendanceStatistical.getName().equals(sysStaff.getName()) || rzAttendanceStatistical.getDeptId() != sysStaff.getDeptId()){
|
||||
if(!rzAttendanceStatistical.getName().equals(sysStaff.getName())){
|
||||
if(!rzAttendanceStatistical.getName().equals(sysStaff.getName()) || rzAttendanceStatistical.getDeptId() != sysStaff.getDeptId()){
|
||||
// if(!rzAttendanceStatistical.getName().equals(sysStaff.getName())){
|
||||
//修改部门和姓名
|
||||
rzAttendanceStatistical.setName(sysStaff.getName());
|
||||
//if(rzAttendanceStatistical.getDeptId() == null){
|
||||
|
||||
@ -2,6 +2,7 @@ package com.evo.common.controller;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.aliyun.dingtalkstorage_1_0.models.GetFileUploadInfoResponseBody;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
@ -11,7 +12,11 @@ import com.evo.attendance.service.RzAttendanceDetailService;
|
||||
import com.evo.common.config.Global;
|
||||
import com.evo.common.constant.Constants;
|
||||
import com.evo.common.core.domain.AjaxResult;
|
||||
import com.evo.common.core.domain.entity.DeptMonthHistory;
|
||||
import com.evo.common.core.domain.entity.SysDept;
|
||||
import com.evo.common.utils.Collections;
|
||||
import com.evo.common.utils.DateUtils;
|
||||
import com.evo.common.utils.StringUtils;
|
||||
import com.evo.common.utils.http.HttpUtils;
|
||||
import com.evo.common.utils.spring.SpringUtils;
|
||||
import com.evo.ding.DingUtils;
|
||||
@ -22,6 +27,8 @@ import com.evo.personnelMatters.mapper.RzOverTimeDetailMapper;
|
||||
import com.evo.personnelMatters.mapper.RzOverTimeMapper;
|
||||
import com.evo.restaurant.service.IRzRestaurantStatisticsService;
|
||||
import com.evo.system.domain.SysStaff;
|
||||
import com.evo.system.mapper.SysDeptMapper;
|
||||
import com.evo.system.service.DeptMonthHistoryService;
|
||||
import com.evo.system.service.ISysStaffService;
|
||||
import com.evo.wechat.TemplateMessageUtil;
|
||||
import com.evo.wechat.dto.AbnormalAttendanceTemplate;
|
||||
@ -43,6 +50,7 @@ import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -82,6 +90,25 @@ public class TestController {
|
||||
private StringEncryptor stringEncryptor;
|
||||
@Autowired
|
||||
List<DingCallBackExchangeProcessor> dingCallBackExchangeProcessorList;
|
||||
@Resource
|
||||
private DeptMonthHistoryService deptMonthHistoryService;
|
||||
@Resource
|
||||
private SysDeptMapper deptMapper;
|
||||
|
||||
/**
|
||||
* 清洗加班
|
||||
*/
|
||||
@GetMapping("/dept/history")
|
||||
public AjaxResult deptHistory() throws ParseException {
|
||||
List<SysDept> deptList = deptMapper.selectList(new LambdaQueryWrapper<SysDept>());
|
||||
DeptMonthHistory history = new DeptMonthHistory();
|
||||
history.setDeptHistory(JSONArray.toJSONString(deptList));
|
||||
history.setDateMonth(DateUtil.format(DateUtils.addMonths(new Date(), -1), "yyyy-MM"));
|
||||
deptMonthHistoryService.save(history);
|
||||
return AjaxResult.success(history);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 清洗加班
|
||||
@ -139,10 +166,10 @@ public class TestController {
|
||||
|
||||
@GetMapping("/buildUser")
|
||||
public AjaxResult buildUser() throws ParseException {
|
||||
List<SysStaff> staffList = sysStaffService.list(new LambdaQueryWrapper<SysStaff>().ne(SysStaff::getStatus, -1).isNull(SysStaff::getDingUserId));
|
||||
List<SysStaff> staffList = sysStaffService.list(new LambdaQueryWrapper<SysStaff>().ne(SysStaff::getStatus, -1).and(ew->ew.isNull(SysStaff::getDingUserId).or().isNull(SysStaff::getDingUnionId)));
|
||||
List<String> notDingDing = Collections.emptyList();
|
||||
if(Collections.isNotEmpty(staffList)){
|
||||
staffList.stream().forEach(data ->{
|
||||
staffList.stream().filter(d -> {return StringUtils.isEmpty(d.getDingUserId());}).forEach(data ->{
|
||||
String result = DingUtils.getUserIdByPhoto(data.getPhone());
|
||||
JSONObject resObject = JSON.parseObject(result);
|
||||
if(Integer.valueOf(0).equals(resObject.getInteger("errcode"))){
|
||||
@ -153,8 +180,18 @@ public class TestController {
|
||||
notDingDing.add(data.getName());
|
||||
}
|
||||
});
|
||||
staffList.stream().filter(d -> {return StringUtils.isNotEmpty(d.getDingUserId()) && StringUtils.isEmpty(d.getDingUnionId());}).forEach(data ->{
|
||||
String dingUserInfo = DingUtils.getUserInfoByUserId(data.getDingUserId());
|
||||
JSONObject dingResult = JSONObject.parseObject(dingUserInfo);
|
||||
if(Integer.valueOf(0).equals(dingResult.getInteger("errcode"))){
|
||||
JSONObject result = dingResult.getJSONObject("result");
|
||||
data.setDingUnionId(result.getString("unionid"));
|
||||
}
|
||||
});
|
||||
|
||||
sysStaffService.updateBatchById(staffList);
|
||||
}
|
||||
|
||||
if(Collections.isNotEmpty(notDingDing)){
|
||||
return AjaxResult.success("部分更新失败, 未找到钉钉数据, 人员名单如下: "+ String.join(",", notDingDing));
|
||||
}
|
||||
@ -550,179 +587,219 @@ public class TestController {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
||||
String str = "132331198104302969,5" +
|
||||
";13013219980404003X,5" +
|
||||
";13013219980911005X,5" +
|
||||
";130132198208112864,5" +
|
||||
";130123200301063335,10" +
|
||||
";130124198901012722,5" +
|
||||
";130132200506291936,5" +
|
||||
";130823200510275017,10" +
|
||||
";130124200409112713,5" +
|
||||
";132332197909035249,5" +
|
||||
";132330197211121556,10" +
|
||||
";132331197809282537,5" +
|
||||
";132223196903210011,10" +
|
||||
";130425200503282017,10" +
|
||||
";130132198312085341,5" +
|
||||
";132331197907081018,5" +
|
||||
";130132198808171948,5" +
|
||||
";130132198510223266,5" +
|
||||
";130132199112222860,5" +
|
||||
";130132199402281930,5" +
|
||||
";132331197405072250,5" +
|
||||
";130427200507260010,10" +
|
||||
";130633200510046072,10" +
|
||||
";132331196902122373,5" +
|
||||
";13233119650311435X,5" +
|
||||
";130627200502080011,10" +
|
||||
";132331197009041014,5" +
|
||||
";132331196705281797,5" +
|
||||
";130132198206102865,5" +
|
||||
";130129200303021014,10" +
|
||||
";130124199010212418,5" +
|
||||
";130124198705142415,5" +
|
||||
";13013219940118379X,5" +
|
||||
";130132200210022913,5" +
|
||||
";130132198512242866,5" +
|
||||
";130132199712312878,5" +
|
||||
";130185200104092515,10" +
|
||||
";132331198106272847,5" +
|
||||
";130124199111162464,5" +
|
||||
";130127198304171820,5" +
|
||||
";130132198712262861,5" +
|
||||
";130981200705293871,10" +
|
||||
";13233119800512284X,5" +
|
||||
";130132198608021945,5" +
|
||||
";130521200510130011,10" +
|
||||
";130132198208172840,5" +
|
||||
";140622198704165224,5" +
|
||||
";130132198808183201,5" +
|
||||
";130132198405163177,5" +
|
||||
";132331197906192867,5" +
|
||||
";130132198212181942,5" +
|
||||
";13012419821023246X,5" +
|
||||
";130124198811222427,5" +
|
||||
";130132198510203193,5" +
|
||||
";452226198606061307,5" +
|
||||
";132331197511112527,5" +
|
||||
";132331197609181563,5" +
|
||||
";130124197108282423,5" +
|
||||
";132331196810232882,5" +
|
||||
";130124200110161211,5" +
|
||||
";130132199105122861,5" +
|
||||
";13013219820321284X,5" +
|
||||
";130132199908050013,5" +
|
||||
";13233119810823254X,5" +
|
||||
";130124198805202411,5" +
|
||||
";130132199905060056,5" +
|
||||
";130132199510162875,5" +
|
||||
";13013219951103287X,5" +
|
||||
";131124200504142313,10" +
|
||||
";130132199010252946,5" +
|
||||
";130532198612091526,5" +
|
||||
";130132200009262878,5" +
|
||||
";130132198612102887,5" +
|
||||
";130132198709151968,5" +
|
||||
";130132198806101970,5" +
|
||||
";130981200505054817,10" +
|
||||
";130130200501311536,10" +
|
||||
";130185199906282518,10" +
|
||||
";130525198809185717,5" +
|
||||
";131122200312200010,10" +
|
||||
";13013219890818288X,5" +
|
||||
";130124198511212438,5" +
|
||||
";130823200405243013,10" +
|
||||
";130726200303022213,10" +
|
||||
";130582200301013612,10" +
|
||||
";130429200008068019,10" +
|
||||
";131122200312282431,10" +
|
||||
";131122200405010216,10" +
|
||||
";130132200112192871,5" +
|
||||
";131122200310071219,10" +
|
||||
";13013319910307097X,5" +
|
||||
";130726200203256135,10" +
|
||||
";130928200104025810,10" +
|
||||
";130132198811222865,5" +
|
||||
";130133197912031517,5" +
|
||||
";130125198908120079,10" +
|
||||
";130105196807301212,5" +
|
||||
";130121198909172019,10" +
|
||||
";130132199001114410,10" +
|
||||
";130132198903171946,5" +
|
||||
";130127199209191836,5" +
|
||||
";130127200308081814,10" +
|
||||
";372925198703276715,5" +
|
||||
";130133200012160019,10" +
|
||||
";130132199004162880,5" +
|
||||
";130221200411236818,10" +
|
||||
";130121199811122819,10" +
|
||||
";130132198407011943,5" +
|
||||
";13053219860424502x,5" +
|
||||
";130132199203183190,5" +
|
||||
";130124197508072417,5" +
|
||||
";130108197903081217,5" +
|
||||
";13013219990920001X,5" +
|
||||
";130132200110210052,5" +
|
||||
";13012419991024241X,5" +
|
||||
";130132200107220057,5" +
|
||||
";130131199202104239,5" +
|
||||
";130132198506023173,5" +
|
||||
";130132199007270035,5" +
|
||||
";130124198904062506,5" +
|
||||
";130123197905264213,10" +
|
||||
";130124198407082434,5" +
|
||||
";130132199505170010,5" +
|
||||
";130132199512053218,5" +
|
||||
";130132200309122893,5" +
|
||||
";130124198603142465,5" +
|
||||
";130133199002271510,10" +
|
||||
";130402200201102426,5" +
|
||||
";130132198701021966,5" +
|
||||
";130132200312111634,5" +
|
||||
";130132198908221949,5" +
|
||||
";431124198612294526,5" +
|
||||
";130102197209081550,5" +
|
||||
";130132198610153189,5" +
|
||||
";130185199207201360,5" +
|
||||
";130528199209261812,5" +
|
||||
";130124198512260079,5" +
|
||||
";130132200008303199,5" +
|
||||
";130124198910152516,5" +
|
||||
";132331197312081393,5" +
|
||||
";130124198612102414,5" +
|
||||
";130132199210280052,5" +
|
||||
";130132198304112987,5" +
|
||||
";130132198404092864,5" +
|
||||
";132331198108151512,5" +
|
||||
";130123198207213915,5" +
|
||||
";130124198808040016,5" +
|
||||
";130132198301262875,5" +
|
||||
";130132198603141948,5" +
|
||||
";130132198701102934,5" +
|
||||
";130124199504182415,5" +
|
||||
";132331197903162849,5" +
|
||||
";132332197812100016,5" +
|
||||
";130132198812093268,5" +
|
||||
";130132199106160026,5" +
|
||||
";130133198208150920,5" +
|
||||
";13012319720704001X,5" +
|
||||
";130132198311182860,5" +
|
||||
";130132199412151937,5" +
|
||||
";130132198706282903,5" +
|
||||
";130132199808132871,5" +
|
||||
";130132199010252903,5" +
|
||||
";610330197811233028,5" +
|
||||
";130123196005286930,5";
|
||||
String str = "GW000001,总经理,00101,总经办;" +
|
||||
"GW000002,经营副总,00101,总经办;" +
|
||||
"GW000003,生产副总,00101,总经办;" +
|
||||
"GW000004,机械总工程师,013,研究院;" +
|
||||
"GW000005,常务副总,00101,总经办;" +
|
||||
"GW000006,电气总工程师,013,研究院;" +
|
||||
"GW000007,销售总监,00202,工业事业部;" +
|
||||
"GW000008,营销专员,00202,工业事业部;" +
|
||||
"GW000009,销售总监,00201,舞台事业部;" +
|
||||
"GW000010,区域经理,00202,工业事业部;" +
|
||||
"GW000011,销售内勤,00202,工业事业部;" +
|
||||
"GW000012,生管部部长,005,生产管理部;" +
|
||||
"GW000013,调度员,007,装配车间;" +
|
||||
"GW000015,装一工段长,007,装配车间;" +
|
||||
"GW000016,装一组长,007,装配车间;" +
|
||||
"GW000017,装一装配工,007,装配车间;" +
|
||||
"GW000018,装二装配工,007,装配车间;" +
|
||||
"GW000030,工艺工程师,011,工艺所;" +
|
||||
"GW000031,仓储部长,009,仓储物流部;" +
|
||||
"GW000032,库管员,009,仓储物流部;" +
|
||||
"GW000033,设计部部长,013,研究院;" +
|
||||
"GW000034,机械设计工程师,013,研究院;" +
|
||||
"GW000036,工艺技术员,011,工艺所;" +
|
||||
"GW000039,质量部部长,012,质量管理部;" +
|
||||
"GW000040,质检员,012,质量管理部;" +
|
||||
"GW000041,财务部部长,003,财务部;" +
|
||||
"GW000042,出纳,003,财务部;" +
|
||||
"GW000044,采购部部长,004,采购部;" +
|
||||
"GW000045,采购员,004,采购部;" +
|
||||
"GW000047,C++工程师,013,研究院;" +
|
||||
"GW000058,质量工程师(QE),012,质量管理部;" +
|
||||
"GW000063,信息中心专员,00104,信息化办公室;" +
|
||||
"GW000064,行政办主任,00102,行政办;" +
|
||||
"GW000065,行政专员,00102,行政办;" +
|
||||
"GW000066,信息中心主任,00104,信息化办公室;" +
|
||||
"GW000067,人资办主任,00103,人资办;" +
|
||||
"GW000068,人资专员,00103,人资办;" +
|
||||
"GW000069,员工关系专员,00103,人资办;" +
|
||||
"GW000070,总经办主任,00101,总经办;" +
|
||||
"GW000071,总经办专员,00101,总经办;" +
|
||||
"GW000072,成本会计,003,财务部;" +
|
||||
"GW000073,总账会计,003,财务部;" +
|
||||
"GW000074,往来会计,003,财务部;" +
|
||||
"GW000075,库管组长,009,仓储物流部;" +
|
||||
"GW000076,电控部长,013,研究院;" +
|
||||
"GW000077,电气工程师,013,研究院;" +
|
||||
"GW000078,点收组长,012,质量管理部;" +
|
||||
"GW000079,点收员,012,质量管理部;" +
|
||||
"GW000080,调式工程师,013,研究院;" +
|
||||
"GW000081,前端工程师,013,研究院;" +
|
||||
"GW000082,JAVA工程师,013,研究院;" +
|
||||
"GW000083,嵌入式工程师,013,研究院;" +
|
||||
"GW000084,装二工段长,007,装配车间;" +
|
||||
"GW000085,装二组长,007,装配车间;" +
|
||||
"GW000086,电钳工段长,007,装配车间;" +
|
||||
"GW000087,售后副段长,015,售后服务科;" +
|
||||
"GW000088,电钳工,007,装配车间;" +
|
||||
"GW000089,调度员,006,机加车间;" +
|
||||
"GW000090,统计员,006,机加车间;" +
|
||||
"GW000091,卧加组长,006,机加车间;" +
|
||||
"GW000092,铆焊副工段长,006,机加车间;" +
|
||||
"GW000093,走心机操作工,006,机加车间;" +
|
||||
"GW000094,下料组组长,006,机加车间;" +
|
||||
"GW000095,非标焊接工段长,018,铆焊车间;" +
|
||||
"GW000096,攻丝操作员,006,机加车间;" +
|
||||
"GW000097,机一车间主任,006,机加车间;" +
|
||||
"GW000098,机一操作员,006,机加车间;" +
|
||||
"GW000099,机二车间主任,006,机加车间;" +
|
||||
"GW000100,机二副工段长,006,机加车间;" +
|
||||
"GW000101,卧加操作员,006,机加车间;" +
|
||||
"GW000102,机三车间主任,006,机加车间;" +
|
||||
"GW000103,机三副工段长,006,机加车间;" +
|
||||
"GW000104,龙门组组长,006,机加车间;" +
|
||||
"GW000105,立加850组长,006,机加车间;" +
|
||||
"GW000106,立加850操作员,006,机加车间;" +
|
||||
"GW000107,保安,00102,行政办;" +
|
||||
"GW000108,保洁,00102,行政办;" +
|
||||
"GW000109,外贸业务经理,00202,工业事业部;" +
|
||||
"GW000110,设备科科长,016,设备科;" +
|
||||
"GW000111,设备维修工,016,设备科;" +
|
||||
"GW000112,设备工程师,016,设备科;" +
|
||||
"GW000113,生管员,005,生产管理部;" +
|
||||
"GW000114,工艺部部长,011,工艺所;" +
|
||||
"GW000116,技术员1,013,研究院;" +
|
||||
"GW000117,焊工,006,机加车间;" +
|
||||
"GW000118,铆工,018,铆焊车间;" +
|
||||
"GW000119,助理工程师,013,研究院;" +
|
||||
"GW000120,技术员2,013,研究院;" +
|
||||
"GW000121,项目专员,005,生产管理部;" +
|
||||
"GW000122,售后服务部部长,015,售后服务科;" +
|
||||
"GW000123,售后工程师,015,售后服务科;" +
|
||||
"GW000124,算法工程师,013,研究院;" +
|
||||
"GW000125,PACK研发部主管,013,研究院;" +
|
||||
"GW000126,BMS应用工程师,013,研究院;" +
|
||||
"GW000127,仓储部副部长,009,仓储物流部;" +
|
||||
"GW000128,机械研发部部长,013,研究院;" +
|
||||
"GW000129,测试员,013,研究院;" +
|
||||
"GW000130,生产副总助理,00101,总经办;" +
|
||||
"GW000131,销售内勤,002004,大客户事业部;" +
|
||||
"GW000133,销售内勤,00201,舞台事业部;" +
|
||||
"GW000134,区域经理,00201,舞台事业部;" +
|
||||
"GW000135,营销专员,00201,舞台事业部;" +
|
||||
"GW000137,外贸员,00202,工业事业部;" +
|
||||
"GW000139,生管部副部长,005,生产管理部;" +
|
||||
"GW000140,下料操作工,018,铆焊车间;" +
|
||||
"GW000141,铆焊工段长,018,铆焊车间;" +
|
||||
"GW000142,研发一所所长,013,研究院;" +
|
||||
"GW000143,工步工艺员,006,机加车间;" +
|
||||
"GW000144,数车工段长,006,机加车间;" +
|
||||
"GW000145,打磨工,018,铆焊车间;" +
|
||||
"GW000146,工艺技术员,013,研究院;" +
|
||||
"GW000147,内勤,005,生产管理部;" +
|
||||
"GW000148,机械手操作工,018,铆焊车间;" +
|
||||
"GW000149,激光切操作工,018,铆焊车间;" +
|
||||
"GW000150,转序员,018,铆焊车间;" +
|
||||
"GW000151,综合技术员,018,铆焊车间;" +
|
||||
"GW000152,点收员,004,采购部;" +
|
||||
"GW000153,机二文员,006,机加车间;" +
|
||||
"GW000154,外协员,005,生产管理部;" +
|
||||
"GW000155,机械工程师,013,研究院;" +
|
||||
"GW000156,机械研发专员,013,研究院;" +
|
||||
"GW000157,激光淬火操作工,018,铆焊车间;" +
|
||||
"GW000158,转序员,006,机加车间;" +
|
||||
"GW000159,电钳采购,023,电钳车间;" +
|
||||
"GW000160,装配车间主任,007,装配车间;" +
|
||||
"GW000161,铆焊车间主任,018,铆焊车间;" +
|
||||
"GW000162,电钳车间主任,023,电钳车间;" +
|
||||
"GW000163,计划员,005,生产管理部;" +
|
||||
"GW000164,机二编程员,006,机加车间;" +
|
||||
"GW000165,攻丝操作员,007,装配车间;" +
|
||||
"GW000166,电钳工,023,电钳车间;" +
|
||||
"GW000167,校形操作工,018,铆焊车间;" +
|
||||
"GW000168,激光切板组长,018,铆焊车间;" +
|
||||
"GW000169,火焰操作工,018,铆焊车间;" +
|
||||
"GW000170,火焰、切管组组长,018,铆焊车间;" +
|
||||
"GW000171,转运组长,018,铆焊车间;" +
|
||||
"GW000172,下料工段长,018,铆焊车间;" +
|
||||
"GW000173,激光焊工,018,铆焊车间;" +
|
||||
"GW000174,焊工,018,铆焊车间;" +
|
||||
"GW000175,精密件组长,018,铆焊车间;" +
|
||||
"GW000176,坡口机操作工,018,铆焊车间;" +
|
||||
"GW000177,自动化组长,018,铆焊车间;" +
|
||||
"GW000178,行程检测,023,电钳车间;" +
|
||||
"GW000179,研发二所所长,013,研究院;" +
|
||||
"GW000180,铆工组长,018,铆焊车间;" +
|
||||
"GW000181,研发三所所长,013,研究院;" +
|
||||
"GW000182,电气技术员,013,研究院;" +
|
||||
"GW000183,库管员,018,铆焊车间;" +
|
||||
"GW000184,自动化焊接工段长,018,铆焊车间;" +
|
||||
"GW000185,统计员,018,铆焊车间;" +
|
||||
"GW000186,研发四所所长,013,研究院;" +
|
||||
"GW000187,研究院院长,013,研究院;" +
|
||||
"GW000188,研发六所所长,013,研究院;" +
|
||||
"GW000189,调试测试工程师,013,研究院;" +
|
||||
"GW000190,研发七所所长,013,研究院;" +
|
||||
"GW000191,研究院副院长,013,研究院;" +
|
||||
"GW000192,人事专员,00103,人资办;" +
|
||||
"GW000193,信息化主任,00104,信息化办公室;" +
|
||||
"GW000194,信息化专员,00104,信息化办公室;" +
|
||||
"GW000195,售后服务科长,015,售后服务科;" +
|
||||
"GW000196,助理工程师,00202,工业事业部;" +
|
||||
"GW000197,机械工程师,00202,工业事业部;" +
|
||||
"GW000198,外贸员,00201,舞台事业部;" +
|
||||
"GW000199,应收会计,003,财务部;" +
|
||||
"GW000200,应付会计,003,财务部;" +
|
||||
"GW000201,机二编程组长,006,机加车间;" +
|
||||
"GW000202,调度员,005,生产管理部;" +
|
||||
"GW000203,生产计划员,005,生产管理部;" +
|
||||
"GW000204,点收员,009,仓储物流部;" +
|
||||
"GW000205,仓储物流部长,009,仓储物流部;" +
|
||||
"GW000206,仓储物流副部长,009,仓储物流部;" +
|
||||
"GW000207,龙门操作员,006,机加车间;" +
|
||||
"GW000208,制程检验员,012,质量管理部;" +
|
||||
"GW000209,成品检验员,012,质量管理部;" +
|
||||
"GW000210,质量管理部长,012,质量管理部;" +
|
||||
"GW000211,三坐标检验员,012,质量管理部;" +
|
||||
"GW000212,质量体系工程师,012,质量管理部;" +
|
||||
"GW000213,普车工段长,006,机加车间;" +
|
||||
"GW000214,普机操作工,006,机加车间;" +
|
||||
"GW000215,台钻操作工,006,机加车间;" +
|
||||
"GW000216,锯床,006,机加车间;" +
|
||||
"GW000217,磨床操作工,006,机加车间;" +
|
||||
"GW000218,机三编程员,006,机加车间;" +
|
||||
"GW000219,线切割组长,006,机加车间;" +
|
||||
"GW000220,线切割操作工,006,机加车间;" +
|
||||
"GW000221,数车操作工,006,机加车间;" +
|
||||
"GW000222,磨齿机操作工,006,机加车间;" +
|
||||
"GW000223,激光淬火操作工,006,机加车间;" +
|
||||
"GW000224,编程员,006,机加车间;" +
|
||||
"GW000225,工段长,006,机加车间;" +
|
||||
"GW000226,链条组长,007,装配车间;" +
|
||||
"GW000227,箱体组长,007,装配车间";
|
||||
String[] aa = str.split(";");
|
||||
int sort = 1;
|
||||
List<String> deptNames = new ArrayList<>();
|
||||
for (int i = 0; i < aa.length; i++) {
|
||||
String a = aa[i].trim();
|
||||
String[] ss = a.split(",");
|
||||
if(!deptNames.contains(ss[3])) {
|
||||
System.out.println("update sys_dept set dept_code='"+ss[2]+"' where dept_name = '"+ss[3]+"';");
|
||||
deptNames.add(ss[3]);
|
||||
}
|
||||
|
||||
// System.out.println("INSERT INTO `evo_cw_dev`.`sys_dict_data` (`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) " +
|
||||
// "VALUES ( "+(sort++)+", '"+ss[1]+"', '"+ss[0]+"_"+ss[2]+"', 'job_info', NULL, 'default', 'N', '0', 'admin', now(), '', NULL, NULL);");
|
||||
|
||||
|
||||
|
||||
//System.out.println("update sys_staff s set s.dept_id = (select dept_id from sys_dept where dept_name = '"+ss[2]+"') where s.name='"+ss[0]+"' and s.id_card = '"+ss[1]+"';");
|
||||
//System.out.println("update rz_attendance_statistical ras left join sys_staff s on s.user_id = ras.staff_id set ras.dept_id = (select dept_id from sys_dept where dept_name = '"+ss[2]+"') where DATE_FORMAT(ras.month,'%Y-%m') = DATE_FORMAT('2026-07-01','%Y-%m') AND s.name='"+ss[0]+"' and s.id_card = '"+ss[1]+"';");
|
||||
//System.out.println("update rz_restaurant_statistics ras left join sys_staff s on s.user_id = ras.staff_id set ras.dept_id = (select dept_id from sys_dept where dept_name = '"+ss[2]+"') where DATE_FORMAT(ras.month,'%Y-%m') = DATE_FORMAT('2026-07-01','%Y-%m') AND s.name='"+ss[0]+"' and s.id_card = '"+ss[1]+"';");
|
||||
//System.out.println("update rz_leave l left join sys_staff s on s.user_id = l.user_id set l.dept_id = (select dept_id from sys_dept where dept_name = '"+ss[2]+"') where s.name='"+ss[0]+"' and s.id_card = '"+ss[1]+"';");
|
||||
System.out.println("update sys_staff_detail ssd left join sys_staff ss on ss.user_id = ssd.staff_id set ssd.daily_wage = ssd.daily_wage-"+ss[1]+" where ss.id_card = '"+ss[0]+"';");
|
||||
// System.out.println("update sys_staff_detail ssd left join sys_staff ss on ss.user_id = ssd.staff_id set ssd.daily_wage = ssd.daily_wage-"+ss[1]+" where ss.id_card = '"+ss[0]+"';");
|
||||
}
|
||||
// BufferedReader reader = new BufferedReader(new FileReader(new File("D:\\andy\\文档\\考勤\\岗位任职部门信息.txt")));
|
||||
// String line = reader.readLine();
|
||||
|
||||
@ -2,7 +2,10 @@ package com.evo.common.core.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.evo.common.utils.Collections;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.evo.common.core.domain.entity.SysDept;
|
||||
import com.evo.common.core.domain.entity.SysMenu;
|
||||
@ -26,6 +29,9 @@ public class TreeSelect implements Serializable
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
private List<TreeSelect> children;
|
||||
|
||||
/** 节点名称 */
|
||||
private Map<String, Object> extend;
|
||||
|
||||
public TreeSelect()
|
||||
{
|
||||
|
||||
@ -35,6 +41,7 @@ public class TreeSelect implements Serializable
|
||||
{
|
||||
this.id = dept.getDeptId();
|
||||
this.label = dept.getDeptName();
|
||||
this.extend = Collections.asMap("deptCode", dept.getDeptCode());
|
||||
this.children = dept.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@ -74,4 +81,12 @@ public class TreeSelect implements Serializable
|
||||
{
|
||||
this.children = children;
|
||||
}
|
||||
|
||||
public Map<String, Object> getExtend() {
|
||||
return extend;
|
||||
}
|
||||
|
||||
public void setExtend(Map<String, Object> extend) {
|
||||
this.extend = extend;
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,29 @@
|
||||
package com.evo.common.core.domain.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @desc:
|
||||
* @ClassName:DeptMonthHistory
|
||||
* @date: 2026年08月15日 15:34
|
||||
* @company: 茹臣科技
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class DeptMonthHistory implements Serializable {
|
||||
|
||||
/***
|
||||
* id
|
||||
*/
|
||||
Long id;
|
||||
|
||||
String dateMonth;
|
||||
|
||||
String deptHistory;
|
||||
|
||||
}
|
||||
@ -34,7 +34,8 @@ public class SysDept extends BaseEntity
|
||||
|
||||
/** 祖级列表 */
|
||||
private String ancestors;
|
||||
|
||||
/** 部门编码 */
|
||||
private String deptCode;
|
||||
/** 部门名称 */
|
||||
private String deptName;
|
||||
|
||||
|
||||
@ -101,6 +101,7 @@ public class DingUtils {
|
||||
DingTalkClient client = new DefaultDingTalkClient(DingGlobalParams.getUrl()+"v2/user/get");
|
||||
OapiV2UserGetRequest req = new OapiV2UserGetRequest();
|
||||
req.setUserid(userId);
|
||||
req.setLanguage("zh_CN");
|
||||
OapiV2UserGetResponse rsp = client.execute(req, getAccessToken());
|
||||
return rsp.getBody();
|
||||
} catch (Exception e) {
|
||||
@ -196,7 +197,7 @@ public class DingUtils {
|
||||
|
||||
|
||||
/***
|
||||
* 获取审批详情
|
||||
* 获取单个审批实例详情
|
||||
* @param processInstanceId 审批示例id
|
||||
*/
|
||||
public static GetProcessInstanceResponseBody.GetProcessInstanceResponseBodyResult getProcessInstanceInfo(String processInstanceId){
|
||||
|
||||
@ -20,6 +20,8 @@ public interface InstanceChangeExchangeProcessor extends DingBasicExchangeProces
|
||||
|
||||
//补卡
|
||||
static final String PROCESS_CODE_RECHARGE_CARD = "PROC-19617D02-F632-402E-9ACD-134CC47E462F";
|
||||
//接待
|
||||
static final String PROCESS_CODE_RECEPTION_CARD = "PROC-D00584CA-55AA-4783-ABA3-9EE3D9A5F67B";
|
||||
|
||||
boolean accept(String processCode);
|
||||
|
||||
|
||||
@ -0,0 +1,105 @@
|
||||
package com.evo.ding.processor.instance.impl;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.aliyun.dingtalkworkflow_1_0.models.GetProcessInstanceResponseBody;
|
||||
import com.evo.common.constant.Constants;
|
||||
import com.evo.common.core.domain.entity.SysDictData;
|
||||
import com.evo.common.utils.Collections;
|
||||
import com.evo.common.utils.DataUtils;
|
||||
import com.evo.common.utils.ParamUtils;
|
||||
import com.evo.common.utils.StringUtils;
|
||||
import com.evo.ding.DingUtils;
|
||||
import com.evo.ding.processor.instance.InstanceChangeExchangeProcessor;
|
||||
import com.evo.personnelMatters.domain.RzMealExpenses;
|
||||
import com.evo.personnelMatters.service.RzMealExpensesService;
|
||||
import com.evo.system.mapper.SysDictDataMapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 钉钉接待申请接口回调 InstanceChangeReceptionExchangeProcessor
|
||||
* @author andy.shi
|
||||
* @ClassName:InstanceChangeReceptionExchangeProcessor
|
||||
* @date: 2026年08月17日 13:51
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class InstanceChangeReceptionExchangeProcessor implements InstanceChangeExchangeProcessor {
|
||||
|
||||
@Resource
|
||||
private SysDictDataMapper sysDictDataMapper; //数据字典
|
||||
@Resource
|
||||
private RzMealExpensesService rzMealExpensesService;
|
||||
@Override
|
||||
public boolean accept(String processCode) {
|
||||
return InstanceChangeExchangeProcessor.PROCESS_CODE_RECEPTION_CARD.equals(processCode);
|
||||
}
|
||||
@Override
|
||||
public void exchange(JSONObject json) {
|
||||
//获取审批示例id
|
||||
String processInstanceId = json.getString("processInstanceId");
|
||||
GetProcessInstanceResponseBody.GetProcessInstanceResponseBodyResult result = DingUtils.getProcessInstanceInfo(processInstanceId);
|
||||
log.info("招待申请审批表单信息:{}", JSON.toJSONString(result));
|
||||
try {
|
||||
List<GetProcessInstanceResponseBody.GetProcessInstanceResponseBodyResultFormComponentValues> resultFormValues = result.getFormComponentValues();
|
||||
//是否有餐饮需求
|
||||
String diningDemand = resultFormValues.stream().filter(data-> "餐饮需求".equals(data.getName()) && StringUtils.isNotEmpty(data.getValue())).findFirst().get().getValue();
|
||||
//是否有餐饮需求
|
||||
if(!"有".equals(diningDemand)) {
|
||||
log.info("本次招待信息没有就餐需求");
|
||||
return;
|
||||
}
|
||||
//餐券数量
|
||||
String diningNum = resultFormValues.stream().filter(data-> "餐券数量".equals(data.getName()) && StringUtils.isNotEmpty(data.getValue())).findFirst().get().getValue();
|
||||
//餐券类别
|
||||
String diningType = resultFormValues.stream().filter(data-> "餐券类别".equals(data.getName()) && StringUtils.isNotEmpty(data.getValue())).findFirst().get().getValue();
|
||||
//单价
|
||||
BigDecimal unitPrice = DataUtils.DEFAULT_VALUE;
|
||||
//查询消费情况
|
||||
Map<Long,String> dicMap = sysDictDataMapper.selectDictDataByType(Constants.SYS_RESTAUTANT).stream().collect(Collectors.toMap(SysDictData::getDictCode, SysDictData::getDictValue));
|
||||
|
||||
if("早餐".equals(diningType)){
|
||||
unitPrice = new BigDecimal(dicMap.get(Constants.zc_code));
|
||||
}else if ("午餐".equals(diningType)){
|
||||
unitPrice = new BigDecimal(dicMap.get(Constants.wc_code));
|
||||
} else if ("晚餐".equals(diningType)) {
|
||||
unitPrice = new BigDecimal(dicMap.get(Constants.wcc_code));
|
||||
}
|
||||
BigDecimal totalAmount = unitPrice.multiply(new BigDecimal(diningNum));
|
||||
//预计月份
|
||||
String month = resultFormValues.stream().filter(data-> "预计来访日期".equals(data.getName()) && StringUtils.isNotEmpty(data.getValue())).findFirst().get().getValue();
|
||||
RzMealExpenses param = new RzMealExpenses();
|
||||
param.setYearMonthTime(month.substring(0, 7));
|
||||
List<RzMealExpenses> list = rzMealExpensesService.selectList(param);
|
||||
RzMealExpenses rzMealExpenses = new RzMealExpenses();
|
||||
if(Collections.isNotEmpty(list)){
|
||||
rzMealExpenses = list.get(0);
|
||||
rzMealExpenses.setHospitalityFee(new BigDecimal(DataUtils.findDefaultValue(rzMealExpenses.getHospitalityFee(), 0d)).add(totalAmount).doubleValue());
|
||||
rzMealExpensesService.updateRzMealExpenses(rzMealExpenses);
|
||||
}else {
|
||||
rzMealExpenses = new RzMealExpenses();
|
||||
rzMealExpenses.setYearMonthTime(month.substring(0, 7));
|
||||
rzMealExpenses.setWaterUnitPrice(ParamUtils.getWaterUnitPrice());
|
||||
rzMealExpenses.setElectricityUnitPrice(ParamUtils.getElectricityUnitPrice());
|
||||
rzMealExpenses.setHospitalityFee(totalAmount.doubleValue());
|
||||
rzMealExpensesService.save(rzMealExpenses);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("解析招待审批出现错误:错误信息为:{}", e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,13 @@
|
||||
package com.evo.equipment.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class StaffDeleteDevicePhotoDto {
|
||||
private String cmd;
|
||||
private String user_id;
|
||||
private int user_type;
|
||||
|
||||
}
|
||||
@ -1,12 +1,12 @@
|
||||
package com.evo.equipment.domain.vo;
|
||||
|
||||
public class StaffDto {
|
||||
public class StaffDto<T> {
|
||||
|
||||
private String cmd;
|
||||
private String form;
|
||||
private String to;
|
||||
private String extra;
|
||||
private StaffData data;
|
||||
private T data;
|
||||
|
||||
public String getCmd() {
|
||||
return cmd;
|
||||
@ -40,11 +40,11 @@ public class StaffDto {
|
||||
this.extra = extra;
|
||||
}
|
||||
|
||||
public StaffData getData() {
|
||||
public T getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(StaffData data) {
|
||||
public void setData(T data) {
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
|
||||
@ -53,7 +53,13 @@ public interface IEqSnDetailService
|
||||
* @return
|
||||
*/
|
||||
public Boolean sendPhoto(List<String> snList, List<Map<String, String>> userPhotoList);
|
||||
|
||||
/***
|
||||
* 删除照片
|
||||
* @param snList
|
||||
* @param deleteUserList
|
||||
* @return
|
||||
*/
|
||||
public Boolean sendDelete(List<String> snList, List<String> deleteUserList);
|
||||
/***
|
||||
* 下发按钮
|
||||
* @param snList
|
||||
|
||||
@ -209,10 +209,10 @@ public class EqSnDetailServiceImpl extends ServiceImpl<EqSnDetailMapper, EqSnDet
|
||||
|
||||
@Override
|
||||
public Boolean sendPhoto(List<String> snList, List<Map<String, String>> userPhotoList) {
|
||||
if(!"druid".equals(Global.newInstance().getActive())){
|
||||
log.info("非生产环境, 无需下发照片");
|
||||
return true;
|
||||
}
|
||||
// if(!"druid".equals(Global.newInstance().getActive())){
|
||||
// log.info("非生产环境, 无需下发照片");
|
||||
// return true;
|
||||
// }
|
||||
//检查设备是否在链接状态
|
||||
Map<String, Session> sessionMap = checkSession(snList);
|
||||
|
||||
@ -247,7 +247,7 @@ public class EqSnDetailServiceImpl extends ServiceImpl<EqSnDetailMapper, EqSnDet
|
||||
|
||||
|
||||
//发送数据的类型
|
||||
StaffDto cau = new StaffDto();
|
||||
StaffDto<StaffData> cau = new StaffDto<StaffData>();
|
||||
//该接口固定为to_device,发送给设备用于识别对应哪个指令
|
||||
cau.setCmd("to_device");
|
||||
//无用值,空串
|
||||
@ -281,11 +281,42 @@ public class EqSnDetailServiceImpl extends ServiceImpl<EqSnDetailMapper, EqSnDet
|
||||
WebSocketUsers.sendMessageToUserByText(sessionMap.get(sn), JSONObject.toJSONString(cau));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean sendDelete(List<String> snList, List<String> deleteUserList) {
|
||||
|
||||
// if(!"druid".equals(Global.newInstance().getActive())){
|
||||
// log.info("非生产环境, 无需删除照片");
|
||||
// return true;
|
||||
// }
|
||||
//检查设备是否在链接状态
|
||||
Map<String, Session> sessionMap = checkSession(snList);
|
||||
//发送数据的类型
|
||||
StaffDto<StaffDeleteDevicePhotoDto> cau = new StaffDto<StaffDeleteDevicePhotoDto>();
|
||||
//该接口固定为to_device,发送给设备用于识别对应哪个指令
|
||||
cau.setCmd("to_device");
|
||||
//无用值,空串
|
||||
cau.setForm("");
|
||||
//给服务端预留的补充字段,设备端不处理这个字段内容。设备在响应这条指令时原样返回
|
||||
cau.setExtra("");
|
||||
|
||||
//发送的具体Data
|
||||
StaffDeleteDevicePhotoDto caud = new StaffDeleteDevicePhotoDto();
|
||||
caud.setCmd("delUser");
|
||||
caud.setUser_type(0);
|
||||
|
||||
|
||||
snList.stream().forEach(sn->{
|
||||
cau.setTo(sn);
|
||||
deleteUserList.stream().forEach(userId ->{
|
||||
caud.setUser_id(userId);
|
||||
//循环替换属性
|
||||
cau.setData(caud);
|
||||
//调用websocket,推送给设备
|
||||
WebSocketUsers.sendMessageToUserByText(sessionMap.get(sn), JSONObject.toJSONString(cau));
|
||||
});
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -271,92 +271,6 @@ public interface SalaryCalculationStrategyExchangeProcessor {
|
||||
rzSalaryDetail = processor.calculation(detail, rzSalaryDetail);
|
||||
}
|
||||
}
|
||||
// if(ParamUtils.getWebCompany().contains(sysStaff.getCompanyName().toUpperCase())){
|
||||
// // 实发工资 = 税前工资
|
||||
// rzSalaryDetail.setNetPayroll(rzSalaryDetail.getSalaryBeforeTax().subtract(rzSalaryDetail.getMealFee()));
|
||||
// // 此阶税率为百分之3,速减数为0
|
||||
// rzSalaryDetail.setTaxRate(DataUtils.DEFAULT_VALUE);
|
||||
// // 速算扣除数(速算扣除数跟税率同步)
|
||||
// rzSalaryDetail.setSlowDownTheDeduction(DataUtils.DEFAULT_VALUE);
|
||||
// // 本年累计已缴税额
|
||||
// rzSalaryDetail.setAggregatePersonalIncomeTax(DataUtils.DEFAULT_VALUE);
|
||||
// rzSalaryDetail.setTaxPayable(DataUtils.DEFAULT_VALUE);
|
||||
// }else if (DataUtils.DEFAULT_VALUE.compareTo(ParamUtils.getWeBaoTaxCompany(sysStaff.getCompanyName().toUpperCase())) > 0){
|
||||
// //劳务
|
||||
// // 判断应纳税所得额额度(额度不一样税率不一样)
|
||||
// rzSalaryDetail.setTaxRate(ParamUtils.getWeBaoTaxCompany(sysStaff.getCompanyName().toUpperCase()));
|
||||
// // 速算扣除数(速算扣除数跟税率同步)
|
||||
// rzSalaryDetail.setSlowDownTheDeduction(new BigDecimal("0"));
|
||||
// rzSalaryDetail.setTaxPayable(rzSalaryDetail.getTaxableIncome().multiply(rzSalaryDetail.getTaxRate()).setScale(2, BigDecimal.ROUND_HALF_UP).subtract(rzSalaryDetail.getSlowDownTheDeduction()).subtract(detail.getAggregatePersonalIncomeTax()));
|
||||
// if (rzSalaryDetail.getTaxPayable().doubleValue() <= 0) {
|
||||
// rzSalaryDetail.setTaxPayable(new BigDecimal("0.00"));
|
||||
// }
|
||||
// rzSalaryDetail.setNetPayroll(rzSalaryDetail.getSalaryBeforeTax().subtract(rzSalaryDetail.getTaxPayable()).subtract(rzSalaryDetail.getMealFee()));
|
||||
// // 本年累计已缴税额
|
||||
// rzSalaryDetail.setAggregatePersonalIncomeTax(detail.getAggregatePersonalIncomeTax().add(rzSalaryDetail.getTaxPayable()));
|
||||
// }else {
|
||||
// // 判断应纳税所得额额度(额度不一样税率不一样)
|
||||
// if (rzSalaryDetail.getTaxableIncome().doubleValue() > 0 && rzSalaryDetail.getTaxableIncome().doubleValue() <= 36000l) {
|
||||
// // 此阶税率为百分之3,速减数为0
|
||||
// rzSalaryDetail.setTaxRate(new BigDecimal("0.03"));
|
||||
// // 速算扣除数(速算扣除数跟税率同步)
|
||||
// rzSalaryDetail.setSlowDownTheDeduction(new BigDecimal("0"));
|
||||
// } else if (rzSalaryDetail.getTaxableIncome().doubleValue() > 36000l && rzSalaryDetail.getTaxableIncome().doubleValue() <= 144000L) {
|
||||
// // 此阶税率为百分之3,速减数为0
|
||||
// rzSalaryDetail.setTaxRate(new BigDecimal("0.10"));
|
||||
// // 速算扣除数(速算扣除数跟税率同步)
|
||||
// rzSalaryDetail.setSlowDownTheDeduction(new BigDecimal("2520"));
|
||||
// } else if (rzSalaryDetail.getTaxableIncome().doubleValue() > 144000L && rzSalaryDetail.getTaxableIncome().doubleValue() <= 300000l) {
|
||||
// // 此阶税率为百分之3,速减数为0
|
||||
// rzSalaryDetail.setTaxRate(new BigDecimal("0.20"));
|
||||
// // 速算扣除数(速算扣除数跟税率同步)
|
||||
// rzSalaryDetail.setSlowDownTheDeduction(new BigDecimal("16920"));
|
||||
// } else if (rzSalaryDetail.getTaxableIncome().doubleValue() > 300000l && rzSalaryDetail.getTaxableIncome().doubleValue() <= 420000l) {
|
||||
// // 此阶税率为百分之3,速减数为0
|
||||
// rzSalaryDetail.setTaxRate(new BigDecimal("0.25"));
|
||||
// // 速算扣除数(速算扣除数跟税率同步)
|
||||
// rzSalaryDetail.setSlowDownTheDeduction(new BigDecimal("31920"));
|
||||
// } else if (rzSalaryDetail.getTaxableIncome().doubleValue() > 420000l && rzSalaryDetail.getTaxableIncome().doubleValue() <= 660000l) {
|
||||
// // 此阶税率为百分之3,速减数为0
|
||||
// rzSalaryDetail.setTaxRate(new BigDecimal("0.30"));
|
||||
// // 速算扣除数(速算扣除数跟税率同步)
|
||||
// rzSalaryDetail.setSlowDownTheDeduction(new BigDecimal("52920"));
|
||||
// } else if (rzSalaryDetail.getTaxableIncome().doubleValue() > 660000l && rzSalaryDetail.getTaxableIncome().doubleValue() <= 960000l) {
|
||||
// // 此阶税率为百分之3,速减数为0
|
||||
// rzSalaryDetail.setTaxRate(new BigDecimal("0.35"));
|
||||
// // 速算扣除数(速算扣除数跟税率同步)
|
||||
// rzSalaryDetail.setSlowDownTheDeduction(new BigDecimal("85920"));
|
||||
// } else if (rzSalaryDetail.getTaxableIncome().doubleValue() > 960000l) {
|
||||
// // 此阶税率为百分之3,速减数为0
|
||||
// rzSalaryDetail.setTaxRate(new BigDecimal("0.45"));
|
||||
// // 速算扣除数(速算扣除数跟税率同步)
|
||||
// rzSalaryDetail.setSlowDownTheDeduction(new BigDecimal("181920"));
|
||||
// } else {
|
||||
// // 应纳税所得额小于0(免征额+专项扣除>应发工资时)
|
||||
// // 此阶税率为百分之0,速减数为0
|
||||
// rzSalaryDetail.setTaxRate(new BigDecimal("0.00"));
|
||||
// // 速算扣除数(速算扣除数跟税率同步)
|
||||
// rzSalaryDetail.setSlowDownTheDeduction(new BigDecimal("0"));
|
||||
// }
|
||||
//
|
||||
//
|
||||
// // 判断税前工资是否大于5000,如果小于,则不在计算个税
|
||||
// if (rzSalaryDetail.getSalaryBeforeTax().doubleValue() > 5000.00){
|
||||
// // 本月应缴税额(本月应纳税所得额*税率-速减数-本年累计已预缴个税)
|
||||
// rzSalaryDetail.setTaxPayable(rzSalaryDetail.getTaxableIncome().multiply(rzSalaryDetail.getTaxRate()).setScale(2, BigDecimal.ROUND_HALF_UP).subtract(rzSalaryDetail.getSlowDownTheDeduction()).subtract(detail.getAggregatePersonalIncomeTax()));
|
||||
// if (rzSalaryDetail.getTaxPayable().doubleValue() <= 0) {
|
||||
// rzSalaryDetail.setTaxPayable(new BigDecimal("0.00"));
|
||||
// }
|
||||
// } else {
|
||||
// // 应纳税所得额
|
||||
// rzSalaryDetail.setTaxableIncome(new BigDecimal("0.00"));
|
||||
// rzSalaryDetail.setTaxPayable(new BigDecimal("0.00"));
|
||||
// }
|
||||
// // 实发工资(税前工资-本月应缴个人所得税)
|
||||
// rzSalaryDetail.setNetPayroll(rzSalaryDetail.getSalaryBeforeTax().subtract(rzSalaryDetail.getTaxPayable()).subtract(rzSalaryDetail.getMealFee()));
|
||||
// // 本年累计已缴税额
|
||||
// rzSalaryDetail.setAggregatePersonalIncomeTax(detail.getAggregatePersonalIncomeTax().add(rzSalaryDetail.getTaxPayable()));
|
||||
// }
|
||||
rzSalaryDetail.setId(null);
|
||||
//更新下全年累计
|
||||
rzSalaryDetail.setSpecialDeduction(detail.getSpecialDeduction().add(kouChu));
|
||||
|
||||
@ -1,12 +1,15 @@
|
||||
package com.evo.finance.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.evo.attendance.domain.RzAttendanceStatistical;
|
||||
import com.evo.attendance.mapper.RzAttendanceStatisticalMapper;
|
||||
import com.evo.common.constant.Constants;
|
||||
import com.evo.common.core.domain.AjaxResult;
|
||||
import com.evo.common.core.domain.entity.DeptMonthHistory;
|
||||
import com.evo.common.core.domain.entity.SysDept;
|
||||
import com.evo.common.core.domain.entity.SysDictData;
|
||||
import com.evo.common.utils.*;
|
||||
@ -21,10 +24,8 @@ import com.evo.finance.processor.SalaryCalculationStrategyExchangeProcessor;
|
||||
import com.evo.finance.service.IRzSalaryDetailService;
|
||||
import com.evo.system.domain.SysStaff;
|
||||
import com.evo.system.domain.SysStaffDetail;
|
||||
import com.evo.system.mapper.SysDeptMapper;
|
||||
import com.evo.system.mapper.SysDictDataMapper;
|
||||
import com.evo.system.mapper.SysStaffDetailMapper;
|
||||
import com.evo.system.mapper.SysStaffMapper;
|
||||
import com.evo.system.mapper.*;
|
||||
import com.evo.system.service.DeptMonthHistoryService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
@ -62,6 +63,8 @@ public class RzSalaryDetailServiceImpl extends ServiceImpl<RzSalaryDetailMapper,
|
||||
private SysDictDataMapper sysDictDataMapper;
|
||||
@Autowired
|
||||
private ApplicationContext applicationContext;
|
||||
@Autowired
|
||||
private DeptMonthHistoryService deptMonthHistoryService;
|
||||
/**
|
||||
* 查询工资详情
|
||||
*
|
||||
@ -80,11 +83,22 @@ public class RzSalaryDetailServiceImpl extends ServiceImpl<RzSalaryDetailMapper,
|
||||
* @return 工资详情
|
||||
*/
|
||||
@Override
|
||||
public List<RzSalaryDetail> selectRzSalaryDetailList(RzSalaryDetail rzSalaryDetail)
|
||||
{
|
||||
public List<RzSalaryDetail> selectRzSalaryDetailList(RzSalaryDetail rzSalaryDetail) {
|
||||
List<RzSalaryDetail> res_list = rzSalaryDetailMapper.selectRzSalaryDetailList(rzSalaryDetail);
|
||||
List<DeptMonthHistory> list = deptMonthHistoryService.list();
|
||||
Map<String, String> historyMap = list.stream().collect(Collectors.toMap(DeptMonthHistory::getDateMonth, DeptMonthHistory::getDeptHistory));
|
||||
Map<String,Map<Long, String>> deptNameMaps = Collections.emptyMap();
|
||||
historyMap.keySet().forEach(key -> {
|
||||
if(StringUtils.isNotBlank(historyMap.get(key))){
|
||||
Map<Long, String> deptNameMap = Collections.emptyMap();
|
||||
deptNameMap.putAll(JSONArray.parseArray(historyMap.get(key), SysDept.class).stream().collect(Collectors.toMap(SysDept::getDeptId, SysDept::getDeptName)));
|
||||
deptNameMaps.put(key, deptNameMap);
|
||||
}
|
||||
});
|
||||
for (RzSalaryDetail salaryDetail : res_list) {
|
||||
salaryDetail.setDeptName(deptMapper.selectDeptById(salaryDetail.getDeptId()).getDeptName());
|
||||
String month = DateUtil.format(salaryDetail.getMonth(),"yyyy-MM");
|
||||
// salaryDetail.setDeptName(deptMapper.selectById(salaryDetail.getDeptId()).getDeptName());
|
||||
salaryDetail.setDeptName(deptNameMaps.containsKey(month) ? deptNameMaps.get(month).get(salaryDetail.getDeptId()) : deptMapper.selectById(salaryDetail.getDeptId()).getDeptName());
|
||||
}
|
||||
return res_list;
|
||||
}
|
||||
@ -142,25 +156,6 @@ public class RzSalaryDetailServiceImpl extends ServiceImpl<RzSalaryDetailMapper,
|
||||
Map<Long, Boolean> overTimeMap = deptMapper.selectList(new LambdaQueryWrapper<SysDept>().eq(SysDept::getDelFlag, Constants.DELETE_FLAG_0).select(SysDept::getIsOverTime, SysDept::getDeptId)).stream().collect(Collectors.toMap(SysDept::getDeptId,d->"0".equals(d.getIsOverTime())));
|
||||
List<Map<String,Object>> salaryInfoMapList = Collections.emptyList();
|
||||
for (SysStaff sysStaff : st_list) {
|
||||
//<<<<<<< HEAD
|
||||
// RzSalaryDetail newRzSalaryDetail = new RzSalaryDetail();
|
||||
// newRzSalaryDetail.setMonth(rzSalaryDetail.getMonth());
|
||||
// newRzSalaryDetail.setStaffId(sysStaff.getUserId()); //员工ID
|
||||
// newRzSalaryDetail.setDeptId(sysStaff.getDeptId()); //部门
|
||||
// newRzSalaryDetail.setName(sysStaff.getName()); //姓名
|
||||
// newRzSalaryDetail.setWbFlag(sysStaff.getCompanyName()); //公司
|
||||
// newRzSalaryDetail.setDelFlag(Constants.DELETE_FLAG_0);
|
||||
// //查询考勤统计
|
||||
// RzAttendanceStatistical attendanceStatistical = rzAttendanceStatisticalMapper.getRzAttendanceStatisticalByDateAndName(sysStaff.getUserId(), rzSalaryDetail.getMonth());
|
||||
// //查询员工详情
|
||||
// SysStaffDetail sysStaffDetail = sysStaffDetailMapper.selectSysStaffDetailByStaffId(sysStaff.getUserId());
|
||||
// Map<String, SalaryCalculationStrategyExchangeProcessor> salaryCalculationExchangeProcessorMap = applicationContext.getBeansOfType(SalaryCalculationStrategyExchangeProcessor.class);
|
||||
// for (SalaryCalculationStrategyExchangeProcessor processor : salaryCalculationExchangeProcessorMap.values()) {
|
||||
// if (processor.accept(sysStaffDetail)) {
|
||||
// processor.exchangeSalaryCalculation(sysStaff, sysStaffDetail, newRzSalaryDetail, attendanceStatistical, overTimeMap, salaryInfoMapList);
|
||||
// }
|
||||
// }
|
||||
//=======
|
||||
calculation(sysStaff, rzSalaryDetail.getMonth(), overTimeMap, 1, salaryInfoMapList);
|
||||
}
|
||||
rzSalaryStatistics.setSalaryInfo(JSON.toJSONString(salaryInfoMapList));
|
||||
@ -193,13 +188,15 @@ public class RzSalaryDetailServiceImpl extends ServiceImpl<RzSalaryDetailMapper,
|
||||
RzSalaryDetail newRzSalaryDetail = new RzSalaryDetail();
|
||||
newRzSalaryDetail.setMonth(date);
|
||||
newRzSalaryDetail.setStaffId(sysStaff.getUserId()); //员工ID
|
||||
newRzSalaryDetail.setDeptId(sysStaff.getDeptId()); //部门
|
||||
//newRzSalaryDetail.setDeptId(sysStaff.getDeptId()); //部门
|
||||
newRzSalaryDetail.setName(sysStaff.getName()); //姓名
|
||||
newRzSalaryDetail.setWbFlag(sysStaff.getCompanyName()); //公司
|
||||
newRzSalaryDetail.setDelFlag(Constants.DELETE_FLAG_0);
|
||||
newRzSalaryDetail.setType(type);
|
||||
//查询考勤统计
|
||||
RzAttendanceStatistical attendanceStatistical = rzAttendanceStatisticalMapper.getRzAttendanceStatisticalByDateAndName(sysStaff.getUserId(), date);
|
||||
//修正, 考勤部门为历史部门
|
||||
newRzSalaryDetail.setDeptId(attendanceStatistical.getDeptId()); //部门
|
||||
//查询员工详情
|
||||
SysStaffDetail sysStaffDetail = sysStaffDetailMapper.selectSysStaffDetailByStaffId(sysStaff.getUserId());
|
||||
|
||||
@ -388,9 +385,16 @@ public class RzSalaryDetailServiceImpl extends ServiceImpl<RzSalaryDetailMapper,
|
||||
}
|
||||
|
||||
private List<SalaryVo> buildExportData(RzSalaryDetail rzSalaryDetail) {
|
||||
List<SysDept> deptList = Collections.emptyList();
|
||||
String history = deptMonthHistoryService.getDeptMonthHistory(DateUtil.format(rzSalaryDetail.getMonth(), "yyyy-MM"));
|
||||
if(StringUtils.isNotBlank(history)){
|
||||
deptList.addAll(JSONArray.parseArray(history, SysDept.class));
|
||||
}else{
|
||||
// 获取所有部门列表
|
||||
List<SysDept> deptList = deptMapper.selectList(new LambdaQueryWrapper<SysDept>());
|
||||
Map<Long, String> deptNameMap = Collections.emptyMap(); //deptList.stream().collect(Collectors.toMap(SysDept::getDeptId, SysDept::getDeptName));
|
||||
deptList.addAll(deptMapper.selectList(new LambdaQueryWrapper<SysDept>()));
|
||||
}
|
||||
|
||||
Map<Long, String> deptNameMap = Collections.emptyMap();
|
||||
for (SysDept dept : deptList) {
|
||||
deptNameMap.put(dept.getDeptId(), buildDept(dept.getDeptId(), deptList, deptNameMap));
|
||||
}
|
||||
|
||||
@ -15,7 +15,6 @@ import com.evo.personnelMatters.mapper.RzMealExpensesDetailMapper;
|
||||
import com.evo.personnelMatters.mapper.RzMealExpensesMapper;
|
||||
import com.evo.personnelMatters.service.RzMealExpensesService;
|
||||
import com.evo.restaurant.mapper.RzRestaurantDetailMapper;
|
||||
import com.evo.system.mapper.SysDictDataMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@ -36,8 +35,6 @@ import java.util.stream.Collectors;
|
||||
@Service
|
||||
public class RzMealExpensesServiceImpl extends ServiceImpl<RzMealExpensesMapper, RzMealExpenses> implements RzMealExpensesService {
|
||||
|
||||
@Resource
|
||||
private SysDictDataMapper sysDictDataMapper;
|
||||
@Resource
|
||||
private RzRestaurantDetailMapper rzRestaurantDetailMapper;
|
||||
@Resource
|
||||
|
||||
@ -2,13 +2,24 @@ package com.evo.personnelMatters.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.evo.common.core.domain.AjaxResult;
|
||||
import com.evo.common.core.domain.entity.RzUpload;
|
||||
import com.evo.common.core.domain.entity.SysDept;
|
||||
import com.evo.common.utils.Collections;
|
||||
import com.evo.common.utils.ParamUtils;
|
||||
import com.evo.common.utils.SecurityUtils;
|
||||
import com.evo.equipment.service.IEqSnDetailService;
|
||||
import com.evo.personnelMatters.domain.EqOverStaff;
|
||||
import com.evo.personnelMatters.domain.SpecialOverTime;
|
||||
import com.evo.personnelMatters.mapper.BsOverTimeMapper;
|
||||
import com.evo.personnelMatters.mapper.EqOverStaffMapper;
|
||||
import com.evo.personnelMatters.service.SpecialOverTimeService;
|
||||
import com.evo.system.domain.SysStaff;
|
||||
import com.evo.system.mapper.SysDeptMapper;
|
||||
import com.evo.system.mapper.SysStaffMapper;
|
||||
import com.evo.system.service.RzUploadService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@ -18,6 +29,14 @@ public class SpecialOverTimeServiceImpl extends ServiceImpl<BsOverTimeMapper, Sp
|
||||
|
||||
@Resource
|
||||
private EqOverStaffMapper eqOverStaffMapper;
|
||||
@Resource
|
||||
private IEqSnDetailService eqSnDetailService;//餐饮统计
|
||||
@Resource
|
||||
private SysStaffMapper sysStaffMapper;
|
||||
@Resource
|
||||
private SysDeptMapper sysDeptMapper;
|
||||
@Resource
|
||||
private RzUploadService rzUploadService;//文件上传
|
||||
|
||||
@Override
|
||||
public SpecialOverTime selectSpecialOverTimeById(){
|
||||
@ -57,13 +76,21 @@ public class SpecialOverTimeServiceImpl extends ServiceImpl<BsOverTimeMapper, Sp
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int insertEqOverStaff(EqOverStaff eqOverStaff)
|
||||
{
|
||||
|
||||
eqOverStaff.setCreateBy(SecurityUtils.getUsername());
|
||||
eqOverStaff.setCreateTime(new Date());
|
||||
eqOverStaff.setDelFlag("0");
|
||||
return eqOverStaffMapper.insertEqOverStaff(eqOverStaff);
|
||||
int res = eqOverStaffMapper.insertEqOverStaff(eqOverStaff);
|
||||
if(res > 0){
|
||||
SysStaff sysStaff = sysStaffMapper.selectSysStaffByUserId(eqOverStaff.getUserId());
|
||||
SysDept sysDept = sysDeptMapper.selectById(sysStaff.getDeptId());
|
||||
RzUpload upload = rzUploadService.selectByBusinessId(sysStaff.getUserId(), "avatar");
|
||||
eqSnDetailService.sendPhoto(ParamUtils.getTsDevSn(), Collections.asList(Collections.asMap("userId", String.valueOf(sysStaff.getUserId()), "name", sysStaff.getName(), "photoUrl", ParamUtils.getGlobalStaticUrl()+upload.getFileName(), "deptName", sysDept.getDeptName())));
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -73,8 +100,7 @@ public class SpecialOverTimeServiceImpl extends ServiceImpl<BsOverTimeMapper, Sp
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateEqOverStaff(EqOverStaff eqOverStaff)
|
||||
{
|
||||
public int updateEqOverStaff(EqOverStaff eqOverStaff){
|
||||
eqOverStaff.setUpdateBy(SecurityUtils.getUsername());
|
||||
eqOverStaff.setUpdateTime(new Date());
|
||||
return eqOverStaffMapper.updateEqOverStaff(eqOverStaff);
|
||||
@ -93,7 +119,11 @@ public class SpecialOverTimeServiceImpl extends ServiceImpl<BsOverTimeMapper, Sp
|
||||
eqOverStaff.setDelFlag("1");
|
||||
eqOverStaff.setUpdateTime(new Date());
|
||||
eqOverStaff.setUpdateBy(SecurityUtils.getUsername());
|
||||
return eqOverStaffMapper.updateEqOverStaff(eqOverStaff);
|
||||
int res = eqOverStaffMapper.updateEqOverStaff(eqOverStaff);
|
||||
if(res > 0){
|
||||
eqSnDetailService.sendDelete(ParamUtils.getTsDevSn(), Collections.asList(String.valueOf(eqOverStaff.getUserId())));
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -69,28 +69,29 @@ public class RzRestaurantImagesServiceImpl extends ServiceImpl<RzRestaurantImage
|
||||
{
|
||||
//根据id查询信息
|
||||
RzRestaurantImages rzRestaurantImages = getBaseMapper().selectRzRestaurantImagesById(id);
|
||||
|
||||
//需要返回的对象
|
||||
StaffDto cau = new StaffDto();
|
||||
//发送的数据
|
||||
StaffData caud = new StaffData();
|
||||
//该接口固定为to_device,发送给设备用于识别对应哪个指令
|
||||
cau.setCmd("to_device");
|
||||
//无用值,空串
|
||||
cau.setForm("");
|
||||
//给服务端预留的补充字段,设备端不处理这个字段内容。设备在响应这条指令时原样返回
|
||||
cau.setExtra("");
|
||||
//发送的数据
|
||||
caud.setCmd("delUser");
|
||||
caud.setUser_type(0);
|
||||
caud.setUser_id(id+"");
|
||||
cau.setData(caud);
|
||||
//调用websocket,推送给设备
|
||||
ParamUtils.getRestaurantDevSn().stream().forEach(deviceNo ->{
|
||||
//设备号 com.evo.equipment.constant.Constants.EQ_DEVICE_CODE
|
||||
cau.setTo(deviceNo);
|
||||
WebSocketUsers.sendMessageToUsersByText(JSONObject.toJSONString(cau));
|
||||
});
|
||||
//删除设备图片
|
||||
eqSnDetailService.sendDelete(ParamUtils.getRestaurantDevSn(), Collections.asList( String.valueOf(id)));
|
||||
// //需要返回的对象
|
||||
// StaffDto cau = new StaffDto();
|
||||
// //发送的数据
|
||||
// StaffData caud = new StaffData();
|
||||
// //该接口固定为to_device,发送给设备用于识别对应哪个指令
|
||||
// cau.setCmd("to_device");
|
||||
// //无用值,空串
|
||||
// cau.setForm("");
|
||||
// //给服务端预留的补充字段,设备端不处理这个字段内容。设备在响应这条指令时原样返回
|
||||
// cau.setExtra("");
|
||||
// //发送的数据
|
||||
// caud.setCmd("delUser");
|
||||
// caud.setUser_type(0);
|
||||
// caud.setUser_id(id+"");
|
||||
// cau.setData(caud);
|
||||
// //调用websocket,推送给设备
|
||||
// ParamUtils.getRestaurantDevSn().stream().forEach(deviceNo ->{
|
||||
// //设备号 com.evo.equipment.constant.Constants.EQ_DEVICE_CODE
|
||||
// cau.setTo(deviceNo);
|
||||
// WebSocketUsers.sendMessageToUsersByText(JSONObject.toJSONString(cau));
|
||||
// });
|
||||
|
||||
//删除照片
|
||||
String img_name = rzRestaurantImages.getImageUrl().substring(rzRestaurantImages.getImageUrl().lastIndexOf("/")+1);
|
||||
|
||||
@ -14,15 +14,17 @@ import com.evo.restaurant.domain.RzRestaurantImages;
|
||||
import com.evo.restaurant.domain.RzRestaurantStatistics;
|
||||
import com.evo.restaurant.domain.vo.RzRestaurantStatisticsExportVo;
|
||||
import com.evo.restaurant.mapper.RzRestaurantDetailMapper;
|
||||
import com.evo.restaurant.mapper.RzRestaurantImagesMapper;
|
||||
import com.evo.restaurant.mapper.RzRestaurantStatisticsMapper;
|
||||
import com.evo.restaurant.service.IRzRestaurantStatisticsService;
|
||||
import com.evo.restaurant.utils.ExcelUtilCy;
|
||||
import com.evo.system.domain.SysStaff;
|
||||
import com.evo.system.domain.SysStaffDetail;
|
||||
import com.evo.system.mapper.*;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import com.evo.system.mapper.SysDeptMapper;
|
||||
import com.evo.system.mapper.SysDictDataMapper;
|
||||
import com.evo.system.mapper.SysStaffDetailMapper;
|
||||
import com.evo.system.mapper.SysStaffMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
@ -214,8 +214,10 @@ public class SysStaff extends BaseEntity
|
||||
|
||||
|
||||
private String extended;
|
||||
|
||||
//钉钉的用户ID
|
||||
private String dingUserId;
|
||||
//员工在当前开发者企业账号范围内的唯一标识。
|
||||
private String dingUnionId;
|
||||
//数据来源 1 平台, 2 钉钉
|
||||
private String source;
|
||||
|
||||
|
||||
@ -0,0 +1,15 @@
|
||||
package com.evo.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.evo.common.core.domain.entity.DeptMonthHistory;
|
||||
|
||||
/**
|
||||
* @desc: 接口
|
||||
* @ClassName:DeptMonthHistoryMapper
|
||||
* @date: 2026年08月15日 15:48
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
public interface DeptMonthHistoryMapper extends BaseMapper<DeptMonthHistory> {
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
package com.evo.system.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.evo.common.core.domain.entity.DeptMonthHistory;
|
||||
|
||||
/**
|
||||
* @desc: 接口
|
||||
* @ClassName:DeptMonthHistoryService
|
||||
* @date: 2026年08月15日 14:54
|
||||
* @company: 茹臣科技
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
public interface DeptMonthHistoryService extends IService<DeptMonthHistory> {
|
||||
|
||||
String getDeptMonthHistory(String month);
|
||||
}
|
||||
@ -1,6 +1,8 @@
|
||||
package com.evo.system.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.evo.common.core.domain.TreeSelect;
|
||||
import com.evo.common.core.domain.entity.SysDept;
|
||||
|
||||
@ -9,7 +11,7 @@ import com.evo.common.core.domain.entity.SysDept;
|
||||
*
|
||||
* @author evo
|
||||
*/
|
||||
public interface ISysDeptService
|
||||
public interface ISysDeptService extends IService<SysDept>
|
||||
{
|
||||
/**
|
||||
* 查询部门管理数据
|
||||
|
||||
@ -0,0 +1,35 @@
|
||||
package com.evo.system.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.evo.common.core.domain.entity.DeptMonthHistory;
|
||||
import com.evo.common.utils.Collections;
|
||||
import com.evo.system.mapper.DeptMonthHistoryMapper;
|
||||
import com.evo.system.service.DeptMonthHistoryService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @desc:
|
||||
* @ClassName:DeptMonthHistoryServiceImpl
|
||||
* @date: 2026年08月15日 15:30
|
||||
* @company: 茹臣科技
|
||||
* @author: andy.shi
|
||||
* @contact: 17330188597
|
||||
* @remark: 开发人员联系方式 1042025947@qq.com/微信同步
|
||||
*/
|
||||
|
||||
@Service
|
||||
public class DeptMonthHistoryServiceImpl extends ServiceImpl<DeptMonthHistoryMapper, DeptMonthHistory> implements DeptMonthHistoryService {
|
||||
|
||||
@Override
|
||||
public String getDeptMonthHistory(String month) {
|
||||
List<DeptMonthHistory> list = list(new LambdaQueryWrapper<DeptMonthHistory>().eq(DeptMonthHistory::getDateMonth, month).orderByDesc(DeptMonthHistory::getId));
|
||||
if(Collections.isNotEmpty(list)){
|
||||
return list.get(0).getDeptHistory();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,11 +1,10 @@
|
||||
package com.evo.system.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.evo.common.utils.Collections;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.evo.common.annotation.DataScope;
|
||||
import com.evo.common.constant.UserConstants;
|
||||
@ -351,9 +350,39 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
|
||||
@Override
|
||||
public List<TreeSelect> selectAllDeptList(){
|
||||
List<SysDept> depts = deptMapper.queryDeptTreeList();
|
||||
Map<Long, String> deptCodeMap = Collections.emptyMap();
|
||||
for (SysDept dept : depts) {
|
||||
String code = buildDept(dept, depts, deptCodeMap);
|
||||
deptCodeMap.put(dept.getDeptId(), code);
|
||||
dept.setDeptCode(code);
|
||||
}
|
||||
return buildDeptTreeSelect(depts);
|
||||
}
|
||||
|
||||
public String buildDept(SysDept dept, List<SysDept> deptList, Map<Long,String> showDeptNameMap){
|
||||
if(showDeptNameMap.containsKey(dept.getDeptId())){
|
||||
return showDeptNameMap.get(dept.getDeptId());
|
||||
}
|
||||
if(dept != null){
|
||||
if(StringUtils.isNotEmpty(dept.getDeptCode())){
|
||||
return dept.getDeptCode();
|
||||
}else{
|
||||
SysDept opt = deptList.stream().filter(d-> d.getDeptId().equals(dept.getParentId())).findFirst().orElse(null);
|
||||
if(opt == null){
|
||||
return null;
|
||||
}else{
|
||||
try {
|
||||
return buildDept(opt, deptList, showDeptNameMap);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有的公司
|
||||
* @return
|
||||
|
||||
@ -221,6 +221,7 @@ public class SysStaffServiceImpl extends ServiceImpl<SysStaffMapper, SysStaff> i
|
||||
//重新做员工入职
|
||||
if(StringUtils.isEmpty(sysStaff.getDingUserId())){
|
||||
sysStaff.setDingUserId(result.getString("userid"));
|
||||
sysStaff.setDingUnionId(result.getString("unionid"));
|
||||
getBaseMapper().updateById(sysStaff);
|
||||
}
|
||||
//做员工重新入职
|
||||
@ -260,6 +261,7 @@ public class SysStaffServiceImpl extends ServiceImpl<SysStaffMapper, SysStaff> i
|
||||
sysStaff.setContractStart(sysStaff.getEmploymentDate());
|
||||
sysStaff.setContractEnd(DateUtils.addYears(sysStaff.getEmploymentDate(), 1));
|
||||
sysStaff.setDingUserId(result.getString("userid"));
|
||||
sysStaff.setDingUnionId(result.getString("unionid"));
|
||||
sysStaff.setStatus(Constants.JOB_STATIS_0);
|
||||
sysStaff.setCreateTime(DateUtils.getNowDate());
|
||||
sysStaff.setCreateBy("admin-钉钉推送");
|
||||
@ -299,11 +301,9 @@ public class SysStaffServiceImpl extends ServiceImpl<SysStaffMapper, SysStaff> i
|
||||
if(upload != null){
|
||||
List<String> dkj_list = new ArrayList<String>();
|
||||
dkj_list.addAll(ParamUtils.getRestaurantDevSn()); //食堂
|
||||
// dkj_list.add(com.evo.equipment.constant.Constants.EQ_DEVICE_PUBLIC_CODE); //公共
|
||||
if(Collections.isNotEmpty(sysStaff.getTimeClockList())){
|
||||
dkj_list.addAll(sysStaff.getTimeClockList());
|
||||
}
|
||||
// dkj_list.add(sysStaff.getTimeClockList().get(1));
|
||||
//下发照片
|
||||
SysDept sysDept = deptMapper.selectDeptById(sysStaff.getDeptId());
|
||||
try {
|
||||
@ -410,11 +410,23 @@ public class SysStaffServiceImpl extends ServiceImpl<SysStaffMapper, SysStaff> i
|
||||
if(StringUtils.isNotEmpty(sysStaff.getCode())){
|
||||
KingdeeRequestUtils.employeeDisabled(Collections.asMap("userCode","\""+sysStaff.getCode()+"\""));
|
||||
}
|
||||
|
||||
//如果走离职, 需要实时计算出工资
|
||||
//还原原始状态, 用于计算离职工资
|
||||
sysStaff.setStatus(oldStatus);
|
||||
rzSalaryDetailService.dimission(sysStaff);
|
||||
|
||||
try {
|
||||
//清理打卡机照片
|
||||
List<String> dkj_list = Collections.asList(ParamUtils.getRestaurantDevSn());
|
||||
if(Collections.isNotEmpty(sysStaff.getTimeClockList())){
|
||||
dkj_list.addAll(sysStaff.getTimeClockList());
|
||||
}
|
||||
eqSnDetailService.sendDelete(dkj_list, Collections.asList( String.valueOf(sysStaff.getUserId())));
|
||||
} catch (Exception e) {
|
||||
log.error("清理员工照片信息失败", e.getMessage());
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
return AjaxResult.success();
|
||||
}
|
||||
}
|
||||
@ -430,54 +442,54 @@ public class SysStaffServiceImpl extends ServiceImpl<SysStaffMapper, SysStaff> i
|
||||
//根据员工ID查询原来的数据信息
|
||||
SysStaff old_staff = getBaseMapper().selectSysStaffByUserId(sysStaff.getUserId());
|
||||
//检查是否修改岗位
|
||||
if(StringUtils.isEmpty(old_staff.getJobCode()) && StringUtils.isNotEmpty(sysStaff.getJobCode()) ||
|
||||
StringUtils.isNotEmpty(old_staff.getJobCode()) && StringUtils.isEmpty(sysStaff.getJobCode()) ||
|
||||
StringUtils.isNotEmpty(old_staff.getJobCode()) && StringUtils.isNotEmpty(sysStaff.getJobCode()) && !old_staff.getJobCode().equals(sysStaff.getJobCode())) {
|
||||
String deptNum = "";
|
||||
String positionNum = "";
|
||||
if(StringUtils.isNotEmpty(sysStaff.getJobCode())){
|
||||
deptNum = sysStaff.getJobCode().split("_")[1];
|
||||
positionNum = sysStaff.getJobCode().split("_")[0];
|
||||
}
|
||||
String oldPositionNum = "";
|
||||
if(StringUtils.isNotEmpty(old_staff.getJobCode())){
|
||||
oldPositionNum = old_staff.getJobCode().split("_")[0];
|
||||
}
|
||||
String fstaffId = "";
|
||||
String fid = null;
|
||||
JSONObject extended = new JSONObject();
|
||||
if(StringUtils.isNotEmpty(sysStaff.getExtended())){
|
||||
extended = JSON.parseObject(sysStaff.getExtended());
|
||||
fstaffId = extended.getString("FSTAFFID");
|
||||
fid = extended.getString("FID");
|
||||
}
|
||||
|
||||
|
||||
//都为空, 不确定金蝶是否存在员工信息
|
||||
if(StringUtils.isEmpty(fid) && StringUtils.isEmpty(fstaffId)){
|
||||
//查询金蝶的表单
|
||||
String result = KingdeeRequestUtils.executeBillQuery(Collections.asMap("userCode", sysStaff.getCode()), KingdeeParamsEnum.Employee.DOCUMENT_INQUIRY);
|
||||
JSONArray resJS = JSON.parseArray(result);
|
||||
if(resJS.size() > 0){
|
||||
fid = resJS.getJSONArray(0).getString(0);
|
||||
extended.put("FID", fid);
|
||||
}
|
||||
}
|
||||
//如果fid还为空, 则证明金蝶不存在员工信息
|
||||
if(StringUtils.isEmpty(fid)){
|
||||
if(StringUtils.isNotEmpty(sysStaff.getJobCode())){
|
||||
sysStaff.setExtended(KingdeeRequestUtils.employeeSave(Collections.asMap("userName", sysStaff.getName(), "userCode", sysStaff.getCode(), "jobCode", sysStaff.getJobCode().split("_")[0],"deptCode", sysStaff.getJobCode().split("_")[1])));
|
||||
}else if(StringUtils.isEmpty(sysStaff.getJobCode())){
|
||||
sysStaff.setExtended(KingdeeRequestUtils.employeeSaveEmptyJob(Collections.asMap("userName", sysStaff.getName(), "userCode", sysStaff.getCode())));
|
||||
}
|
||||
}else{
|
||||
String result = KingdeeRequestUtils.updateJobInfo(Collections.asMap( "userCode", sysStaff.getCode(), "deptCode", deptNum, "jobCode", positionNum, "oldJobCode", oldPositionNum,"FSTAFFID", fstaffId));
|
||||
if(StringUtils.isNotEmpty(result)){
|
||||
extended.put("FSTAFFID",JSON.parseObject(result).getString("FSTAFFID"));
|
||||
sysStaff.setExtended(extended.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
// if(StringUtils.isEmpty(old_staff.getJobCode()) && StringUtils.isNotEmpty(sysStaff.getJobCode()) ||
|
||||
// StringUtils.isNotEmpty(old_staff.getJobCode()) && StringUtils.isEmpty(sysStaff.getJobCode()) ||
|
||||
// StringUtils.isNotEmpty(old_staff.getJobCode()) && StringUtils.isNotEmpty(sysStaff.getJobCode()) && !old_staff.getJobCode().equals(sysStaff.getJobCode())) {
|
||||
// String deptNum = "";
|
||||
// String positionNum = "";
|
||||
// if(StringUtils.isNotEmpty(sysStaff.getJobCode())){
|
||||
// deptNum = sysStaff.getJobCode().split("_")[1];
|
||||
// positionNum = sysStaff.getJobCode().split("_")[0];
|
||||
// }
|
||||
// String oldPositionNum = "";
|
||||
// if(StringUtils.isNotEmpty(old_staff.getJobCode())){
|
||||
// oldPositionNum = old_staff.getJobCode().split("_")[0];
|
||||
// }
|
||||
// String fstaffId = "";
|
||||
// String fid = null;
|
||||
// JSONObject extended = new JSONObject();
|
||||
// if(StringUtils.isNotEmpty(sysStaff.getExtended())){
|
||||
// extended = JSON.parseObject(sysStaff.getExtended());
|
||||
// fstaffId = extended.getString("FSTAFFID");
|
||||
// fid = extended.getString("FID");
|
||||
// }
|
||||
//
|
||||
//
|
||||
// //都为空, 不确定金蝶是否存在员工信息
|
||||
// if(StringUtils.isEmpty(fid) && StringUtils.isEmpty(fstaffId)){
|
||||
// //查询金蝶的表单
|
||||
// String result = KingdeeRequestUtils.executeBillQuery(Collections.asMap("userCode", sysStaff.getCode()), KingdeeParamsEnum.Employee.DOCUMENT_INQUIRY);
|
||||
// JSONArray resJS = JSON.parseArray(result);
|
||||
// if(resJS.size() > 0){
|
||||
// fid = resJS.getJSONArray(0).getString(0);
|
||||
// extended.put("FID", fid);
|
||||
// }
|
||||
// }
|
||||
// //如果fid还为空, 则证明金蝶不存在员工信息
|
||||
// if(StringUtils.isEmpty(fid)){
|
||||
// if(StringUtils.isNotEmpty(sysStaff.getJobCode())){
|
||||
// sysStaff.setExtended(KingdeeRequestUtils.employeeSave(Collections.asMap("userName", sysStaff.getName(), "userCode", sysStaff.getCode(), "jobCode", sysStaff.getJobCode().split("_")[0],"deptCode", sysStaff.getJobCode().split("_")[1])));
|
||||
// }else if(StringUtils.isEmpty(sysStaff.getJobCode())){
|
||||
// sysStaff.setExtended(KingdeeRequestUtils.employeeSaveEmptyJob(Collections.asMap("userName", sysStaff.getName(), "userCode", sysStaff.getCode())));
|
||||
// }
|
||||
// }else{
|
||||
// String result = KingdeeRequestUtils.updateJobInfo(Collections.asMap( "userCode", sysStaff.getCode(), "deptCode", deptNum, "jobCode", positionNum, "oldJobCode", oldPositionNum,"FSTAFFID", fstaffId));
|
||||
// if(StringUtils.isNotEmpty(result)){
|
||||
// extended.put("FSTAFFID",JSON.parseObject(result).getString("FSTAFFID"));
|
||||
// sysStaff.setExtended(extended.toString());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//判断员工更换公司
|
||||
if(!old_staff.getCompanyName().equals(sysStaff.getCompanyName())) {
|
||||
SysStaffDetail sysStaffDetail = sysStaffDetailMapper.selectSysStaffDetailByStaffId(sysStaff.getUserId());
|
||||
|
||||
@ -1,9 +1,15 @@
|
||||
package com.evo.task;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.evo.attendance.service.IRzAbnormalDetailService;
|
||||
import com.evo.attendance.service.IRzAttendanceService;
|
||||
import com.evo.attendance.service.IRzAttendanceStatisticalService;
|
||||
import com.evo.attendance.service.RzAttendanceDetailService;
|
||||
import com.evo.common.core.domain.AjaxResult;
|
||||
import com.evo.common.core.domain.entity.DeptMonthHistory;
|
||||
import com.evo.common.core.domain.entity.SysDept;
|
||||
import com.evo.common.utils.DateUtils;
|
||||
import com.evo.common.utils.ParamUtils;
|
||||
import com.evo.personnelMatters.domain.RzMealExpenses;
|
||||
@ -13,6 +19,8 @@ import com.evo.restaurant.domain.RzRestaurantStatistics;
|
||||
import com.evo.restaurant.service.IRzRestaurantImagesService;
|
||||
import com.evo.restaurant.service.IRzRestaurantStatisticsService;
|
||||
import com.evo.system.domain.SysStaff;
|
||||
import com.evo.system.service.DeptMonthHistoryService;
|
||||
import com.evo.system.service.ISysDeptService;
|
||||
import com.evo.system.service.ISysStaffService;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
@ -41,6 +49,10 @@ public class TaskController {
|
||||
private RzAttendanceDetailService rzAttendanceDetailService;
|
||||
@Resource
|
||||
private RzMealExpensesService rzMealExpensesService;
|
||||
@Resource
|
||||
private ISysDeptService sysDeptService;
|
||||
@Resource
|
||||
private DeptMonthHistoryService deptMonthHistoryService;
|
||||
/**
|
||||
* 每月1号 0:20 自动生成考勤数据
|
||||
*/
|
||||
@ -80,6 +92,18 @@ public class TaskController {
|
||||
rzRestaurantStatisticsService.correct(rzRestaurantStatistics);
|
||||
}
|
||||
|
||||
/**
|
||||
* 每月1号 2:00 自动生成组织历史记录
|
||||
*/
|
||||
@Scheduled(cron = "0 0 2 1 * ?")
|
||||
public void autoCreateDeptHistory(){
|
||||
List<SysDept> deptList = sysDeptService.list(new LambdaQueryWrapper<SysDept>());
|
||||
DeptMonthHistory history = new DeptMonthHistory();
|
||||
history.setDeptHistory(JSONArray.toJSONString(deptList));
|
||||
history.setDateMonth(DateUtil.format(DateUtils.addMonths(new Date(), -1), "yyyy-MM"));
|
||||
deptMonthHistoryService.save(history);
|
||||
};
|
||||
|
||||
/**
|
||||
* 每天凌晨3点核算前一天的考勤情况
|
||||
*/
|
||||
@ -106,12 +130,17 @@ public class TaskController {
|
||||
abnormalDetailService.insertRzAbnormalDetail();
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
* 每天9点推送前一天未打卡信息
|
||||
*/
|
||||
@Scheduled(cron = "0 0 9 * * ?")
|
||||
public void autoAbnormalAttendance(){
|
||||
rzAttendanceService.sendAbnormalAttendance();
|
||||
}
|
||||
|
||||
/***
|
||||
* 每天10点推送超过3填未打卡信息
|
||||
*/
|
||||
@Scheduled(cron = "0 0 10 * * ?")
|
||||
public void autoAttendanceDetail() throws ParseException {
|
||||
rzAttendanceDetailService.sendAttendanceDetail();
|
||||
|
||||
@ -118,7 +118,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
and ss.del_flag = '0'
|
||||
and ssd.daily_wage > 0
|
||||
and ss.zs_Flag = '否'
|
||||
and status != '-1'
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDeptVo">
|
||||
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.leader, d.phone,d.status, d.del_flag,d.is_over_time, d.is_show_financial, d.create_by, d.create_time, d.ding_id
|
||||
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.dept_code, d.leader, d.phone,d.status, d.del_flag,d.is_over_time, d.is_show_financial, d.create_by, d.create_time, d.ding_id
|
||||
from sys_dept d
|
||||
</sql>
|
||||
|
||||
@ -65,7 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
<select id="selectDeptById" parameterType="Long" resultMap="SysDeptResult">
|
||||
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.leader, d.phone, d.status,d.is_over_time,
|
||||
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.dept_code, d.leader, d.phone, d.status,d.is_over_time,
|
||||
(select dept_name from sys_dept where dept_id = d.parent_id) parent_name
|
||||
from sys_dept d
|
||||
where d.dept_id = #{deptId}
|
||||
@ -98,6 +98,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="deptId != null and deptId != 0">dept_id,</if>
|
||||
<if test="parentId != null and parentId != 0">parent_id,</if>
|
||||
<if test="deptName != null and deptName != ''">dept_name,</if>
|
||||
<if test="deptCode != null and deptCode != ''">dept_code,</if>
|
||||
<if test="ancestors != null and ancestors != ''">ancestors,</if>
|
||||
<if test="leader != null and leader != ''">leader,</if>
|
||||
<if test="phone != null and phone != ''">phone,</if>
|
||||
@ -112,6 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="deptId != null and deptId != 0">#{deptId},</if>
|
||||
<if test="parentId != null and parentId != 0">#{parentId},</if>
|
||||
<if test="deptName != null and deptName != ''">#{deptName},</if>
|
||||
<if test="deptCode != null and deptCode != ''">#{deptCode},</if>
|
||||
<if test="ancestors != null and ancestors != ''">#{ancestors},</if>
|
||||
<if test="leader != null and leader != ''">#{leader},</if>
|
||||
<if test="phone != null and phone != ''">#{phone},</if>
|
||||
@ -129,6 +131,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<set>
|
||||
<if test="parentId != null and parentId != 0">parent_id = #{parentId},</if>
|
||||
<if test="deptName != null and deptName != ''">dept_name = #{deptName},</if>
|
||||
<if test="deptCode != null and deptCode != ''">dept_code = #{deptCode},</if>
|
||||
<if test="ancestors != null and ancestors != ''">ancestors = #{ancestors},</if>
|
||||
<if test="leader != null">leader = #{leader},</if>
|
||||
<if test="phone != null">phone = #{phone},</if>
|
||||
|
||||
@ -52,7 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="extended" column="extended" />
|
||||
<result property="dingUserId" column="ding_user_id" />
|
||||
<result property="source" column="source" />
|
||||
<result property="dingUserId" column="ding_user_id" />
|
||||
<result property="dingUnionId" column="ding_union_id" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
@ -62,7 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
quit_date, contract_start, contract_end, contract_type, social_type, seniority, is_overtime_pay,
|
||||
zs_flag, secrecy, injury, insurance, introducer, clock_in, status,
|
||||
wages_ratio_date, remarks, del_flag, create_by, create_time, update_by,
|
||||
update_time, image_url,time_clock,subsidys, job_code, extended, openid, ding_user_id, source
|
||||
update_time, image_url,time_clock,subsidys, job_code, extended, openid, ding_user_id, ding_union_id, source
|
||||
from sys_staff
|
||||
</sql>
|
||||
|
||||
@ -154,6 +154,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="openid != null">openid,</if>
|
||||
<if test="source != null">source,</if>
|
||||
<if test="dingUserId != null">ding_user_id,</if>
|
||||
<if test="dingUnionId != null">ding_union_id,</if>
|
||||
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
@ -206,6 +207,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="openid != null">#{openid},</if>
|
||||
<if test="source != null">#{source},</if>
|
||||
<if test="dingUserId != null">#{dingUserId},</if>
|
||||
<if test="dingUnionId != null">#{dingUnionId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -260,6 +262,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="extended != null and extended != ''">extended=#{extended},</if>
|
||||
<if test="openid != null">openid=#{openid},</if>
|
||||
<if test="dingUserId != null">ding_user_id= #{dingUserId},</if>
|
||||
<if test="dingUnionId != null">ding_union_id= #{dingUnionId},</if>
|
||||
</trim>
|
||||
where user_id = #{userId}
|
||||
</update>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user