|
@@ -29,10 +29,7 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
+import java.util.*;
|
|
|
|
|
|
@Api(description="投保信息")
|
|
|
@RestController
|
|
@@ -157,4 +154,35 @@ public class InsuranceApplicationController {
|
|
|
|
|
|
return msgResult;
|
|
|
}
|
|
|
+
|
|
|
+ @ApiOperation(value="提交保单")
|
|
|
+ @RequestMapping(value = "submit",method = RequestMethod.POST)
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "id",value = "编号", required = true, paramType = "form",dataType = "String")
|
|
|
+ })
|
|
|
+ public MessageResult<InsuranceApplication> submit(@RequestParam(value="id",defaultValue="") String id,
|
|
|
+ HttpServletRequest request){
|
|
|
+ AttributePrincipal principal = (AttributePrincipal) request.getUserPrincipal();
|
|
|
+
|
|
|
+ MessageResult<InsuranceApplication> msgResult = new MessageResult<>();
|
|
|
+
|
|
|
+ try {
|
|
|
+ InsuranceApplication insuranceApplication = insuranceApplicationService.get(id);
|
|
|
+
|
|
|
+ insuranceApplication.setStatus("20");
|
|
|
+ insuranceApplication.setUpdateBy(principal.getName());
|
|
|
+ insuranceApplication.setUpdateTime(new Date());
|
|
|
+ int affectCount = insuranceApplicationService.update(insuranceApplication);
|
|
|
+
|
|
|
+ msgResult.setResult(true);
|
|
|
+ }
|
|
|
+ catch(Exception ex){
|
|
|
+ logger.error(ex.getMessage(),ex);
|
|
|
+
|
|
|
+ msgResult.setResult(false);
|
|
|
+ msgResult.setMessage(ex.getMessage());
|
|
|
+ }
|
|
|
+
|
|
|
+ return msgResult;
|
|
|
+ }
|
|
|
}
|