|
@@ -330,8 +330,21 @@ public class TranSettlementReportServiceImpl extends ServiceImpl<TranSettlementR
|
|
|
expenseInfo.setExpensesType("2");
|
|
|
expenseInfo.setExpenseName("运费");
|
|
|
SimpleDateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");
|
|
|
- Integer num=expenseInfoService.expenseCount(expenseInfo);
|
|
|
- String no = "YF"+df.format(new Date())+(num+1);
|
|
|
+ Integer num=expenseInfoService.expenseCount(expenseInfo)+1;
|
|
|
+ String newNo="";
|
|
|
+ //一位数
|
|
|
+ if (num < 10) {
|
|
|
+ newNo="00" + num;
|
|
|
+ }
|
|
|
+ //两位数xibg
|
|
|
+ else if (num < 100) {
|
|
|
+ newNo="0" + num;
|
|
|
+ }
|
|
|
+ //三位数
|
|
|
+ else if (num < 1000) {
|
|
|
+ newNo=String.valueOf(num);
|
|
|
+ }
|
|
|
+ String no = "YF"+df.format(new Date())+newNo;
|
|
|
expenseInfo.setCostNo(no);
|
|
|
InOutWarehouseTask inOutWarehouseTask=inOutWarehouseTaskService.selectOne(new EntityWrapper<InOutWarehouseTask>()
|
|
|
.eq("comp_id",tranSettlementReportList.get(0).getCompId())
|