刷新叫料修改

master
Leon 3 years ago
parent 9b4f90c47f
commit 4a98067090

@ -26,6 +26,8 @@ public interface CallItemMapper extends BaseMapper<CallItem> {
List<CallItem> selectDispatchCallItem(List<SfcDispatchDto> list);
void deleteCallItem(List<SfcDispatchDto> list);
void deleteDispatchCallItem(List<SfcDispatchDto> list);
List<CallItem> selectCallItemAndType(@Param("sfcDispatchBo") String sfcDispatchBo);

@ -28,10 +28,7 @@ import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
/**
@ -55,21 +52,21 @@ public class CallItemServiceImpl extends ServiceImpl<CallItemMapper, CallItem> i
@Override
public void sfcDispatchCallItem(String site, String user, List<SfcDispatchDto> sfcDispatchList) {
LocalDateTime nowDate = LocalDateTime.now();
if (sfcDispatchList == null || sfcDispatchList.size() <= 0) {
return;
}
LocalDateTime nowDate = LocalDateTime.now();
//删除原来的数据
callItemMapper.deleteDispatchCallItem(sfcDispatchList);
//查询叫料组件
List<CallItem> callItemList = callItemMapper.selectDispatchCallItem(sfcDispatchList);
if (callItemList == null || callItemList.size() <= 0) {
return;
}
List<CallItem> list = new ArrayList<>();
//删除原来的数据
callItemMapper.deleteDispatchCallItem(sfcDispatchList);
List<CallItem> list = new ArrayList<>();
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//工序叫料数据
//Leon.L 2021/8/16 业务取消工序叫料
@ -254,8 +251,8 @@ public class CallItemServiceImpl extends ServiceImpl<CallItemMapper, CallItem> i
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//删除原来的数据
callItemMapper.deleteDispatchCallItem(sfcDispatchList);
//删除原来的非发料状态数据
callItemMapper.deleteCallItem(sfcDispatchList);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
List<CallItem> list = callItemMapper.selectDispatchCallItem(sfcDispatchList);
@ -271,7 +268,7 @@ public class CallItemServiceImpl extends ServiceImpl<CallItemMapper, CallItem> i
String callItemNo = callItem.getSfc() + callItem.getStepId() + component;
callItem.setCallItemNo(callItemNo);
callItem.setHandle(HandleEnum.CALL_ITEM.getHandle(site, callItemNo));
callItem.setHandle(HandleEnum.CALL_ITEM.getHandle(site, UUID.randomUUID().toString()));
callItem.setCallType(Constants.CALL_TYPE_MATERIAL);
callItem.setStatus(Constants.CALL_ITEM_STATUS_NEW);
callItem.setCreateUser(user);

@ -604,6 +604,13 @@
WHERE SFC_DISPATCH_BO = #{sfcDispatchBo} AND STATUS IN ('802','803')
</select>
<delete id="deleteCallItem">
DELETE FROM Z_CALL_ITEM WHERE STATUS != '803' AND SFC_DISPATCH_BO IN
<foreach item="item" collection="list" separator="," open="(" close=")" index="">
#{item.handle}
</foreach>
</delete>
<delete id="deleteDispatchCallItem">
DELETE FROM Z_CALL_ITEM WHERE SFC_DISPATCH_BO IN
<foreach item="item" collection="list" separator="," open="(" close=")" index="">
@ -613,7 +620,7 @@
<select id="selectDispatchCallItem" resultMap="BaseResultMap">
SELECT ZSD.HANDLE SFC_DISPATCH_BO, ZSD.SITE, ZSD.SHOP_ORDER, ZSD.SFC, ZSD.DISPATCH_NO, ZSD.OPERATION, ZSD.STEP_ID, ZSD.RESRCE, BC.COMPONENT_GBO COMPONENT_BO,
SC.QTY*BC.QTY ISSUE_QTY, SC.QTY*BC.QTY-NVL(ZCI.REQUIRED_QTY,0) REQUIRED_QTY, ZSD.PLANNED_START_DATE REQUIRED_DATE_TIME, ZCI.HANDLE, ZCI.CALL_TYPE
SC.QTY*BC.QTY-NVL(ZCI.REQUIRED_QTY,0) REQUIRED_QTY, ZSD.PLANNED_START_DATE REQUIRED_DATE_TIME, ZCI.HANDLE, ZCI.CALL_TYPE
FROM Z_SFC_DISPATCH ZSD
INNER JOIN SFC SC ON SC.SITE = ZSD.SITE AND SC.SFC = ZSD.SFC
INNER JOIN SHOP_ORDER SO ON SO.HANDLE = SC.SHOP_ORDER_BO

Loading…
Cancel
Save