Browse Source

[fix] 工程管理 仓库管理 品质管理

修改开发修改单单号前缀:KFXG
新增开发修改单根据开发修改单号查询开发修改单后端接口
修改新增采购入库通知单方法:新增同时更新开发修改单的状态
修改入库通知单(暂收-采购)方法:新增同时更新开发修改单的状态
修改品质单开始品质方法:新增同时更新开发修改单的状态
修改入库通知单(入库-采购)方法:新增同时更新开发修改单的状态
dev
liuxiaoxu 4 months ago
parent
commit
5c787a8d4c
  1. 5
      ruoyi-admin/src/main/java/com/ruoyi/erp/mapper/ErpDevelopModifyorderMapper.java
  2. 2
      ruoyi-admin/src/main/java/com/ruoyi/erp/service/impl/ErpDevelopModifyorderServiceImpl.java
  3. 19
      ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseOrderServiceImpl.java
  4. 13
      ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityOrderServiceImpl.java
  5. 25
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseStorageOrderServiceImpl.java
  6. 5
      ruoyi-admin/src/main/resources/mapper/erp/ErpDevelopModifyorderMapper.xml

5
ruoyi-admin/src/main/java/com/ruoyi/erp/mapper/ErpDevelopModifyorderMapper.java

@ -81,4 +81,9 @@ public interface ErpDevelopModifyorderMapper
* 根据开发修改单查询开发修改物料
* */
List<ErpDevelopModifyorder> selectDevelopModifyMaterialById(Long developOrderId);
/**
* 根据开发修改单号查询开发修改单
* */
ErpDevelopModifyorder selectErpDevelopModifyorderByCode(String relatedOrderCode);
}

2
ruoyi-admin/src/main/java/com/ruoyi/erp/service/impl/ErpDevelopModifyorderServiceImpl.java

