From f2f5ee7112e18f223ec2e2176261d5d0b68422e0 Mon Sep 17 00:00:00 2001 From: shijie <648688341@qq.com> Date: Wed, 25 Nov 2020 11:40:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E7=94=B3=E8=AF=B7=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E6=95=B4=E4=BD=93=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DgApplyAmountInfoController.java | 42 +++-- .../DgApplyAmountListController.java | 21 +++ .../mapper/DgApplyAmountListMapper.java | 24 +++ .../request/ApprovalGuaranteeRequest.java | 3 + .../request/BusinessApplicationRequest.java | 10 +- .../request/InvestigateGuaranteeRequest.java | 3 +- .../BusinessApplicationListResponse.java | 3 + .../service/IDgApplyAmountInfoService.java | 2 +- .../service/IDgApplyAmountListService.java | 21 +++ .../impl/DgApplyAmountInfoServiceImpl.java | 151 ++++++++++++++---- .../impl/DgApplyAmountListServiceImpl.java | 39 +++++ .../DgAssetsInvestigationServiceImpl.java | 14 +- .../DgGuaranteeAssignUserServiceImpl.java | 1 + .../util/MyBatisPlusCodeGenerator.java | 2 +- .../guarantee/DgApplyAmountInfoMapper.xml | 3 + .../guarantee/DgApplyAmountListMapper.xml | 41 +++++ .../guarantee/DgGuaranteeAssignUserMapper.xml | 3 +- .../daqing/framework/model/StatusCode.java | 6 + .../domain/guarantee/DgApplyAmountInfo.java | 15 ++ .../domain/guarantee/DgApplyAmountList.java | 84 ++++++++++ .../guarantee/DgGuaranteeAssignUser.java | 5 + 21 files changed, 436 insertions(+), 57 deletions(-) create mode 100644 dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountListController.java create mode 100644 dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgApplyAmountListMapper.java create mode 100644 dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgApplyAmountListService.java create mode 100644 dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountListServiceImpl.java create mode 100644 dq-financial-guarantee/src/main/resources/mapper/guarantee/DgApplyAmountListMapper.xml create mode 100644 dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgApplyAmountList.java diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java index bd7dbb44..1bc097e0 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java @@ -8,8 +8,8 @@ import com.daqing.financial.guarantee.model.request.BusinessApplicationRequest; import com.daqing.financial.guarantee.model.response.BusinessApplicationDetailResponse; import com.daqing.financial.guarantee.model.response.BusinessApplicationListResponse; import com.daqing.financial.guarantee.service.IDgApplyAmountInfoService; +import com.daqing.financial.guarantee.service.IDgApplyAmountListService; import com.daqing.framework.domain.crms.request.DgApplyAmountInfoRequest; -import com.daqing.framework.domain.guarantee.DgApplyAmountInfo; import com.daqing.framework.domain.guarantee.response.EmployeeMessageResponse; import com.daqing.framework.model.response.PromptSuccess; import com.daqing.framework.model.response.ResponseResult; @@ -30,6 +30,7 @@ import javax.servlet.http.HttpServletResponse; import java.io.File; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import java.util.UUID; @@ -56,6 +57,9 @@ public class DgApplyAmountInfoController implements DgApplyAmountInfoControllerA @Resource private HrmsFeignService hrmsFeignService; + @Autowired + private IDgApplyAmountListService applyAmountListService; + /** * 根据客户编号/客户名称获取企业信息 * @param applyAmountInfo @@ -155,20 +159,34 @@ public class DgApplyAmountInfoController implements DgApplyAmountInfoControllerA public ResponseResult businessApplicationList(@RequestParam(value="page",required=false) Integer page,@RequestParam(value="size",required=false) Integer size, @RequestParam(value = "CustomerNumberOrName", required = false) String CustomerNumberOrName){ //获取当前登录用户id - String userId = getUserId(); - //根据userId获取用户名以及部门名称 - ResponseResult employeeMessage = hrmsFeignService.getAccountAndDeptNameById(5L); + //String userId = getUserId(); + String userId = "5"; + + //根据角色查询资产部调查列表 + String roleIds = RedisUtil.get("dq:userRole:" + userId); + PageUtils data = null; + if(roleIds != null) { + String[] ids = roleIds.split(","); + List roleIdlist = Arrays.asList(ids); + data = applyAmountListService.queryPage(page, size, CustomerNumberOrName, roleIdlist, userId); + + } - PageUtils data = applyAmountInfoService.queryPage(page, size,CustomerNumberOrName); + //PageUtils data = applyAmountInfoService.queryPage(page, size,CustomerNumberOrName); //遍历data里面的数据提单人id,找出匹配id,将用户名以及部门名称赋值进去 List list = (List) data.getList(); + Integer presenterId = list.get(0).getPresenterId(); + //根据提单人id查询其部门名称 + ResponseResult employeeMessage = hrmsFeignService.getAccountAndDeptNameById(presenterId.longValue()); + for (BusinessApplicationListResponse response:list) { - if(response.getPresenterId().equals(employeeMessage.getData().getId())){//如果userId相同情况下,就往对象里面赋值 - response.setAccount(employeeMessage.getData().getAccount()); - response.setDeptName(employeeMessage.getData().getDeptName()); + if(employeeMessage.getData() != null){ + if(response.getPresenterId().equals(employeeMessage.getData().getId())){//如果提单人id相同情况下,就往对象里面赋值 + response.setAccount(employeeMessage.getData().getAccount()); + response.setDeptName(employeeMessage.getData().getDeptName()); + } } } - return new ResponseResult().SUCCESS(data); } @@ -228,9 +246,9 @@ public class DgApplyAmountInfoController implements DgApplyAmountInfoControllerA @PostMapping("/approvalBusinessApplication") @ApiOperation(value = "根据业务id审核业务申请内容") public ResponseResult approvalBusinessApplication(@RequestParam("id") Integer id,@RequestParam("status") Integer status, - @RequestParam(value = "remark", required = false) String remark){ - int result = applyAmountInfoService.approvalBusinessApplication(id,status,remark); - return result>0 ? ResponseResult.SUCCESS("撤销成功!"):ResponseResult.FAIL(40006,"撤销失败!"); + @RequestParam(value = "remark", required = false) String remark, @RequestParam("companyId") Integer companyId){ + int result = applyAmountInfoService.approvalBusinessApplication(id,status,remark,companyId); + return result>0 ? ResponseResult.SUCCESS("审核成功!"):ResponseResult.FAIL(40006,"审核失败!"); } /** diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountListController.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountListController.java new file mode 100644 index 00000000..3fd4df85 --- /dev/null +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountListController.java @@ -0,0 +1,21 @@ +package com.daqing.financial.guarantee.controller; + + +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RestController; + +/** + *

+ * 前端控制器 + *

+ * + * @author Qyq + * @since 2020-11-24 + */ +@RestController +@RequestMapping("/dg-apply-amount-list") +public class DgApplyAmountListController { + +} diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgApplyAmountListMapper.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgApplyAmountListMapper.java new file mode 100644 index 00000000..90d0e85b --- /dev/null +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgApplyAmountListMapper.java @@ -0,0 +1,24 @@ +package com.daqing.financial.guarantee.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.daqing.financial.guarantee.model.response.BusinessApplicationListResponse; +import com.daqing.framework.domain.guarantee.DgApplyAmountList; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + *

