| | |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("数据来源(1-宜搭/2-钉钉)") |
| | | private Long type; |
| | | private Integer type; |
| | | } |
| | |
| | | String searchFieldJson = searchConditions.toJSONString(); |
| | | |
| | | LambdaQueryWrapper<ProductMaterialSku> countWrapper = new LambdaQueryWrapper<>(); |
| | | countWrapper.eq(ProductMaterialSku::getType, 1L); |
| | | countWrapper.eq(ProductMaterialSku::getType, 1); |
| | | |
| | | JSONArray dataArr = AliDingUtils.getFormDataList(aliDingConfig, aliDingConfig.getMaterialCodeFormUuid(), searchFieldJson, productMaterialSkuService, ProductMaterialSku::getFormModifiedTime, countWrapper); |
| | | |
| | |
| | | sku.setFormModifiedTime(AliDingUtils.parseUtcTime(item.getString("modifiedTimeGMT"))); |
| | | sku.setCreateTime(now); |
| | | sku.setUpdateTime(now); |
| | | sku.setType(1L); |
| | | sku.setType(1); |
| | | |
| | | list.add(sku); |
| | | } |
| | |
| | | sku.setCreateTime(now); |
| | | } |
| | | sku.setUpdateTime(now); |
| | | sku.setType(2); |
| | | |
| | | if (!this.save(sku)) { |
| | | throw new ServiceException("新增物料规格失败"); |
| | |
| | | if (ids == null || ids.isEmpty()) { |
| | | throw new ServiceException("请选择至少一条数据"); |
| | | } |
| | | |
| | | |
| | | if (productionPlanMapper.selectCount(new LambdaQueryWrapper<ProductionPlan>().in(ProductionPlan::getProductMaterialSkuId, ids)) > 0) { |
| | | throw new ServiceException("该物料已被销售生产计划引用,无法删除"); |
| | | } |