|
@@ -65,6 +65,9 @@ public class RlzyApplyPrintController extends BaseController {
|
|
|
rlzyApply.setStatus("0");
|
|
|
rlzyApply.setOpeningDate(nowTime);
|
|
|
rlzyApply.setEfficaciousDate(later5);
|
|
|
+ RlzyApply apply = addSelf();
|
|
|
+ rlzyApply.setLicenseNumber(apply.getLicenseNumber());
|
|
|
+ rlzyApply.setLicenseCode(apply.getLicenseCode());
|
|
|
return toAjax(rlzyApplyService.insert(rlzyApply));
|
|
|
}
|
|
|
@GetMapping("/{idcard}")
|
|
@@ -120,4 +123,27 @@ public class RlzyApplyPrintController extends BaseController {
|
|
|
}
|
|
|
return AjaxResult.success(rlzyApplyService.updateById(build));
|
|
|
}
|
|
|
+
|
|
|
+ public RlzyApply addSelf(){
|
|
|
+ RlzyApply rlzyApply = rlzyApplyService.selectLastRlzyApply();
|
|
|
+ int licenseNumber = 1;
|
|
|
+ int licenseCode = 1;
|
|
|
+ if(rlzyApply != null){
|
|
|
+ licenseNumber = Integer.valueOf(rlzyApply.getLicenseNumber()).intValue();
|
|
|
+ licenseCode = Integer.valueOf(rlzyApply.getLicenseCode()).intValue();
|
|
|
+ }
|
|
|
+ if(licenseNumber / 1000 <1){
|
|
|
+ String format1 = String.format("%03d", licenseNumber + 1);
|
|
|
+ rlzyApply.setLicenseNumber(format1);
|
|
|
+ }else{
|
|
|
+ rlzyApply.setLicenseNumber(String.valueOf(licenseNumber));
|
|
|
+ }
|
|
|
+ if(licenseCode / 1000 <1){
|
|
|
+ String format2 = String.format("%03d", licenseCode + 1);
|
|
|
+ rlzyApply.setLicenseCode(format2);
|
|
|
+ }else{
|
|
|
+ rlzyApply.setLicenseCode(String.valueOf(licenseCode));
|
|
|
+ }
|
|
|
+ return rlzyApply;
|
|
|
+ }
|
|
|
}
|