生产叫料PDA修改

master
zpl 3 years ago
parent da5c1159b2
commit 76211d85fa

@ -83,7 +83,7 @@ public class PrintLogServiceImpl extends ServiceImpl<PrintLogMapper, PrintLog> i
JSONObject jsonObject = JSONObject.parseObject(post);
Integer code = jsonObject.getInteger("code");
String msg = jsonObject.getString("msg");
if (code == 500){
if (code != 0){
throw BusinessException.build(msg);
}
// 更新打印记录:是否已打印、使用的打印机、打印次数

@ -110,6 +110,30 @@ public class CallItemController {
return R.ok(result);
}
/**
*
*
* @return
*/
@ResponseBody
@PostMapping("/findCallItemInfoList")
public R findCallItemInfoList(@RequestBody CallItem callItem){
List<CallItem> result;
try {
callItem.setSite(CommonMethods.getSite());
if (callItem.getStartFromDate_S() != null) {
callItem.setStartFromDate(DateUtil.parse(callItem.getStartFromDate_S()));
}
if (callItem.getStartToDate_S() != null) {
callItem.setStartToDate(DateUtil.parse(callItem.getStartToDate_S()));
}
result = callItemService.findCallItemInfoList(callItem);
} catch (Exception e) {
return R.failed(e.getMessage());
}
return R.ok(result);
}
@ResponseBody
@PostMapping("/callItem")
public R callItem(@RequestBody List<CallItem> callItemList) {

@ -34,6 +34,8 @@ public interface CallItemMapper extends BaseMapper<CallItem> {
List<CallItem> findCallItemDetailList(CallItem callItem);
List<CallItem> findCallItemInfoList(CallItem callItem);
List<CallItem> findCallItemDetailListByDispatchBo(@Param("site") String site, @Param("list") List<String> list);
void updateCallItemStatusByDispatchBo(@Param("status") String status, @Param("user") String user, @Param("dateTime") LocalDateTime dateTime, @Param("list") List<String> list);

@ -142,6 +142,8 @@ public class CallItem extends Model<CallItem> {
@TableField(exist = false)
private String component;
@TableField(exist = false)
private String componentDescription;
@TableField(exist = false)
private String itemDescription;
@TableField(exist = false)
private String materialType;
@ -158,6 +160,8 @@ public class CallItem extends Model<CallItem> {
@TableField(exist = false)
private String workCenter;
@TableField(exist = false)
private String workCenterDescription;
@TableField(exist = false)
private String dispatchNo;
@TableField(exist = false)
private BigDecimal dispatchQty;
@ -384,6 +388,14 @@ public class CallItem extends Model<CallItem> {
this.component = component;
}
public String getComponentDescription() {
return componentDescription;
}
public void setComponentDescription(String componentDescription) {
this.componentDescription = componentDescription;
}
public String getItemDescription() {
return itemDescription;
}

@ -58,6 +58,14 @@ public interface CallItemService extends IService<CallItem> {
*/
List<CallItem> findCallItemDetailListByDispatchBo(String site, List<String> dispatchBoList);
/**
* PDA
*
* @param callItem
* @return
*/
List<CallItem> findCallItemInfoList(CallItem callItem);
/**
*

@ -134,6 +134,11 @@ public class CallItemServiceImpl extends ServiceImpl<CallItemMapper, CallItem> i
return callItemMapper.findCallItemDetailListByDispatchBo(site, dispatchBoList);
}
@Override
public List<CallItem> findCallItemInfoList(CallItem callItem) {
return callItemMapper.findCallItemInfoList(callItem);
}
@Override
public void callItem(String site, String user, List<CallItem> callItemList) {
if (callItemList == null || callItemList.size() <= 0) {

@ -969,4 +969,42 @@
ON VIP.SITE = SIP.SITE AND VIP.ITEM_BO = SIP.ITEM_BO AND VIP.REQUIRED_QTY > 0
ORDER BY VIP.WORK_ORDER, VIP.ITEM
</select>
<select id="findCallItemInfoList" resultMap="FullResultMap">
SELECT CI.RESRCE ,CF.VALUE SHOP_ORDER ,CI.REQUIRED_QTY , CI.STATUS AS 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
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'
INNER JOIN BOM_COMPONENT BC ON CI.COMPONENT_BO = BC.COMPONENT_GBO
LEFT JOIN BOM B ON BC.BOM_BO = B.HANDLE
INNER JOIN Z_SFC_DISPATCH SD ON CI.SFC_DISPATCH_BO = SD.HANDLE
LEFT JOIN WORK_CENTER WC ON WC.WORK_CENTER = SD.WORK_CENTER
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}
<if test="workCenter != null and workCenter != ''">
AND SD.WORK_CENTER = #{workCenter}
</if>
<if test="resrce != null and resrce != ''">
AND CI.RESRCE = #{resrce}
</if>
<if test="component != null and component != ''">
AND I.ITEM = #{component}
</if>
<if test="status != null and status != ''">
AND CI.STATUS = #{status}
</if>
<if test="startFromDate_S != null">
AND SD.PLANNED_START_DATE >= #{startFromDate_S}
</if>
<if test="startToDate_S != null">
AND SD.PLANNED_START_DATE &lt;= #{startToDate_S}
</if>
ORDER BY CF.VALUE ,CI.RESRCE, I.ITEM
</select>
</mapper>

Loading…
Cancel
Save