| | |
| | | import com.ruoyi.common.utils.http.HttpUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.config.AliDingConfig; |
| | | import com.ruoyi.production.pojo.ProductMaterial; |
| | | import com.ruoyi.production.pojo.ProductOrder; |
| | | import com.ruoyi.production.service.ProductMaterialService; |
| | | import com.ruoyi.production.service.ProductOrderService; |
| | | import com.ruoyi.productionPlan.dto.ProductionPlanDto; |
| | | import com.ruoyi.productionPlan.dto.ProductionPlanImportDto; |
| | |
| | | |
| | | @Autowired |
| | | private ProductOrderPlanMapper productOrderPlanMapper; |
| | | |
| | | @Autowired |
| | | private ProductMaterialService productMaterialService; |
| | | |
| | | /** |
| | | * 同步锁,确保手动和定时任务不同时执行 |
| | |
| | | plan.setApplyNo(formData.getString("textField_l7fytfco")); |
| | | plan.setCustomerName(formData.getString("textField_lbkozohg")); |
| | | |
| | | plan.setMaterialCode(row.getString("textField_l9xo62q5")); |
| | | String materialCode = row.getString("textField_l9xo62q5"); |
| | | plan.setMaterialCode(materialCode); |
| | | |
| | | // 根据物料编码查询物料信息表,关联物料ID |
| | | if (StringUtils.isNotEmpty(materialCode)) { |
| | | LambdaQueryWrapper<ProductMaterial> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(ProductMaterial::getMaterialCode, materialCode); |
| | | ProductMaterial productMaterial = productMaterialService.getOne(queryWrapper); |
| | | if (productMaterial != null) { |
| | | plan.setProductMaterialId(productMaterial.getId()); |
| | | } |
| | | } |
| | | |
| | | plan.setProductName(row.getString("textField_l9xo62q7")); |
| | | plan.setProductSpec(row.getString("textField_l9xo62q8")); |
| | | plan.setLength(row.getInteger("numberField_lb7lgatg_value")); |