|
|
|
@ -10,10 +10,7 @@ import com.daqing.financial.guarantee.feign.CrmsFeignService; |
|
|
|
|
import com.daqing.financial.guarantee.feign.HrmsFeignService; |
|
|
|
|
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; |
|
|
|
|
import com.daqing.financial.guarantee.model.response.DgApplyAmountInfoResponse; |
|
|
|
|
import com.daqing.financial.guarantee.model.response.DgEnclosureInfoResponse; |
|
|
|
|
import com.daqing.financial.guarantee.model.response.*; |
|
|
|
|
import com.daqing.financial.guarantee.service.IDgApplyAmountInfoService; |
|
|
|
|
import com.daqing.financial.guarantee.util.ArraysUtil; |
|
|
|
|
import com.daqing.financial.guarantee.util.AuditProcessUtil; |
|
|
|
@ -40,10 +37,8 @@ import org.springframework.web.context.request.ServletRequestAttributes; |
|
|
|
|
import javax.annotation.Resource; |
|
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.Arrays; |
|
|
|
|
import java.util.LinkedHashMap; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
|
import java.util.*; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* <p> |
|
|
|
@ -125,7 +120,30 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM |
|
|
|
|
dgApplyAmountInfo.setDescription(businessApplication.getDescription());//反担保措施描述
|
|
|
|
|
dgApplyAmountInfo.setBusinessType(businessApplication.getBusinessType());//业务类型
|
|
|
|
|
dgApplyAmountInfo.setCustomerType(businessApplication.getCustomerType());//客户类型
|
|
|
|
|
dgApplyAmountInfo.setBusinessCode(RandomUtil.getRandomNum(12)); |
|
|
|
|
//设置业务编号,查询今天是否申请过业务
|
|
|
|
|
String businessCode=null; |
|
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
|
|
|
|
String dateTime=sdf.format(new Date()); |
|
|
|
|
String timeCode=dateTime.replaceAll("-",""); |
|
|
|
|
int count = dgApplyAmountInfoMapper.selectBusinessTaday(dateTime); |
|
|
|
|
if(count ==0){//今天没有申请过业务,所以编号从001开始
|
|
|
|
|
if(businessApplication.getBusinessType().equals("融资担保")){//融资业务:RZ-20201231001
|
|
|
|
|
businessCode="RZ-"+timeCode+"001"; |
|
|
|
|
}else{//非融资业务:FRZ-20201231001
|
|
|
|
|
businessCode="FRZ-"+timeCode+"001"; |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
//查询最大业务编号
|
|
|
|
|
String code = dgApplyAmountInfoMapper.selectMaxBusinessTaday(dateTime); |
|
|
|
|
int codeNumber = Integer.parseInt(code.substring(code.length() - 3)); |
|
|
|
|
String newBusinessCode = String.format("%03d", (codeNumber + 1)); |
|
|
|
|
if(businessApplication.getBusinessType().equals("融资担保")){//融资业务:RZ-20201231001
|
|
|
|
|
businessCode="RZ-"+timeCode+newBusinessCode; |
|
|
|
|
}else{//非融资业务:FRZ-20201231001
|
|
|
|
|
businessCode="FRZ-"+timeCode+newBusinessCode; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
dgApplyAmountInfo.setBusinessCode(businessCode); |
|
|
|
|
|
|
|
|
|
dgApplyAmountInfoMapper.insert(dgApplyAmountInfo); |
|
|
|
|
|
|
|
|
|