|
@@ -3,6 +3,8 @@ package com.jpsoft.picc.modules.business.controller;
|
|
import com.github.pagehelper.Page;
|
|
import com.github.pagehelper.Page;
|
|
import com.jpsoft.picc.modules.base.entity.InsuranceAgent;
|
|
import com.jpsoft.picc.modules.base.entity.InsuranceAgent;
|
|
import com.jpsoft.picc.modules.base.service.InsuranceAgentService;
|
|
import com.jpsoft.picc.modules.base.service.InsuranceAgentService;
|
|
|
|
+import com.jpsoft.picc.modules.business.entity.InsuranceApplication;
|
|
|
|
+import com.jpsoft.picc.modules.business.service.InsuranceApplicationService;
|
|
import com.jpsoft.picc.modules.business.service.InsurancePolicyRecordService;
|
|
import com.jpsoft.picc.modules.business.service.InsurancePolicyRecordService;
|
|
import com.jpsoft.picc.modules.common.utils.PojoUtils;
|
|
import com.jpsoft.picc.modules.common.utils.PojoUtils;
|
|
import com.jpsoft.picc.modules.common.dto.Sort;
|
|
import com.jpsoft.picc.modules.common.dto.Sort;
|
|
@@ -39,6 +41,9 @@ public class InsurancePolicyController {
|
|
@Autowired
|
|
@Autowired
|
|
private InsurancePolicyRecordService insurancePolicyRecordService;
|
|
private InsurancePolicyRecordService insurancePolicyRecordService;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private InsuranceApplicationService insuranceApplicationService;
|
|
|
|
+
|
|
@ApiOperation(value="创建空记录")
|
|
@ApiOperation(value="创建空记录")
|
|
@GetMapping("create")
|
|
@GetMapping("create")
|
|
public MessageResult<InsurancePolicy> create(){
|
|
public MessageResult<InsurancePolicy> create(){
|
|
@@ -391,4 +396,38 @@ public class InsurancePolicyController {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value="企业缴费")
|
|
|
|
+ @RequestMapping(value = "pay",method = RequestMethod.POST)
|
|
|
|
+ @ApiImplicitParams({
|
|
|
|
+ @ApiImplicitParam(name="applicationId",value = "投保单ID",required = true,paramType = "query"),
|
|
|
|
+ @ApiImplicitParam(name="policyId",value = "每月投保单ID",required = true,paramType = "query")
|
|
|
|
+ })
|
|
|
|
+ public MessageResult<Integer> pay(String applicationId,String policyId, @RequestAttribute String subject){
|
|
|
|
+
|
|
|
|
+ //当前用户ID
|
|
|
|
+ System.out.println(subject);
|
|
|
|
+
|
|
|
|
+ MessageResult<Integer> msgResult = new MessageResult<>();
|
|
|
|
+
|
|
|
|
+ InsuranceApplication insuranceApplication = insuranceApplicationService.get(applicationId);
|
|
|
|
+
|
|
|
|
+ insuranceApplication.setStatus("50");//状态改为待出单
|
|
|
|
+
|
|
|
|
+ int affectCount = insuranceApplicationService.update(insuranceApplication);
|
|
|
|
+
|
|
|
|
+ if(affectCount>0){
|
|
|
|
+ InsurancePolicy insurancePolicy = insurancePolicyService.get(policyId);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ msgResult.setResult(true);
|
|
|
|
+ msgResult.setData(affectCount);
|
|
|
|
+
|
|
|
|
+ return msgResult;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|