生产叫料PDA修改

master
zpl 3 years ago
parent 41a2830064
commit 49ca453631

@ -151,6 +151,24 @@ public class CallItemController {
return R.ok("叫料操作成功");
}
/**
* pda
* @param callItemList
* @return
*/
@ResponseBody
@PostMapping("/callOrConfirmItemPda")
public R callOrConfirmItemPda(@RequestBody List<CallItem> callItemList) {
try {
String site = CommonMethods.getSite();
String user = CommonMethods.getUser();
callItemService.callOrConfirmItemPda(site, user, callItemList.get(0).getCallStatus() ,callItemList);
} catch (Exception e) {
return R.failed(e.getMessage());
}
return R.ok("叫料成功");
}
@ResponseBody
@PostMapping("/confirmReceive")
@ -203,6 +221,24 @@ public class CallItemController {
return R.ok("刷新叫料明细成功");
}
/**
*
* @param callItemList
* @return
*/
@ResponseBody
@PostMapping("/refreshCallItemPda")
public R refreshCallItemPda(@RequestBody List<CallItem> callItemList) {
try {
String site = CommonMethods.getSite();
String user = CommonMethods.getUser();
callItemService.refreshCallItemPda(site, user, callItemList);
} catch (Exception e) {
return R.failed(e.getMessage());
}
return R.ok("刷新叫料明细成功");
}
@ResponseBody
@PostMapping("/refreshRequiredTime")
public R refreshRequiredTime(@RequestBody List<String> callItemNoList) {

@ -40,6 +40,17 @@ public interface CallItemMapper extends BaseMapper<CallItem> {
void updateCallItemStatusByDispatchBo(@Param("status") String status, @Param("user") String user, @Param("dateTime") LocalDateTime dateTime, @Param("list") List<String> list);
/**
* PDA--
* @param status
* @param user
* @param dateTime
* @param list
*/
void updateCallItemStatusByHandle(@Param("status") String status, @Param("user") String user, @Param("dateTime") LocalDateTime dateTime, @Param("list") List<String> list);
void findRefreshCallItemPda(@Param("list") List<String> list);
void updateCallItemStatusByCallItemNo(@Param("status") String status, @Param("user") String user, @Param("dateTime") LocalDateTime dateTime, @Param("list") List<String> list);
void refreshRequiredTime(@Param("user") String user, @Param("dateTime") LocalDateTime dateTime, @Param("list") List<String> list);

@ -76,6 +76,14 @@ public interface CallItemService extends IService<CallItem> {
*/
void callItem(String site, String user, List<CallItem> callItemList);
/**
* PDA
* @param site
* @param user
* @param callItemList
*/
void callOrConfirmItemPda(String site, String user, String status ,List<CallItem> callItemList);
/**
*
* ----
@ -104,6 +112,14 @@ public interface CallItemService extends IService<CallItem> {
*/
void refreshCallItem(String site, String user, List<CallItem> callItemList);
/**
* PDA
* @param site
* @param user
* @param callItemList
*/
void refreshCallItemPda(String site, String user, List<CallItem> callItemList);
/**
*
*

@ -154,6 +154,16 @@ public class CallItemServiceImpl extends ServiceImpl<CallItemMapper, CallItem> i
this.updateCallItemStatusByDispatchBo(Constants.CALL_ITEM_STATUS_CALLED, user, dispatchBoList);
}
@Override
public void callOrConfirmItemPda(String site, String user,String status ,List<CallItem> callItemList) {
LocalDateTime dateTime = LocalDateTime.now();
List<String> list = new ArrayList<>();
for (CallItem callItem : callItemList) {
list.add(callItem.getHandle());
}
callItemMapper.updateCallItemStatusByHandle(status, user, dateTime, list);
}
@Override
public void confirmReceive(String site, String user, List<CallItem> callItemList) {
if (callItemList == null || callItemList.size() <= 0) {
@ -259,6 +269,11 @@ public class CallItemServiceImpl extends ServiceImpl<CallItemMapper, CallItem> i
}
}
@Override
public void refreshCallItemPda(String site, String user, List<CallItem> callItemList) {
}
@Override
public void refreshRequiredTime(String site, String user, List<String> callItemNoList) {
if (callItemNoList == null || callItemNoList.size() <= 0) {

@ -833,6 +833,14 @@
</foreach>
</update>
<update id="updateCallItemStatusByHandle">
UPDATE Z_CALL_ITEM SET CALL_STATUS = #{status}, MODIFY_USER = #{user}, MODIFIED_DATE_TIME = #{dateTime}
WHERE HANDLE IN
<foreach item="item" collection="list" separator="," open="(" close=")" index="">
#{item}
</foreach>
</update>
<update id="updateCallItemStatusByCallItemNo">
UPDATE Z_CALL_ITEM SET STATUS = #{status}, MODIFY_USER = #{user}, MODIFIED_DATE_TIME = #{dateTime}
WHERE STATUS != '804' AND CALL_ITEM_NO IN
@ -971,10 +979,10 @@
</select>
<select id="findCallItemInfoList" resultMap="FullResultMap">
SELECT CI.RESRCE ,CF.VALUE SHOP_ORDER ,CI.REQUIRED_QTY , CI.STATUS AS CALL_STATUS,
SELECT CI.HANDLE ,CI.RESRCE ,CF.VALUE SHOP_ORDER ,CI.REQUIRED_QTY , CI.CALL_STATUS,
B.BOM AS ITEM, B.DESCRIPTION ITEM_DESCRIPTION ,
SD.WORK_CENTER , WCT.DESCRIPTION AS WORK_CENTER_DESCRIPTION, SD.BLANKING_SIZE, SD.REMARK, SD.PLANNED_START_DATE,
I.ITEM AS ITEM_NO ,IT.DESCRIPTION AS COMPONENT_DESCRIPTION
I.ITEM AS COMPONENT ,IT.DESCRIPTION AS COMPONENT_DESCRIPTION
FROM Z_CALL_ITEM CI
LEFT JOIN SHOP_ORDER SO ON CI.SHOP_ORDER = SO.SHOP_ORDER
LEFT JOIN CUSTOM_FIELDS CF ON CF.HANDLE = SO.HANDLE AND CF."ATTRIBUTE" = 'WORK_ORDER'
@ -985,7 +993,7 @@
LEFT JOIN WORK_CENTER_T WCT ON WC.HANDLE = WCT.WORK_CENTER_BO
LEFT JOIN ITEM I ON CI.COMPONENT_BO = I.HANDLE
LEFT JOIN ITEM_T IT ON I.HANDLE = IT.ITEM_BO
WHERE CI.SITE = #{site}
WHERE CI.SITE = #{site} AND WCT.LOCALE = 'zh'
<if test="workCenter != null and workCenter != ''">
AND SD.WORK_CENTER = #{workCenter}
</if>
@ -998,13 +1006,28 @@
<if test="status != null and status != ''">
AND CI.STATUS = #{status}
</if>
<if test="startFromDate_S != null">
AND SD.PLANNED_START_DATE >= #{startFromDate_S}
<if test="startFromDate != null">
AND SD.PLANNED_START_DATE >= #{startFromDate}
</if>
<if test="startToDate_S != null">
AND SD.PLANNED_START_DATE &lt;= #{startToDate_S}
<if test="startToDate != null">
AND SD.PLANNED_START_DATE &lt;= #{startToDate}
</if>
ORDER BY CF.VALUE ,CI.RESRCE, I.ITEM
</select>
<select id="findRefreshCallItemPda" resultMap="FullResultMap">
SELECT CI.HANDLE ,CI.SFC ,CI.COMPONENT_BO ,BC.QTY REQUIRED_QTY, CF.VALUE STEP_ID
--BC.BOM_BO , CI.STEP_ID ,
FROM Z_CALL_ITEM CI
LEFT JOIN SFC S ON S.SFC = CI.SFC
LEFT JOIN SFC_BOM SB ON SB.SFC_BO = S.HANDLE
LEFT JOIN BOM_COMPONENT BC ON BC.BOM_BO = SB.BOM_BO AND BC.COMPONENT_GBO = CI.COMPONENT_BO
LEFT JOIN CUSTOM_FIELDS CF ON CF.HANDLE = BC.HANDLE AND CF."ATTRIBUTE" = 'STEP_ID' AND CF.VALUE = CI.STEP_ID
WHERE HANDLE IN
(
<foreach item="item" index="index" collection="coll" separator=",">
#{item}
</foreach>
)
</select>
</mapper>

Loading…
Cancel
Save