Compare commits
4 Commits
0bac0369d2
...
737f74255e
Author | SHA1 | Date | |
---|---|---|---|
737f74255e | |||
1b7b8915f1 | |||
305d36b2e9 | |||
7d9b117dff |
@ -205,4 +205,13 @@ public class DeliveryController {
|
|||||||
}
|
}
|
||||||
return AjaxResult.me().setErrorCode(-1).setMessage("修改失败");
|
return AjaxResult.me().setErrorCode(-1).setMessage("修改失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取采购订单详情
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "/getDeliveryReceiveDetail")
|
||||||
|
public AjaxResult GetDeliveryReceiveDetail(@RequestBody JSONObject in) {
|
||||||
|
List<String> nameList = (List<String>) in.get("nameList");
|
||||||
|
return AjaxResult.me().setSuccess(true).setResultObj(deliveryService.getDeliveryReceiveDetail(nameList));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -109,6 +109,13 @@ public interface DeliveryDao {
|
|||||||
*/
|
*/
|
||||||
List<DeliveryReceiveDetailVo> getReceiveDetail(@Param("nameList") List<String> nameList);
|
List<DeliveryReceiveDetailVo> getReceiveDetail(@Param("nameList") List<String> nameList);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据到库单获取采购单名称
|
||||||
|
* @param nameList 到库单
|
||||||
|
* @return 采购单名称列表
|
||||||
|
*/
|
||||||
|
List<DeliveryReceiveDetailVo> getDeliveryReceiveDetail(@Param("nameList") List<String> nameList);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取到货单
|
* 获取到货单
|
||||||
* @param dto 请求
|
* @param dto 请求
|
||||||
@ -152,4 +159,11 @@ public interface DeliveryDao {
|
|||||||
@MapKey("storeCharge")
|
@MapKey("storeCharge")
|
||||||
List<Map<String, Object>> getStoreChargeSort(@Param("siteName") String siteName,
|
List<Map<String, Object>> getStoreChargeSort(@Param("siteName") String siteName,
|
||||||
@Param("documentName") String documentName);
|
@Param("documentName") String documentName);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新入库单数量
|
||||||
|
* @param relationDto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int updateMaterialReceiveRequestDetailQty(@Param("dto") DeliveryRelationDto relationDto);
|
||||||
}
|
}
|
||||||
|
@ -95,7 +95,12 @@ public interface IDeliveryService {
|
|||||||
* @return 采购单名称列表
|
* @return 采购单名称列表
|
||||||
*/
|
*/
|
||||||
List<DeliveryReceiveDetailVo> getReceiveDetail(List<String> nameList);
|
List<DeliveryReceiveDetailVo> getReceiveDetail(List<String> nameList);
|
||||||
|
/**
|
||||||
|
* 根据到库单获取采购单名称
|
||||||
|
* @param nameList 到库单
|
||||||
|
* @return 采购单名称列表
|
||||||
|
*/
|
||||||
|
List<DeliveryReceiveDetailVo> getDeliveryReceiveDetail(List<String> nameList);
|
||||||
/**
|
/**
|
||||||
* 获取到货单
|
* 获取到货单
|
||||||
* @param dto 请求
|
* @param dto 请求
|
||||||
|
@ -50,6 +50,14 @@ public class DeliveryServiceImpl implements IDeliveryService {
|
|||||||
if (deliveryDao.createRelation(res) <= 0) {
|
if (deliveryDao.createRelation(res) <= 0) {
|
||||||
throw new GlobalException("添加到库单关系失败");
|
throw new GlobalException("添加到库单关系失败");
|
||||||
}
|
}
|
||||||
|
//更新采购订单行项的已入库数量
|
||||||
|
for (DeliveryRelationDto re : res) {
|
||||||
|
if (deliveryDao.updateMaterialReceiveRequestDetailQty(re) <= 0){
|
||||||
|
throw new GlobalException("更新采购单入库数量失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 添加到库单
|
// 添加到库单
|
||||||
return deliveryDao.createDelivery(dto, DeliveryStateEnums.CREATE.getCode());
|
return deliveryDao.createDelivery(dto, DeliveryStateEnums.CREATE.getCode());
|
||||||
}
|
}
|
||||||
@ -120,6 +128,11 @@ public class DeliveryServiceImpl implements IDeliveryService {
|
|||||||
return deliveryDao.getReceiveDetail(nameList);
|
return deliveryDao.getReceiveDetail(nameList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DeliveryReceiveDetailVo> getDeliveryReceiveDetail(List<String> nameList) {
|
||||||
|
return deliveryDao.getDeliveryReceiveDetail(nameList);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageInfo<MaterialDelivery> getDeliveryList(PageDto dto) {
|
public PageInfo<MaterialDelivery> getDeliveryList(PageDto dto) {
|
||||||
PageMethod.startPage(dto.getPageNum(), dto.getPageSize());
|
PageMethod.startPage(dto.getPageNum(), dto.getPageSize());
|
||||||
|
@ -225,7 +225,7 @@ public class MaterialPackingServiceServiceImpl implements IMaterialPackingServic
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (queryMaterialpackingList.isEmpty()){
|
if (queryMaterialpackingList.isEmpty()){
|
||||||
throw new Exception("冲销失败,物料:" + matnr + " " + werks + " " + lgort + " " + meins + "库存短缺");
|
throw new Exception("冲销失败,没有匹配该物料凭证:" + mblnr + "的消耗记录无法冲销");
|
||||||
}else {
|
}else {
|
||||||
MaterialPackingServiceProxy.getMaterialPackingService().setEvent(materialPackingKeyList, eventInfo, setEventInfoList);
|
MaterialPackingServiceProxy.getMaterialPackingService().setEvent(materialPackingKeyList, eventInfo, setEventInfoList);
|
||||||
}
|
}
|
||||||
|
@ -501,4 +501,22 @@
|
|||||||
ORDER BY A.CHARGE
|
ORDER BY A.CHARGE
|
||||||
) TTT
|
) TTT
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<update id="updateMaterialReceiveRequestDetailQty">
|
||||||
|
UPDATE MATERIALRECEIVEREQUESTDETAIL
|
||||||
|
SET RECEIVEDQUANTITY = #{dto.deliveryNum}
|
||||||
|
WHERE RECEIVEREQUESTNAME = #{dto.receiveRequestName}
|
||||||
|
AND RECEIVEREQUESTDETAILNAME = #{dto.receiveRequestDetailName}
|
||||||
|
AND MATERIALSPECNAME = #{dto.materialSpecName}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<select id="getDeliveryReceiveDetail" resultType="com.cim.idm.model.vo.DeliveryReceiveDetailVo">
|
||||||
|
SELECT receiveRequestName, materialSpecName, requestQuantity, requestQuantity - receivedQuantity as deliveryNum, RECEIVEREQUESTDETAILNAME
|
||||||
|
FROM MATERIALRECEIVEREQUESTDETAIL
|
||||||
|
WHERE RECEIVEREQUESTNAME in
|
||||||
|
<foreach item="name" index="index" collection="nameList" open="(" separator="," close=")">
|
||||||
|
#{name}
|
||||||
|
</foreach>
|
||||||
|
order by RECEIVEREQUESTDETAILNAME
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
Loading…
x
Reference in New Issue
Block a user