+ * Mapper 接口 + *

+ * + * @author Qyq + * @since 2020-11-24 + */ +@Mapper +public interface DgApplyAmountListMapper extends BaseMapper { + + IPage pageByCondition(Page page, String customerNumberOrName, List roleIdlist, String userId); +} diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/ApprovalGuaranteeRequest.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/ApprovalGuaranteeRequest.java index eba6d0ee..0d783a49 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/ApprovalGuaranteeRequest.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/ApprovalGuaranteeRequest.java @@ -31,6 +31,9 @@ public class ApprovalGuaranteeRequest { @ApiModelProperty(value = "补充调查原因") private String[] remark; + @ApiModelProperty(value = "其他原因") + private String otherRemark; + } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/BusinessApplicationRequest.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/BusinessApplicationRequest.java index 443d34dd..f6d4312f 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/BusinessApplicationRequest.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/BusinessApplicationRequest.java @@ -21,6 +21,12 @@ public class BusinessApplicationRequest implements Serializable { @TableId(value = "id", type = IdType.AUTO) private Integer id; + /** + * 业务id + */ + @ApiModelProperty(value = "业务id") + private Integer businessId; + /** * 企业id */ @@ -179,10 +185,10 @@ public class BusinessApplicationRequest implements Serializable { private String[] inspectionPhotos; /** - * 区分保存和提交按钮 true->commit + * 区分保存和提交按钮 1->commit */ @ApiModelProperty(value = "区分保存和提交按钮") - private boolean isSaveOrCommit; + private Integer isSaveOrCommit; /** * 关联人id diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/InvestigateGuaranteeRequest.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/InvestigateGuaranteeRequest.java index 06648f3e..0e48be9b 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/InvestigateGuaranteeRequest.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/request/InvestigateGuaranteeRequest.java @@ -3,6 +3,7 @@ package com.daqing.financial.guarantee.model.request; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import java.io.Serializable; import java.util.List; /** @@ -11,7 +12,7 @@ import java.util.List; * @Version 1.0 */ @Data -public class InvestigateGuaranteeRequest { +public class InvestigateGuaranteeRequest implements Serializable { @ApiModelProperty(value = "主键id") private Integer id; diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/BusinessApplicationListResponse.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/BusinessApplicationListResponse.java index e98da7ef..e29675ab 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/BusinessApplicationListResponse.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/BusinessApplicationListResponse.java @@ -30,6 +30,9 @@ public class BusinessApplicationListResponse extends BaseRowModel implements Ser @ApiModelProperty(value = "企业id") private Integer companyId; + @ApiModelProperty(value = "业务id") + private Integer businessId; + /** * 提单人id */ diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgApplyAmountInfoService.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgApplyAmountInfoService.java index d698b8bb..da7fbfe0 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgApplyAmountInfoService.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgApplyAmountInfoService.java @@ -31,5 +31,5 @@ public interface IDgApplyAmountInfoService extends IService { Boolean excelExport(HttpServletResponse response); - int approvalBusinessApplication(Integer id, Integer status, String remark); + int approvalBusinessApplication(Integer id, Integer status, String remark, Integer companyId); } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgApplyAmountListService.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgApplyAmountListService.java new file mode 100644 index 00000000..eb55e4db --- /dev/null +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/IDgApplyAmountListService.java @@ -0,0 +1,21 @@ +package com.daqing.financial.guarantee.service; + + +import com.baomidou.mybatisplus.extension.service.IService; +import com.daqing.framework.domain.guarantee.DgApplyAmountList; +import com.daqing.framework.utils.PageUtils; + +import java.util.List; + +/** + *

+ * 服务类 + *

+ * + * @author Qyq + * @since 2020-11-24 + */ +public interface IDgApplyAmountListService extends IService { + + PageUtils queryPage(Integer page, Integer size, String customerNumberOrName, List roleIdlist, String userId); +} diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java index 148c8b14..f912972f 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java @@ -5,8 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.daqing.financial.guarantee.feign.CrmsFeignService; import com.daqing.financial.guarantee.feign.HrmsFeignService; -import com.daqing.financial.guarantee.mapper.DgApplyAmountInfoMapper; -import com.daqing.financial.guarantee.mapper.DgEnclosureInfoMapper; +import com.daqing.financial.guarantee.mapper.*; import com.daqing.financial.guarantee.model.request.BusinessApplicationRequest; import com.daqing.financial.guarantee.model.response.BusinessApplicationDetailResponse; import com.daqing.financial.guarantee.model.response.BusinessApplicationListResponse; @@ -18,10 +17,11 @@ import com.daqing.financial.guarantee.util.ArraysUtil; import com.daqing.framework.domain.crms.CrmsCustomerRelated; import com.daqing.framework.domain.crms.request.DgApplyAmountInfoRequest; import com.daqing.framework.domain.crms.response.CrmsCode; -import com.daqing.framework.domain.guarantee.DgApplyAmountInfo; -import com.daqing.framework.domain.guarantee.DgEnclosureInfo; +import com.daqing.framework.domain.guarantee.*; import com.daqing.framework.domain.guarantee.response.EmployeeMessageResponse; import com.daqing.framework.exception.ExceptionCast; +import com.daqing.framework.model.StatusCode; +import com.daqing.framework.model.response.PromptSuccess; import com.daqing.framework.model.response.ResponseResult; import com.daqing.framework.util.RandomUtil; import com.daqing.framework.util.RedisUtil; @@ -66,6 +66,18 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl0){ String a = measures.substring(1,measures.length()-1); @@ -176,7 +212,7 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpllist = new ArrayList<>(); list.add(dgEnclosureInfo.getAccountingFirm()); @@ -244,8 +280,8 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl().eq("business_id",businessApplication.getId())); + dgEnclosureInfoMapper.delete(new QueryWrapper().eq("business_id",businessApplication.getBusinessId())); //附件新增 return dgEnclosureInfoMapper.insert(dgEnclosureInfo); } @Override public int revokeBusinessApplication(Integer id) { + //根据id查询业务id + DgApplyAmountList dgApplyAmountList1 = dgApplyAmountListMapper.selectById(id); //根据id修改当前业务状态 - DgApplyAmountInfo dgApplyAmountInfo = new DgApplyAmountInfo(); - dgApplyAmountInfo.setStatus(5);//状态为已撤销 - dgApplyAmountInfo.setUpdateTime(new Date()); - return this.baseMapper.update(dgApplyAmountInfo, new QueryWrapper().eq("id", id)); + DgApplyAmountList dgApplyAmountList = new DgApplyAmountList(); + dgApplyAmountList.setId(id); + dgApplyAmountList.setStatus(StatusCode.SP_RESCINDED);//状态为已撤销 + dgApplyAmountList.setOperatingStatus(StatusCode.CZ_TO_BE_SUBMITTED);//操作状态为待提交 + dgApplyAmountListMapper.updateById(dgApplyAmountList); + //修改担保部经理审核状态 + + DgApplyAmountList applyAmountList = new DgApplyAmountList(); + applyAmountList.setBusinessId(dgApplyAmountList1.getBusinessId());//业务id + applyAmountList.setType(2);//类型为担保部经理审核 + applyAmountList.setStatus(StatusCode.SP_RESCINDED);//状态为已撤销 + applyAmountList.setOperatingStatus(StatusCode.CZ_TO_BE_DEFINED);//操作状态为待定义,目前前端不展示 + dgApplyAmountListMapper.update(applyAmountList,new QueryWrapper() + .eq("business_id",applyAmountList.getBusinessId()).eq("type",applyAmountList.getType())); + //将业务流程状态设置为已撤销 + + return 1; } @Transactional @@ -336,8 +386,9 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl().eq("id",id)); + //根据dg_apply_amount_list表的id修改当前业务状态 + DgApplyAmountList dgApplyAmountList = new DgApplyAmountList(); + dgApplyAmountList.setStatus(status); + dgApplyAmountList.setOperatingStatus(StatusCode.CZ_PROCESSED);//操作状态改为已处理 + dgApplyAmountList.setApplyContent(remark); + dgApplyAmountList.setEmpId(5);//Integer.parseInt(userId) + dgApplyAmountListMapper.update(dgApplyAmountList,new QueryWrapper().eq("id",id)); + + //如果审批状态为已审核,并且操作状态为已处理,则同时新增数据到担保部,资产部和信息部,让这三个模块去审 + if(dgApplyAmountList.getStatus().equals(StatusCode.SP_REVIEWED) && dgApplyAmountList.getOperatingStatus().equals(StatusCode.CZ_PROCESSED)){ + //新增一条记录到担保部 + DgGuaranteeAssignUser guaranteeAssignUser = new DgGuaranteeAssignUser(); + guaranteeAssignUser.setBusinessId(id);//业务id + guaranteeAssignUser.setCompanyId(companyId);//企业id + guaranteeAssignUser.setRoleId(PromptSuccess.DB_JL_ID);//担保部经理角色id + guaranteeAssignUser.setType(3);//角色类型 + guaranteeAssignUser.setStatus(StatusCode.SP_TO_BE_ASSIGNED);//状态为待指派 + guaranteeAssignUser.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态为待处理 + dgGuaranteeAssignUserMapper.insert(guaranteeAssignUser); + + //新增一条记录到资产部 + DgAssetsInvestigation dgAssetsInvestigation = new DgAssetsInvestigation(); + dgAssetsInvestigation.setBusinessId(id);//业务id + dgAssetsInvestigation.setCompanyId(companyId);//企业id + dgAssetsInvestigation.setRoleId(PromptSuccess.ZC_JL_ID);//资产部经理角色id + dgAssetsInvestigation.setType(2);//角色类型 + dgAssetsInvestigation.setStatus(StatusCode.SP_TO_BE_ASSIGNED);//状态为待指派 + dgAssetsInvestigation.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态为待处理 + dgAssetsInvestigationMapper.insert(dgAssetsInvestigation); + + //新增一条记录到信息部 + DgMessageInvestigation dgMessageInvestigation = new DgMessageInvestigation(); + dgMessageInvestigation.setBusinessId(id);//业务id + dgMessageInvestigation.setCompanyId(companyId);//企业id + dgMessageInvestigation.setRoleId(PromptSuccess.XX_JL_ID);//信息部经理角色id + dgMessageInvestigation.setType(2);//角色类型 + dgMessageInvestigation.setStatus(StatusCode.SP_TO_BE_ASSIGNED);//状态为待指派 + dgMessageInvestigation.setOperatingStatus(StatusCode.CZ_ON_HAND);//操作状态为待处理 + dgMessageInvestigationMapper.insert(dgMessageInvestigation); + } + return 1; } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountListServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountListServiceImpl.java new file mode 100644 index 00000000..ca639930 --- /dev/null +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountListServiceImpl.java @@ -0,0 +1,39 @@ +package com.daqing.financial.guarantee.service.impl; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.daqing.financial.guarantee.mapper.DgApplyAmountListMapper; +import com.daqing.financial.guarantee.model.response.BusinessApplicationListResponse; +import com.daqing.financial.guarantee.service.IDgApplyAmountListService; +import com.daqing.framework.domain.guarantee.DgApplyAmountList; +import com.daqing.framework.utils.PageUtils; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + *

+ * 服务实现类 + *

+ * + * @author Qyq + * @since 2020-11-24 + */ +@Service +public class DgApplyAmountListServiceImpl extends ServiceImpl implements IDgApplyAmountListService { + + @Override + public PageUtils queryPage(Integer page, Integer size, String customerNumberOrName, List roleIdlist, String userId) { + //分页参数 + if (page <= 0) { + page = 1; + } + if (size <= 0) { + size = 10; + } + IPage positionVO = this.getBaseMapper().pageByCondition(new Page(page, size),customerNumberOrName,roleIdlist,userId); + + return new PageUtils(positionVO); + } +} diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAssetsInvestigationServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAssetsInvestigationServiceImpl.java index 8ac54d60..dea37389 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAssetsInvestigationServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgAssetsInvestigationServiceImpl.java @@ -120,12 +120,14 @@ public class DgAssetsInvestigationServiceImpl extends ServiceImpl0){ - String a = files.substring(1,files.length()-1); - String arry[]=a.split(","); - List demoList = Arrays.asList(arry); - assetsResponse.setFileList(demoList); - System.out.println("arry==============="+demoList); + if(files != null){ + if(files.length()>0){ + String a = files.substring(1,files.length()-1); + String arry[]=a.split(","); + List demoList = Arrays.asList(arry); + assetsResponse.setFileList(demoList); + System.out.println("arry==============="+demoList); + } } //根据业务id查询业务申请详细信息 diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeAssignUserServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeAssignUserServiceImpl.java index 84bce63d..e8a6a5df 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeAssignUserServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeAssignUserServiceImpl.java @@ -211,6 +211,7 @@ public class DgGuaranteeAssignUserServiceImpl extends ServiceImpl + + + + select au.id,ai.company_id,au.business_id,ai.presenter_id,ai.business_code,ai.business_type,ai.apply_amount,ai.apply_time,au.create_time, + au.status,au.operating_status,cc.name,cc.phone,ps.business_status + from dg_apply_amount_list au + left join dg_apply_amount_info ai on au.business_id = ai.id + left join crms_company_customer ccl on ai.company_id = ccl.id + left join crms_customer cc on cc.id = ccl.customer_id + left JOIN dg_business_process_status ps ON ps.business_id = au.business_id + + au.role_id in + + #{id} + + + AND (ai.business_code LIKE CONCAT('%',#{customerNumberOrName},'%') OR cc.name LIKE CONCAT('%',#{customerNumberOrName},'%')) + + + AND (au.emp_id =#{userId} or au.emp_id is null) + + + + + diff --git a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgGuaranteeAssignUserMapper.xml b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgGuaranteeAssignUserMapper.xml index 7304247f..75285917 100644 --- a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgGuaranteeAssignUserMapper.xml +++ b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgGuaranteeAssignUserMapper.xml @@ -13,6 +13,7 @@ + @@ -38,7 +39,7 @@ AND au.status = #{status} - AND au.emp_id =#{userId} or au.emp_id is null + AND (au.emp_id =#{userId} or au.emp_id is null) diff --git a/dq-framework-common/src/main/java/com/daqing/framework/model/StatusCode.java b/dq-framework-common/src/main/java/com/daqing/framework/model/StatusCode.java index bd4f97d5..53819dc0 100644 --- a/dq-framework-common/src/main/java/com/daqing/framework/model/StatusCode.java +++ b/dq-framework-common/src/main/java/com/daqing/framework/model/StatusCode.java @@ -28,6 +28,8 @@ public class StatusCode { /** * 业务流程状态 */ + public static final Integer YW_RESCINDED = 0;//已撤销 + public static final Integer YW_IN_PROGRESS = 1;//进行中 public static final Integer YW_COMPLETED = 2;//已完成 @@ -43,4 +45,8 @@ public class StatusCode { public static final Integer CZ_PROCESSED = 2;//已处理 + public static final Integer CZ_TO_BE_SUBMITTED = 3;//待提交 + + public static final Integer CZ_TO_BE_DEFINED = 4;//待定义 + } diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgApplyAmountInfo.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgApplyAmountInfo.java index 423e7717..ced6ec01 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgApplyAmountInfo.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgApplyAmountInfo.java @@ -38,6 +38,16 @@ public class DgApplyAmountInfo implements Serializable { */ private Integer presenterId; + /** + * 角色id + */ + private Integer roleId; + + /** + * 类型(1->担保部业务员;2->担保部经理审核) + */ + private Integer type; + /** * 申请额度 */ @@ -91,6 +101,11 @@ public class DgApplyAmountInfo implements Serializable { */ private Integer status; + /** + * 操作状态: 0->已发起;1->待处理;2->已处理; + */ + private Integer operatingStatus; + /** * 审批人Id */ diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgApplyAmountList.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgApplyAmountList.java new file mode 100644 index 00000000..6de4af6f --- /dev/null +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgApplyAmountList.java @@ -0,0 +1,84 @@ +package com.daqing.framework.domain.guarantee; + +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + *

+ * + *

+ * + * @author Qyq + * @since 2020-11-24 + */ +@Data +@TableName("dg_apply_amount_list") +public class DgApplyAmountList implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键id + */ + private Integer id; + + /** + * 业务id + */ + private Integer businessId; + + /** + * 提单人id + */ + private Integer presenterId; + + /** + * 角色id + */ + private Integer roleId; + + /** + * 审批人id + */ + private Integer empId; + + /** + * 类型(1->担保部业务员;2->担保部经理审核) + */ + private Integer type; + + /** + * 状态(1:待指派 2:审核中 3:审核通过 4:审核不通过 5:驳回) + */ + private Integer status; + + /** + * 操作状态 + */ + private Integer operatingStatus; + + /** + * 审核意见 + */ + private String applyContent; + + /** + * 创建时间 + */ + @ApiModelProperty(value = "创建时间") + @TableField(fill = FieldFill.INSERT) + private Date createTime; + + /** + * 修改时间 + */ + @ApiModelProperty(value = "更新时间") + @TableField(fill = FieldFill.INSERT_UPDATE) + private Date updateTime; +} diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgGuaranteeAssignUser.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgGuaranteeAssignUser.java index 48cf8e8f..c3d35094 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgGuaranteeAssignUser.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgGuaranteeAssignUser.java @@ -78,6 +78,11 @@ public class DgGuaranteeAssignUser implements Serializable { */ private String remark; + /** + * 其他原因 + */ + private String otherRemark; + /** * 审核意见 */