| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import zy.cloud.wms.manager.service.ReceiveDetlService; |
| | | import zy.cloud.wms.manager.utils.AddZero; |
| | | |
| | | import java.text.DecimalFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping("/quality/orderNo/init1") |
| | | @ManagerAuth(memo = "生成单据编号") |
| | | public R initOrderNo() { |
| | | String billNo = "QC-" + new SimpleDateFormat("yyyyMMdd").format(new Date())+"-"; |
| | | String currNum = qualityService.getCurrNum(billNo); |
| | | String orderNo=null; |
| | | if (!Cools.isEmpty(currNum)) { |
| | | String[] split = currNum.split("-"); |
| | | if (split.length < 2){ |
| | | orderNo= billNo + "0001"; |
| | | } |
| | | Integer newNum = Integer.parseInt(split[2]) +1; |
| | | String format = AddZero.addZeroForNum(newNum + "", 4); |
| | | orderNo = billNo + format; |
| | | }else { |
| | | orderNo = billNo + "0001"; |
| | | } |
| | | return R.ok().add(orderNo); |
| | | } |
| | | |
| | | @RequestMapping(value = "/quality/update/auth") |
| | | @ManagerAuth |
| | | public R update(Quality quality){ |