| | |
| | | String zipFilePath = product.getFileUrl(); |
| | | Date date = new Date(); |
| | | String dateStr = DateUtil.YYYY_MM_DD_HH_MM_SS_UNION.format(date); |
| | | Long userId = ActionUtil.getUser().getId(); |
| | | boolean isCopyCustom = false; |
| | | Product relatedProduct = null; |
| | | //校验凡是有定制表单号的产品,不能使用已上传过的标准产品编码 |
| | |
| | | material.setSubName(bom.getSubName()); |
| | | material.setType(bom.getType()); |
| | | material.setUnit(bom.getUnit()); |
| | | material.setUpUserId(userId); |
| | | |
| | | materialList.add(material); |
| | | } else { //物料已经存在的 |
| | |
| | | material.setSubModel(product.getParentModel()); |
| | | material.setCreateDate(date); |
| | | material.setStatus(1); |
| | | material.setUpUserId(userId); |
| | | |
| | | materialList.add(material); |
| | | } |
| | |
| | | materialHistory.setPictureUrl(material.getPictureUrl()); |
| | | materialHistory.setProductId(productHistory.getId()); |
| | | materialHistory.setDwgUrl(material.getDwgUrl()); |
| | | materialHistory.setUpUserId(ActionUtil.getUser().getId().intValue()); |
| | | materialHistory.setUpUserId(userId.intValue()); |
| | | materialHistory.setCreateTime(date); |
| | | for (Material materialInDB : materialExistList) { |
| | | if ((material.getSubCode() + "/" + material.getSubModel()).equals(materialInDB.getSubCode() + "/" + materialInDB.getSubModel())) { |