| | |
| | | |
| | | public enum ApplyLogType { |
| | | UPLOAD(0, "提交投保","提交意见:${param}"), |
| | | PLATFORM_RETURN(1, "申请退回","提交意见:${param}"), |
| | | PLATFORM_RETURN(1, "审核不通过","提交意见:${param}"), |
| | | WAIT_SIGNATURE(2, "上传投保单","提交意见:${param}"), |
| | | SIGNATURE(3, "企业签章",""), |
| | | FAIL_RETURN(4, "保单出具失败退回","提交意见:${param}"), |
| | |
| | | @ApiModel("投保申请操作历史表") |
| | | @TableName("`apply_log`") |
| | | public class ApplyLog { |
| | | public ApplyLog(){ |
| | | |
| | | } |
| | | public ApplyLog(InsuranceApply apply,String title,String content,Integer objId,Integer objType, String before,String after){ |
| | | this.title =title; |
| | | this.content=content; |
| | | this.applyId = apply.getId(); |
| | | this.createDate =apply.getEditDate(); |
| | | this.editor =apply.getEditor(); |
| | | this.status = apply.getStatus(); |
| | | this.objId=objId; |
| | | this.objType = objType; |
| | | this.beforeContent=before; |
| | | this.afterContent=after; |
| | | } |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主键", example = "1") |
| | |
| | | |
| | | @ApiModelProperty(value = "关联对象编码") |
| | | @ExcelColumn(name="关联对象编码") |
| | | private String objId; |
| | | private Integer objId; |
| | | |
| | | @ApiModelProperty(value = "操作前内容") |
| | | @ExcelColumn(name="操作前内容") |
| | |
| | | update.setId(model.getId()); |
| | | insuranceApplyMapper.updateById(update); |
| | | |
| | | Constants.ApplyLogType applyLogType = Constants.ApplyLogType.PLATFORM_RETURN; |
| | | String info =applyLogType.getInfo(); |
| | | info = info.replace("${param}", update.getCheckInfo()); |
| | | ApplyLog log = new ApplyLog(update,applyLogType.getName(),info,update.getId(),applyLogType.getKey(),null,null); |
| | | applyLogMapper.insert(log); |
| | | return null; |
| | | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public Integer uploadBaoxiandan(InsuranceApply insuranceApply) { |
| | |
| | | applyLog.setTitle(insuranceApplyStatus.getName()); |
| | | applyLog.setContent(content); |
| | | applyLog.setObjType(insuranceApplyStatus.getKey()); |
| | | applyLog.setObjId(Integer.toString(insuranceApply.getId())); |
| | | applyLog.setObjId( insuranceApply.getId()); |
| | | applyLog.setStatus(insuranceApply.getStatus()); |
| | | applyLogMapper.insert(applyLog); |
| | | } |