@ -155,7 +155,7 @@ public class ErpDevelopModifyorderServiceImpl implements IErpDevelopModifyorderS
erpDevelopModifyorder.setCreateBy(loginName);
erpDevelopModifyorder.setCreateTime(DateUtils.getNowDate());
String developOderCode = redisCache.generateBillNo("KF");
String developOderCode = redisCache.generateBillNo("KFXG");
erpDevelopModifyorder.setDevelopOrderCode(developOderCode);
List<ErpDevelopModifyorderMaterialVo> developModifyorderMaterialVoList = erpDevelopModifyorder.getDevelopModifyorderMaterialVoList();
if (!CollectionUtils.isEmpty(developModifyorderMaterialVoList)){

19
ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseOrderServiceImpl.java

@ -11,6 +11,8 @@ import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.bean.BeanUtils;
import com.ruoyi.erp.domain.ErpDevelopModifyorder;
import com.ruoyi.erp.mapper.ErpDevelopModifyorderMapper;
import com.ruoyi.financial.domain.FinancialAccountsPayable;
import com.ruoyi.financial.service.IFinancialAccountsPayableService;
import com.ruoyi.process.general.service.IProcessService;
@ -109,6 +111,10 @@ public class PurchaseOrderServiceImpl implements IPurchaseOrderService
@Autowired
private ISysSupplierService sysSupplierService;
@Autowired
private ErpDevelopModifyorderMapper developModifyorderMapper;
/**
* 查询采购订单
*
@ -426,14 +432,23 @@ public class PurchaseOrderServiceImpl implements IPurchaseOrderService
}
/*
/**
* 采购订单创建采购入库通知单
* */
@Override
@Transactional(rollbackFor = RuntimeException.class)
public int addPurchaseOrderStorage(WarehouseStorageOrder warehouseStorageOrder){
WarehouseStorageOrder warehouseStorageOrder1 = new WarehouseStorageOrder();
warehouseStorageOrder1.setRelatedOrderCode(warehouseStorageOrder.getRelatedOrderCode());
String relatedOrderCode = warehouseStorageOrder.getRelatedOrderCode();
warehouseStorageOrder1.setRelatedOrderCode(relatedOrderCode);
//关联开发修改单,修改开发修改单的状态
ErpDevelopModifyorder developModifyorder = developModifyorderMapper.selectErpDevelopModifyorderByCode(relatedOrderCode);
if (developModifyorder != null){
developModifyorder.setPurchaseStorageStatus("2");
developModifyorderMapper.updateErpDevelopModifyorder(developModifyorder);
}
List<WarehouseStorageOrder> warehouseStorageOrderList = warehouseStorageOrderMapper.selectWarehouseStorageOrderList(warehouseStorageOrder1);
List<WarehouseStorageOrderDetail> list = warehouseStorageOrder.getWarehouseStorageOrderDetailList();
int result = 0;

13
ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityOrderServiceImpl.java

@ -9,6 +9,8 @@ import com.ruoyi.common.exception.BusinessException;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.erp.domain.ErpDevelopModifyorder;
import com.ruoyi.erp.mapper.ErpDevelopModifyorderMapper;
import com.ruoyi.quality.domain.QualityOrderDetail;
import com.ruoyi.quality.domain.QualityOrderReport;
import com.ruoyi.quality.domain.QualityOrderReportUnqualified;
@ -57,6 +59,9 @@ public class QualityOrderServiceImpl implements IQualityOrderService
@Autowired
private RedisCache redisCache;
@Autowired
private ErpDevelopModifyorderMapper developModifyorderMapper;
/**
* 查询品质管理品质单
*
@ -213,6 +218,14 @@ public class QualityOrderServiceImpl implements IQualityOrderService
throw new BusinessException("更新入库单数据失败");
}
//更新开发修改单数据
ErpDevelopModifyorder erpDevelopModifyorder = developModifyorderMapper.selectErpDevelopModifyorderByCode(qualityOrder.getRelatedOrderCode());
if (erpDevelopModifyorder != null){
erpDevelopModifyorder.setQualityStatus("2");
erpDevelopModifyorder.setPurchaseStorageStatus("6");
developModifyorderMapper.updateErpDevelopModifyorder(erpDevelopModifyorder);
}
int updateResult = qualityOrderMapper.updateQualityOrder(qualityOrder);
if (updateResult <= 0){
log.warn("更新品质单失败,未影响任何行");

25
ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseStorageOrderServiceImpl.java

@ -9,6 +9,8 @@ import com.ruoyi.common.exception.BusinessException;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.erp.domain.ErpDevelopModifyorder;
import com.ruoyi.erp.mapper.ErpDevelopModifyorderMapper;
import com.ruoyi.quality.domain.QualityOrder;
import com.ruoyi.quality.domain.QualityOrderDetail;
import com.ruoyi.quality.domain.QualityOrderReport;
@ -80,6 +82,9 @@ public class WarehouseStorageOrderServiceImpl implements IWarehouseStorageOrderS
@Autowired
private QualityOrderDetailMapper qualityOrderDetailMapper;
@Autowired
private ErpDevelopModifyorderMapper developModifyorderMapper;
/**
* 查询仓库入库单
*
@ -329,6 +334,16 @@ public class WarehouseStorageOrderServiceImpl implements IWarehouseStorageOrderS
throw new BusinessException("更新入库单主记录失败");
}
//如果采购来源开发修改单,更新开发修改单数据
String relatedOrderCode = warehouseStorageOrder.getRelatedOrderCode();
ErpDevelopModifyorder erpDevelopModifyorder = developModifyorderMapper.selectErpDevelopModifyorderByCode(relatedOrderCode);
if (erpDevelopModifyorder != null){
erpDevelopModifyorder.setPurchaseStorageStatus("4");
erpDevelopModifyorder.setQualityStatus("0");
developModifyorderMapper.updateErpDevelopModifyorder(erpDevelopModifyorder);
}
try {
qualityOrderService.insertQualityOrderByWarehouseStorageOrder(warehouseStorageOrder, warehouseStorageOrder.getWarehouseStorageOrderDetailList());
} catch (Exception e) {
@ -397,6 +412,16 @@ public class WarehouseStorageOrderServiceImpl implements IWarehouseStorageOrderS
throw new BusinessException("更新仓库入库单详情失败,未影响任何行");
}
}
//更新开发修改单数据
String relatedOrderCode = warehouseStorageOrder.getRelatedOrderCode();
ErpDevelopModifyorder erpDevelopModifyorder = developModifyorderMapper.selectErpDevelopModifyorderByCode(relatedOrderCode);
if (erpDevelopModifyorder != null){
erpDevelopModifyorder.setPurchaseStorageStatus("8");
developModifyorderMapper.updateErpDevelopModifyorder(erpDevelopModifyorder);
}
//更新入库单的数据
int updateResult = warehouseStorageOrderMapper.updateWarehouseStorageOrder(warehouseStorageOrder);

5
ruoyi-admin/src/main/resources/mapper/erp/ErpDevelopModifyorderMapper.xml

@ -71,6 +71,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where develop_order_id = #{developOrderId}
</select>
<select id="selectErpDevelopModifyorderByCode" parameterType="String" resultMap="ErpDevelopModifyorderResult">
<include refid="selectErpDevelopModifyorderVo"/>
where develop_order_code = #{developOrderCode}
</select>
<insert id="insertErpDevelopModifyorder" parameterType="ErpDevelopModifyorderVo" useGeneratedKeys="true" keyProperty="developOrderId">
insert into erp_develop_modifyorder
<trim prefix="(" suffix=")" suffixOverrides=",">

Loading…
Cancel
Save