Commit 53f070ff by mobh Committed by chenzg

修改问题

parent 1a1d630e
...@@ -915,6 +915,10 @@ public class SalaryManagementController { ...@@ -915,6 +915,10 @@ public class SalaryManagementController {
@ApiOperation(value = "删除薪资组自定义表头", httpMethod = "DELETE", notes = "接口发布说明") @ApiOperation(value = "删除薪资组自定义表头", httpMethod = "DELETE", notes = "接口发布说明")
public ResponseResult customdelete(@CurrentUser UserBean userBean,@PathVariable Integer id) { public ResponseResult customdelete(@CurrentUser UserBean userBean,@PathVariable Integer id) {
XcglAssoXzdazdy.builder().build().deleteById(id); XcglAssoXzdazdy.builder().build().deleteById(id);
// 同时删除已添加到薪资组(未锁定的组)中的薪资项
xcglassojsgzzxmapper.deleteByxzdazdyid(id);
return new ResponseResult().success("删除成功", id); return new ResponseResult().success("删除成功", id);
} }
......
...@@ -32,5 +32,10 @@ public interface XcglAssoJsgzzxMapper extends BaseMapper<XcglAssoJsgzzx> { ...@@ -32,5 +32,10 @@ public interface XcglAssoJsgzzxMapper extends BaseMapper<XcglAssoJsgzzx> {
List<XcglAssoJsgzzx> SalaryRuleGroupItem(int xzzid); List<XcglAssoJsgzzx> SalaryRuleGroupItem(int xzzid);
int insertxcglassojsgzzxListTwo(List<XcglAssoJsgzzx> xcglassojsgzzx); /**
* 删除薪资档案值的同时删除已添加到薪资组(未锁定的组)中的薪资项
* @param xzdazdyid
* @return
*/
int deleteByxzdazdyid(int xzdazdyid);
} }
...@@ -41,7 +41,7 @@ public class Page { ...@@ -41,7 +41,7 @@ public class Page {
this.totalPage = totalPage; this.totalPage = totalPage;
} }
public Integer getOffset() { public Integer getOffset() {
return this.currentPage > 0 ? (this.currentPage - 1) * this.totalPage : 0; return this.getCurrentPage() > 0 ? (this.getCurrentPage() - 1) * this.totalPage : 0;
} }
public void setOffset(Integer offset) { public void setOffset(Integer offset) {
......
...@@ -97,6 +97,12 @@ ...@@ -97,6 +97,12 @@
DELETE FROM xcgl_asso_jsgzzx DELETE FROM xcgl_asso_jsgzzx
WHERE xzzid = #{xzzid} WHERE xzzid = #{xzzid}
</delete> </delete>
<!-- 删除薪资档案值的同时删除已添加到薪资组(未锁定的组)中的薪资项 -->
<delete id="deleteByxzdazdyid">
delete jsgzzx from xcgl_asso_jsgzzx jsgzzx, xcgl_admin_xzz xxz
where jsgzzx.xzdazdyid = #{xzdazdyid} and xxz.is_xzsd = 0
and jsgzzx.xzzid = xxz.id
</delete>
<insert id="insertxcglassojsgzzxList" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id" > <insert id="insertxcglassojsgzzxList" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id" >
insert into xcgl_asso_jsgzzx (salaryitem,yhmbzd,rule,type,addtime,adduserid,jxgzid,remarks,gsid,gsgs,dygk,degk,xzzid,rulestate,optionid) insert into xcgl_asso_jsgzzx (salaryitem,yhmbzd,rule,type,addtime,adduserid,jxgzid,remarks,gsid,gsgs,dygk,degk,xzzid,rulestate,optionid)
......
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