long
2023-09-02 e379948bb83ebcc9ce0c467a7b970f74bc00e9a1
guns-vip-main/src/main/java/cn/stylefeng/guns/modular/om/productionOrdeInfo/service/impl/ProductionOrdeInfoServiceImpl.java
@@ -37,9 +37,9 @@
 */
@Service
public class ProductionOrdeInfoServiceImpl extends ServiceImpl<ProductionOrdeInfoMapper, ProductionOrdeInfo> implements ProductionOrdeInfoService {
    private static SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd");
  /*  private static SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd");
    private static String date = format.format(new Date());
    private static String orderDate = "M"+date;
    private static String orderDate = "M"+date;*/
    @Autowired
    private ProductionOrdeInfoService productionOrdeInfoService;
@@ -51,6 +51,10 @@
    @Override
    public void add(ProductionOrdeInfoParam param){
        SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd");
        String date = format.format(new Date());
        String orderDate = "M"+date;
        List<ProductionOrdeInfo> workOrderNo = productionOrdeInfoService.list(new QueryWrapper<ProductionOrdeInfo>().like("work_order_no", date));
        if(workOrderNo.size() == 0){
            param.setWorkOrderNo(orderDate+"0001");