Browse Source

fix: 自动下发工单

master
李永德 1 year ago
parent
commit
41666a22ca
  1. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/cockpit/service/mapper/CockPitMapper.xml
  2. 5
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/autotask/AutoIssueWorkOrder.java
  3. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/workorder/service/IPdmBdWorkorderService.java
  4. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/workorder/service/dao/mapper/PdmBdWorkorderMapper.java
  5. 15
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/workorder/service/dao/mapper/PdmBdWorkorderMapper.xml
  6. 5
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/workorder/service/impl/PdmBdWorkorderServiceImpl.java
  7. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/FJQLTask.java
  8. 1
      lms/nladmin-ui/src/views/wms/pdm/workerorder/index.vue
  9. 1
      lms/nladmin-ui/src/views/wms/sch/group/MaterialDialog.vue

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/cockpit/service/mapper/CockPitMapper.xml

@ -15,7 +15,7 @@
<select id="getShiftProductionList" resultType="org.nl.wms.cockpit.service.dao.ShiftProductionVo"> <select id="getShiftProductionList" resultType="org.nl.wms.cockpit.service.dao.ShiftProductionVo">
SELECT SELECT
w.point_name AS column_name, w.point_name AS column_name,
SUM(IFNULL(w.qualified_qty, 0)) AS qualified_qty, SUM(IFNULL(w.qualified_qty, IFNULL(w.real_qty,0))) AS qualified_qty,
SUM(IFNULL(w.unqualified_qty, 0)) AS unqualified_qty, SUM(IFNULL(w.unqualified_qty, 0)) AS unqualified_qty,
SUM(IFNULL(w.plan_qty, 0) - IFNULL(w.qualified_qty, 0) - IFNULL(w.unqualified_qty, 0)) AS total_difference SUM(IFNULL(w.plan_qty, 0) - IFNULL(w.qualified_qty, 0) - IFNULL(w.unqualified_qty, 0)) AS total_difference
FROM FROM

5
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/autotask/AutoIssueWorkOrder.java

