Commit c201763d by ilal

提交

parent 988fe00a
......@@ -1274,22 +1274,17 @@ public class SalaryManagementController {
@PostMapping(value = "/payimport")
@ApiOperation(value = "导入薪资", httpMethod = "POST", notes = "接口发布说明")
public ResponseResult ImportSalaryData(@CurrentUser UserBean userBean,@RequestBody ImportSalarySetDto impor) {
// XcglAdminXzz xzz = new LambdaQueryChainWrapper<XcglAdminXzz>(xcgladminxzzmapper).eq(XcglAdminXzz::getId, impor.getGid()).one();
//用户工号来匹配入库
//XcglAssoXzury xzuryone = new LambdaQueryChainWrapper<XcglAssoXzury>(xcglassoxzurymapper).eq(XcglAssoXzury::getQyid, orgCode).eq(XcglAssoXzury::getXzzid, impor.getGid()).eq(XcglAssoXzury::getUserid, impor.getUsernum()).one();
//用户名称来匹配入库
//XcglAssoXzury yhmpp = xcglassoxzurymapper.selectImportedSalary(impor.getGid(),impor.getUsername(),String.valueOf(orgCode));
ImportSalaryDto[] ims = impor.getImsalary();//
if(ims.length>0){
for(int p=0;p<ims.length;p++){
//用户工号来匹配入库
XcglAssoXzury xzuryone = new LambdaQueryChainWrapper<XcglAssoXzury>(xcglassoxzurymapper).eq(XcglAssoXzury::getQyid, userBean.getOrgCode()).eq(XcglAssoXzury::getXzzid, impor.getGid()).eq(XcglAssoXzury::getUserid, ims[p].getUsernum()).one();
XcglAssoXzury xzuryone = new LambdaQueryChainWrapper<XcglAssoXzury>(xcglassoxzurymapper).eq(XcglAssoXzury::getQyid, userBean.getOrgCode())
.eq(XcglAssoXzury::getXzzid, impor.getGid()).eq(XcglAssoXzury::getUserid, ims[p].getUsernum()).one();
//用户名称来匹配入库
XcglAssoXzury yhmpp = xcglassoxzurymapper.selectImportedSalary(impor.getGid(),ims[p].getUsername(),String.valueOf(userBean.getOrgCode()));
// XcglAssoXzury yhmpp = xcglassoxzurymapper.selectImportedSalary(impor.getGid(),ims[p].getUsername(),String.valueOf(userBean.getOrgCode()));
int k = 0;
if(xzuryone != null) {
......@@ -1302,18 +1297,18 @@ public class SalaryManagementController {
xcglassoxzbmapper.ModifyImportedSalary(xzb);
k++;
}
if(yhmpp != null && k == 0) {
XcglAssoXzb xzb = XcglAssoXzb.builder().build();
xzb.setUserid(yhmpp.getUserid());//
xzb.setXzyf(impor.getSxrq());//
xzb.setXzxid(ims[p].getJsgzzx());//
xzb.setXzxjg(Double.valueOf(ims[p].getSrz()));//
xzb.setQyid(userBean.getOrgCode());
xcglassoxzbmapper.ModifyImportedSalary(xzb);
}
// if(yhmpp != null && k == 0) {
// XcglAssoXzb xzb = XcglAssoXzb.builder().build();
// xzb.setUserid(yhmpp.getUserid());//
// xzb.setXzyf(impor.getSxrq());//
// xzb.setXzxid(ims[p].getJsgzzx());//
// xzb.setXzxjg(Double.valueOf(ims[p].getSrz()));//
// xzb.setQyid(userBean.getOrgCode());
// xcglassoxzbmapper.ModifyImportedSalary(xzb);
// }
}
}
return new ResponseResult().success("考勤数据同步成功");
return new ResponseResult().success("导入成功");
}
......
......@@ -24,6 +24,8 @@ public class PayTermDto implements Serializable {
String xgsgs;// 项公式
Integer xiscustom;//是否自定义项(0:否;1:是)
Integer xrulestate;//
/**
* 公式变量值1
*/
......
......@@ -35,6 +35,7 @@
<result column="xdegk" property="xdegk"/>
<result column="xjxgzid" property="xjxgzid"/>
<result column="xiscustom" property="xiscustom"/>
<result column="xrulestate" property="xrulestate"/>
</resultMap>
......@@ -64,7 +65,8 @@
gzzx.gsgs as xgsgs,
gzzx.dygk as xdygk,
gzzx.degk as xdegk,
gzzx.is_custom as xiscustom
gzzx.is_custom as xiscustom,
gzzx.rulestate as xrulestate
from xcgl_asso_jsgzzx gzzx
where gzzx.jxgzid = 0
and gzzx.xzzid = #{xzzid}
......
......@@ -34,6 +34,7 @@
<result column="xjxgzid" property="xjxgzid"/>
<result column="xoptionid" property="xoptionid"/>
<result column="xiscustom" property="xiscustom"/>
<result column="xrulestate" property="xrulestate"/>
</collection>
</resultMap>
......@@ -188,7 +189,8 @@
gzzx.jxgzid as xjxgzid,
gzzx.optionid as xoptionid,
jxgz.xzzid as zxzzid,
gzzx.is_custom as xiscustom
gzzx.is_custom as xiscustom,
gzzx.rulestate as xrulestate
from xcgl_asso_jxgz jxgz
LEFT JOIN xcgl_asso_jsgzzx as gzzx on gzzx.jxgzid = jxgz.id
where jxgz.xzzid = #{xzzid}
......
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