Commit f3127a6c by ilal

提交

parent 98386efe
...@@ -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
...@@ -499,6 +499,19 @@ public class SocialSecurityFundController { ...@@ -499,6 +499,19 @@ public class SocialSecurityFundController {
} }
@GetMapping(value = "/insure_details/{name}")
@ApiOperation(value = "投保事件", httpMethod = "GET", notes = "接口发布说明")
public ResponseResult insureDetails(@CurrentUser UserBean userBean,@PathVariable String name) {
List<SbgjjAssoCbfa> cbfalist = new LambdaQueryChainWrapper<SbgjjAssoCbfa>(sbgjjassocbfamapper).eq(SbgjjAssoCbfa::getCbcs, name)
.eq(SbgjjAssoCbfa::getQyid, userBean.getOrgCode()).list();
return new ResponseResult().success("成功", cbfalist);
}
@Autowired @Autowired
private SbgjjAssoDetailedMapper sbgjjassodetailedmapper; private SbgjjAssoDetailedMapper sbgjjassodetailedmapper;
...@@ -555,6 +568,8 @@ public class SocialSecurityFundController { ...@@ -555,6 +568,8 @@ public class SocialSecurityFundController {
cbry.setSbfaid(insuredto.getSbfaid()); cbry.setSbfaid(insuredto.getSbfaid());
cbry.setGjjfaid(insuredto.getGjjfaid()); cbry.setGjjfaid(insuredto.getGjjfaid());
cbry.setIsUse(1);//是否使用 0:否 1:是
sbgjjadmincbrymapper.insertsbgjjadmincbry(cbry); sbgjjadmincbrymapper.insertsbgjjadmincbry(cbry);
int cbryid = cbry.getId();//参保人员 int cbryid = cbry.getId();//参保人员
...@@ -607,8 +622,9 @@ public class SocialSecurityFundController { ...@@ -607,8 +622,9 @@ public class SocialSecurityFundController {
SbgjjAssoCbfa sbgjjfa = SbgjjAssoCbfa.builder().id(sbjs.getCbfaid()).build().selectById(); SbgjjAssoCbfa sbgjjfa = SbgjjAssoCbfa.builder().id(sbjs.getCbfaid()).build().selectById();
deta.setCbfns(sbgjjfa.getCbmcName());//参保方案 deta.setCbfns(sbgjjfa.getCbmcName());//参保方案
deta.setSbjss(insuredto.getJnjs());//社保基数
deta.setGjjjss(insuredto.getGjjJnjs());//公积金基数 deta.setSbjss(insuredto.getJnjs());//社保基数******************
deta.setGjjjss(insuredto.getGjjJnjs());//公积金基数************
detalis.add(deta); detalis.add(deta);
...@@ -931,11 +947,22 @@ public class SocialSecurityFundController { ...@@ -931,11 +947,22 @@ public class SocialSecurityFundController {
// cbry.setId(insuredto.getId()); // cbry.setId(insuredto.getId());
// cbry.updateById(); // cbry.updateById();
int isUse = 1;//是否使用 0:否 1:是
SbgjjAdminCbry ascb = SbgjjAdminCbry.builder().id(insuredto.getId()).build().selectById();
if(ascb.getSbjlStatime().equals(insuredto.getJnmouth()) || ascb.getGjjjlStatime().equals(insuredto.getGjjJnmouth())) {
isUse = 0;
}
SbgjjAdminCbry cbrytwo = SbgjjAdminCbry.builder().build(); SbgjjAdminCbry cbrytwo = SbgjjAdminCbry.builder().build();
cbrytwo.setState(0);//状态 1:使用中;0:历史记录 cbrytwo.setState(0);//状态 1:使用中;0:历史记录
cbrytwo.setId(insuredto.getId()); cbrytwo.setId(insuredto.getId());
cbrytwo.setIsUse(isUse);
cbrytwo.updateById(); cbrytwo.updateById();
SbgjjAdminCbry cbry = SbgjjAdminCbry.builder().build(); SbgjjAdminCbry cbry = SbgjjAdminCbry.builder().build();
cbry.setUserNum(insuredto.getUsernum()); cbry.setUserNum(insuredto.getUsernum());
if(insuredto.getSb()) { if(insuredto.getSb()) {
...@@ -971,6 +998,8 @@ public class SocialSecurityFundController { ...@@ -971,6 +998,8 @@ public class SocialSecurityFundController {
cbry.setSbfaid(insuredto.getSbfaid()); cbry.setSbfaid(insuredto.getSbfaid());
cbry.setGjjfaid(insuredto.getGjjfaid()); cbry.setGjjfaid(insuredto.getGjjfaid());
cbry.setIsUse(1);//是否使用 0:否 1:是
sbgjjadmincbrymapper.insertsbgjjadmincbry(cbry); sbgjjadmincbrymapper.insertsbgjjadmincbry(cbry);
......
...@@ -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" >
...@@ -285,7 +286,10 @@ ...@@ -285,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=",">
...@@ -344,7 +348,10 @@ ...@@ -344,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>
......
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
left join zzgl_bmgw_m um on um.id = m.up_id left join zzgl_bmgw_m um on um.id = m.up_id
) as bmgw on bmgw.mid = emp.bmgw_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 1=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}
......
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