@ -36,10 +36,13 @@ public class AutoIssueWorkOrder {
private ISysNoticeService noticeService; private ISysNoticeService noticeService;
@SneakyThrows @SneakyThrows
public void run() { public void run() {
// 获取未有生产中的设备号 // 获取所有设备号
List<String> deviceCodes = workorderService.getTheDayUnProducedDevice(); List<String> deviceCodes = workorderService.getTheDayUnProducedDevice();
// 查找该设备未生产的工单去下发 // 查找该设备未生产的工单去下发
deviceCodes.forEach(s -> { deviceCodes.forEach(s -> {
// 判断是否有工单
List<PdmBdWorkorder> lists = workorderService.getTheDayProducedWorkOrderByDevice(s);
if (lists.size() > 0) return;
List<AcsWorkOrderVo> acsWorkOrderVoList = workorderService.getAcsWorkOrderVos(s); List<AcsWorkOrderVo> acsWorkOrderVoList = workorderService.getAcsWorkOrderVos(s);
if (acsWorkOrderVoList.size() == 0) return; if (acsWorkOrderVoList.size() == 0) return;
AcsWorkOrderVo acsWorkOrderVo = acsWorkOrderVoList.get(0); AcsWorkOrderVo acsWorkOrderVo = acsWorkOrderVoList.get(0);

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/workorder/service/IPdmBdWorkorderService.java

@ -106,4 +106,6 @@ public interface IPdmBdWorkorderService extends IService<PdmBdWorkorder> {
* @return * @return
*/ */
List<AcsWorkOrderVo> getAcsWorkOrderVos(String s); List<AcsWorkOrderVo> getAcsWorkOrderVos(String s);
List<PdmBdWorkorder> getTheDayProducedWorkOrderByDevice(String s);
} }

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/workorder/service/dao/mapper/PdmBdWorkorderMapper.java

@ -47,4 +47,6 @@ public interface PdmBdWorkorderMapper extends BaseMapper<PdmBdWorkorder> {
* @return * @return
*/ */
List<AcsWorkOrderVo> getAcsWorkOrderVos(String device); List<AcsWorkOrderVo> getAcsWorkOrderVos(String device);
List<PdmBdWorkorder> getTheDayProducedWorkOrderByDevice(String s);
} }

15
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/workorder/service/dao/mapper/PdmBdWorkorderMapper.xml

@ -82,10 +82,10 @@
p.point_code p.point_code
FROM FROM
`sch_base_point` p `sch_base_point` p
LEFT JOIN pdm_bd_workorder w ON w.point_code = p.point_code AND w.workorder_status = '3' AND w.workorder_status = '2'
WHERE WHERE
p.region_code = 'YZ' AND p.point_type = '1' AND p.is_has_workder = '1' p.region_code = 'YZ'
AND w.workorder_id IS NULL AND p.point_type = '1'
AND p.is_has_workder = '1'
</select> </select>
<select id="getAcsWorkOrderVos" resultType="org.nl.wms.pdm.workorder.service.dao.vo.AcsWorkOrderVo"> <select id="getAcsWorkOrderVos" resultType="org.nl.wms.pdm.workorder.service.dao.vo.AcsWorkOrderVo">
SELECT SELECT
@ -117,4 +117,13 @@
AND w.point_code = #{device} AND w.point_code = #{device}
ORDER BY w.planproducestart_date ORDER BY w.planproducestart_date
</select> </select>
<select id="getTheDayProducedWorkOrderByDevice"
resultType="org.nl.wms.pdm.workorder.service.dao.PdmBdWorkorder">
SELECT
*
FROM
`pdm_bd_workorder` w
WHERE w.point_code = #{s}
AND w.workorder_status != '5' AND w.workorder_status != '1'
</select>
</mapper> </mapper>

5
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/workorder/service/impl/PdmBdWorkorderServiceImpl.java

@ -270,4 +270,9 @@ public class PdmBdWorkorderServiceImpl extends ServiceImpl<PdmBdWorkorderMapper,
public List<AcsWorkOrderVo> getAcsWorkOrderVos(String s) { public List<AcsWorkOrderVo> getAcsWorkOrderVos(String s) {
return pdmBdWorkorderMapper.getAcsWorkOrderVos(s); return pdmBdWorkorderMapper.getAcsWorkOrderVos(s);
} }
@Override
public List<PdmBdWorkorder> getTheDayProducedWorkOrderByDevice(String s) {
return pdmBdWorkorderMapper.getTheDayProducedWorkOrderByDevice(s);
}
} }

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/fj/FJQLTask.java

@ -247,7 +247,7 @@ public class FJQLTask extends AbstractTask {
} }
public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) { public void cancelTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
String startPoint = taskObj.getPoint_code2(); // 获取终点 String startPoint = taskObj.getPoint_code1(); // 获取终点
SchBasePoint startPointObj = pointService.getById(startPoint); SchBasePoint startPointObj = pointService.getById(startPoint);
// 终点解锁 // 终点解锁
if (ObjectUtil.isNotEmpty(startPointObj)) { if (ObjectUtil.isNotEmpty(startPointObj)) {

1
lms/nladmin-ui/src/views/wms/pdm/workerorder/index.vue

@ -617,6 +617,7 @@ export default {
this.form.raw_material_code = row.material_code this.form.raw_material_code = row.material_code
} }
this.form.pack_method = row.pack_method this.form.pack_method = row.pack_method
this.form.vehicle_type = row.pack_palletspec
}, },
clearRecordMesOrder() { clearRecordMesOrder() {
this.form.order_no = null this.form.order_no = null

1
lms/nladmin-ui/src/views/wms/sch/group/MaterialDialog.vue

@ -74,6 +74,7 @@
<el-table-column prop="material_spec" label="物料规格" width="140" /> <el-table-column prop="material_spec" label="物料规格" width="140" />
<el-table-column prop="material_model" label="物料型号" width="140" /> <el-table-column prop="material_model" label="物料型号" width="140" />
<el-table-column prop="pack_method" label="包装方式" width="140" /> <el-table-column prop="pack_method" label="包装方式" width="140" />
<el-table-column prop="pack_palletspec" label="包装规则" width="140" />
<el-table-column v-if="queryInfo === '库存顺序'" prop="total_material_qty" label="物料总数/块" width="140" /> <el-table-column v-if="queryInfo === '库存顺序'" prop="total_material_qty" label="物料总数/块" width="140" />
<el-table-column prop="standing_time" label="静置时间(分钟)" width="130px" /> <el-table-column prop="standing_time" label="静置时间(分钟)" width="130px" />
<el-table-column prop="update_name" label="修改人" /> <el-table-column prop="update_name" label="修改人" />

Loading…
Cancel
Save