no message
This commit is contained in:
@@ -20,13 +20,12 @@ public class PointUpdateUtil {
|
|||||||
}
|
}
|
||||||
JSONObject joo = wmsToAcsServiceImpl.queryPointStatus(arr);
|
JSONObject joo = wmsToAcsServiceImpl.queryPointStatus(arr);
|
||||||
JSONArray pointarr = joo.getJSONArray("data");
|
JSONArray pointarr = joo.getJSONArray("data");
|
||||||
|
|
||||||
|
|
||||||
//JSONArray pointarr =new JSONArray();
|
//JSONArray pointarr =new JSONArray();
|
||||||
WQLObject pointTable = WQLObject.getWQLObject("sch_base_point");
|
WQLObject pointTable = WQLObject.getWQLObject("sch_base_point");
|
||||||
for (int i = 0; i < pointarr.size(); i++) {
|
for (int i = 0; i < pointarr.size(); i++) {
|
||||||
JSONObject pointjo = pointarr.getJSONObject(i);
|
JSONObject pointjo = pointarr.getJSONObject(i);
|
||||||
//String point_status = "00";
|
//String point_status = "00";
|
||||||
|
String mode = pointjo.getString("mode");
|
||||||
String point_status = "0" + pointjo.getString("move");
|
String point_status = "0" + pointjo.getString("move");
|
||||||
//String vehicle_code = pointjo.getString("vehicle_code");
|
//String vehicle_code = pointjo.getString("vehicle_code");
|
||||||
String vehicle_code = pointjo.getString("barcode");
|
String vehicle_code = pointjo.getString("barcode");
|
||||||
@@ -41,6 +40,7 @@ public class PointUpdateUtil {
|
|||||||
pointObj.put("vehicle_code", vehicle_code);
|
pointObj.put("vehicle_code", vehicle_code);
|
||||||
pointObj.put("point_status", point_status);
|
pointObj.put("point_status", point_status);
|
||||||
pointObj.put("vehicle_type", pallet_type);
|
pointObj.put("vehicle_type", pallet_type);
|
||||||
|
pointObj.put("mode", mode);
|
||||||
pointTable.update(pointObj);
|
pointTable.update(pointObj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ public class StructFindUtil {
|
|||||||
String area_type = jsonObject.getString("area_type");
|
String area_type = jsonObject.getString("area_type");
|
||||||
String is_full = jsonObject.getString("is_full");
|
String is_full = jsonObject.getString("is_full");
|
||||||
String workprocedure_id = jsonObject.getString("workprocedure_id");
|
String workprocedure_id = jsonObject.getString("workprocedure_id");
|
||||||
String group_device= jsonObject.getString("group_device");
|
String group_device = jsonObject.getString("group_device");
|
||||||
|
|
||||||
if (StrUtil.isEmpty(material_id)) {
|
if (StrUtil.isEmpty(material_id)) {
|
||||||
throw new BadRequestException("物料不能为空!");
|
throw new BadRequestException("物料不能为空!");
|
||||||
@@ -60,7 +60,7 @@ public class StructFindUtil {
|
|||||||
}
|
}
|
||||||
JSONObject result = WQL.getWO("QSTRUCT_RULE").addParam("flag", "3")
|
JSONObject result = WQL.getWO("QSTRUCT_RULE").addParam("flag", "3")
|
||||||
.addParam("material_id", material_id).addParam("area_type", area_type)
|
.addParam("material_id", material_id).addParam("area_type", area_type)
|
||||||
.addParam("group_device",group_device)
|
.addParam("group_device", group_device)
|
||||||
.addParam("is_full", is_full).addParam("workprocedure_id", workprocedure_id)
|
.addParam("is_full", is_full).addParam("workprocedure_id", workprocedure_id)
|
||||||
.process().uniqueResult(0);
|
.process().uniqueResult(0);
|
||||||
return result;
|
return result;
|
||||||
@@ -130,9 +130,7 @@ public class StructFindUtil {
|
|||||||
int task_num = WQL.getWO("QSTRUCT_RULE").addParam("flag", "7").process().uniqueResult(0).getIntValue("count");
|
int task_num = WQL.getWO("QSTRUCT_RULE").addParam("flag", "7").process().uniqueResult(0).getIntValue("count");
|
||||||
if (count > task_num) {
|
if (count > task_num) {
|
||||||
result = pointTable.query("device_id = '" + deviceObj.getString("device_id") + "' and device_point_type='01'").uniqueResult(0);
|
result = pointTable.query("device_id = '" + deviceObj.getString("device_id") + "' and device_point_type='01'").uniqueResult(0);
|
||||||
|
break;
|
||||||
} else {
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -211,6 +211,7 @@ IF 输入.flag = "6"
|
|||||||
LEFT JOIN pdm_base_device device ON device.device_id = rule.cacheline_id
|
LEFT JOIN pdm_base_device device ON device.device_id = rule.cacheline_id
|
||||||
WHERE
|
WHERE
|
||||||
point.area_type = '07'
|
point.area_type = '07'
|
||||||
|
AND point.mode<>'0'
|
||||||
AND ( point.vehicle_code = '' OR point.vehicle_code IS NULL )
|
AND ( point.vehicle_code = '' OR point.vehicle_code IS NULL )
|
||||||
OPTION 输入.material_id <> ""
|
OPTION 输入.material_id <> ""
|
||||||
rule.material_id = 输入.material_id
|
rule.material_id = 输入.material_id
|
||||||
|
|||||||
@@ -124,4 +124,10 @@ public class AcsToWmsController {
|
|||||||
public ResponseEntity<Object> queryCribbingInfo(@RequestBody Map whereJson) {
|
public ResponseEntity<Object> queryCribbingInfo(@RequestBody Map whereJson) {
|
||||||
return new ResponseEntity<>(acsToWmsService.queryCribbingInfo(whereJson), HttpStatus.OK);
|
return new ResponseEntity<>(acsToWmsService.queryCribbingInfo(whereJson), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
@PostMapping("/queryPrintInfoByCode")
|
||||||
|
@Log("获取打印信息")
|
||||||
|
@ApiOperation("获取木托盘垛形信息")
|
||||||
|
public ResponseEntity<Object> queryPrintInfoByCode(@RequestBody Map whereJson) {
|
||||||
|
return new ResponseEntity<>(acsToWmsService.queryPrintInfoByCode(whereJson), HttpStatus.OK);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,5 +116,10 @@ public interface AcsToWmsService {
|
|||||||
* @return Map<String, Object>
|
* @return Map<String, Object>
|
||||||
*/
|
*/
|
||||||
Map<String, Object> queryCribbingInfo(Map jsonObject);
|
Map<String, Object> queryCribbingInfo(Map jsonObject);
|
||||||
|
/**
|
||||||
|
* 获取条码信息
|
||||||
|
* @return Map<String, Object>
|
||||||
|
*/
|
||||||
|
Map<String, Object> queryPrintInfoByCode(Map jsonObject);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
jsonObject.put("material_id", material_id);
|
jsonObject.put("material_id", material_id);
|
||||||
jsonObject.put("is_full", "0");
|
jsonObject.put("is_full", "0");
|
||||||
jsonObject.put("workprocedure_id", WorkProcedureEnum.BZGX.getId());
|
jsonObject.put("workprocedure_id", WorkProcedureEnum.BZGX.getId());
|
||||||
jsonObject.put("group_device",jsonObject1.getString("group_device_id"));
|
jsonObject.put("group_device", jsonObject1.getString("group_device_id"));
|
||||||
callMaterialTask.createTask((JSONObject) JSON.toJSON(jsonObject));
|
callMaterialTask.createTask((JSONObject) JSON.toJSON(jsonObject));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -277,7 +277,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
String producetask_id = WQLObject.getWQLObject("pdm_mg_producetask").query("producetask_code='" + producetask_code + "'").uniqueResult(0).getString("producetask_id");
|
String producetask_id = WQLObject.getWQLObject("pdm_mg_producetask").query("producetask_code='" + producetask_code + "'").uniqueResult(0).getString("producetask_id");
|
||||||
JSONObject groubObj = new JSONObject();
|
JSONObject groubObj = new JSONObject();
|
||||||
String group_id = IdUtil.getSnowflake(1, 1).nextId() + "";
|
String group_id = IdUtil.getSnowflake(1, 1).nextId() + "";
|
||||||
groubObj.put("device_id",produceInfoByCode.getString("device_id"));
|
groubObj.put("device_id", produceInfoByCode.getString("device_id"));
|
||||||
groubObj.put("group_id", group_id);
|
groubObj.put("group_id", group_id);
|
||||||
groubObj.put("material_id", material_id);
|
groubObj.put("material_id", material_id);
|
||||||
groubObj.put("material_code", materialObj.getString("material_code"));
|
groubObj.put("material_code", materialObj.getString("material_code"));
|
||||||
@@ -778,6 +778,14 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> queryPrintInfoByCode(Map jsonObject) {
|
||||||
|
//找出最近的一个到包装位的任务
|
||||||
|
JSONObject taskObj = WQLObject.getWQLObject("sch_base_task").query("next_point_code='BZSLW' and is_delete='0' and task_type='07'", "update_time desc").uniqueResult(0);
|
||||||
|
JSONObject result = WQL.getWO("ACSTOMES_001").addParam("flag", "9").addParam("task_id", taskObj.getString("task_id")).process().uniqueResult(0);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
public static JSONObject getProduceInfoByCode(String code) {
|
public static JSONObject getProduceInfoByCode(String code) {
|
||||||
//根据 设备点位去找生产任务信息
|
//根据 设备点位去找生产任务信息
|
||||||
//1 根据点位去找设备,去找对应的设备信息
|
//1 根据点位去找设备,去找对应的设备信息
|
||||||
|
|||||||
@@ -198,3 +198,27 @@ IF 输入.flag = "8"
|
|||||||
ENDSELECT
|
ENDSELECT
|
||||||
ENDQUERY
|
ENDQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
|
|
||||||
|
IF 输入.flag = "9"
|
||||||
|
QUERY
|
||||||
|
SELECT DISTINCT
|
||||||
|
producetask.print_type,
|
||||||
|
producetask.print_dm,
|
||||||
|
producetask.print_name,
|
||||||
|
producetask.print_gg,
|
||||||
|
producetask.print_pc,
|
||||||
|
producetask.yh_name
|
||||||
|
FROM
|
||||||
|
sch_base_task task
|
||||||
|
LEFT JOIN st_buss_vehicleRelaRecord recordmst ON recordmst.vehicle_code = task.vehicle_code
|
||||||
|
LEFT JOIN st_buss_vehicleRelaRecordtl recorddtl ON recorddtl.record_id = recordmst.record_id
|
||||||
|
LEFT JOIN pdm_mg_producetask producetask ON producetask.producetask_id = recorddtl.producetask_id
|
||||||
|
where
|
||||||
|
1=1
|
||||||
|
OPTION 输入.task_id <> ""
|
||||||
|
task.task_id = 输入.task_id
|
||||||
|
ENDOPTION
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
|
ENDIF
|
||||||
@@ -166,5 +166,13 @@ public class ProducetaskController {
|
|||||||
producetaskService.issued(param);
|
producetaskService.issued(param);
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
@PutMapping("/synchro")
|
||||||
|
@Log("同步")
|
||||||
|
@ApiOperation("同步")
|
||||||
|
//@PreAuthorize("@el.check('producetask:list')")
|
||||||
|
public ResponseEntity<Object> synchro(@RequestBody JSONObject param){
|
||||||
|
producetaskService.synchro(param);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -142,4 +142,11 @@ public interface ProducetaskService {
|
|||||||
* @param param
|
* @param param
|
||||||
*/
|
*/
|
||||||
void issued(JSONObject param);
|
void issued(JSONObject param);
|
||||||
|
/**
|
||||||
|
* 下发
|
||||||
|
* @param param
|
||||||
|
*/
|
||||||
|
void synchro(JSONObject param);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import org.nl.modules.system.util.CodeUtil;
|
|||||||
import org.nl.utils.SpringContextHolder;
|
import org.nl.utils.SpringContextHolder;
|
||||||
import org.nl.wms.ext.acs.service.AcsToWmsService;
|
import org.nl.wms.ext.acs.service.AcsToWmsService;
|
||||||
import org.nl.wms.ext.acs.service.WmsToAcsService;
|
import org.nl.wms.ext.acs.service.WmsToAcsService;
|
||||||
|
import org.nl.wms.ext.acs.service.impl.WmsToJnServiceImpl;
|
||||||
import org.nl.wms.pdm.service.ProducetaskService;
|
import org.nl.wms.pdm.service.ProducetaskService;
|
||||||
import org.nl.wms.pdm.service.dto.ProducetaskDto;
|
import org.nl.wms.pdm.service.dto.ProducetaskDto;
|
||||||
import org.nl.wms.sch.AcsUtil;
|
import org.nl.wms.sch.AcsUtil;
|
||||||
@@ -24,6 +25,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
|
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
@@ -275,8 +277,8 @@ public class ProducetaskServiceImpl implements ProducetaskService {
|
|||||||
String now = DateUtil.now();
|
String now = DateUtil.now();
|
||||||
String producetask_id = param.getString("producetask_id");
|
String producetask_id = param.getString("producetask_id");
|
||||||
WQLObject wo = WQLObject.getWQLObject("pdm_mg_producetask");
|
WQLObject wo = WQLObject.getWQLObject("pdm_mg_producetask");
|
||||||
JSONObject taskObj= WQL.getWO("PDM_ProduceTask_01").addParam("flag", "3").addParam("producetask_id", producetask_id).process().uniqueResult(0);
|
JSONObject taskObj = WQL.getWO("PDM_ProduceTask_01").addParam("flag", "3").addParam("producetask_id", producetask_id).process().uniqueResult(0);
|
||||||
taskObj.put("product_code","wms");
|
taskObj.put("product_code", "wms");
|
||||||
WmsToAcsService wmsToAcsService = SpringContextHolder.getBean(WmsToAcsService.class);
|
WmsToAcsService wmsToAcsService = SpringContextHolder.getBean(WmsToAcsService.class);
|
||||||
JSONArray arr = new JSONArray();
|
JSONArray arr = new JSONArray();
|
||||||
arr.add(taskObj);
|
arr.add(taskObj);
|
||||||
@@ -290,6 +292,15 @@ public class ProducetaskServiceImpl implements ProducetaskService {
|
|||||||
wo.update(map, "producetask_id = '" + producetask_id + "'");
|
wo.update(map, "producetask_id = '" + producetask_id + "'");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void synchro(JSONObject param) {
|
||||||
|
WmsToJnServiceImpl wmsToJnService = new WmsToJnServiceImpl();
|
||||||
|
JSONObject jo = new JSONObject();
|
||||||
|
jo.put("startdate", DateUtil.today());
|
||||||
|
jo.put("enddate", DateUtil.today());
|
||||||
|
wmsToJnService.synchroDaySchedule(jo);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONArray getProduceline() {
|
public JSONArray getProduceline() {
|
||||||
WQLObject wo = WQLObject.getWQLObject("pdm_base_produceline");
|
WQLObject wo = WQLObject.getWQLObject("pdm_base_produceline");
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
package org.nl.wms.sch.task;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import cn.hutool.http.HttpRequest;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.wms.ext.acs.service.impl.WmsToJnServiceImpl;
|
||||||
|
import org.nl.wql.core.bean.WQLObject;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author geng by
|
||||||
|
* 自动回传失败的日志
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class AutoSysProduceTask {
|
||||||
|
private final WmsToJnServiceImpl wmsToJnServiceImpl;
|
||||||
|
|
||||||
|
public void run() throws Exception {
|
||||||
|
|
||||||
|
try {
|
||||||
|
JSONObject jo = new JSONObject();
|
||||||
|
jo.put("startdate", DateUtil.today());
|
||||||
|
jo.put("enddate", DateUtil.today());
|
||||||
|
wmsToJnServiceImpl.synchroDaySchedule(jo);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
Binary file not shown.
@@ -101,10 +101,17 @@ export function mandFinish(data) {
|
|||||||
|
|
||||||
export function issued(data) {
|
export function issued(data) {
|
||||||
return request({
|
return request({
|
||||||
url: 'api/producetask/issued',
|
url: 'api/producetask/npm',
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function synchro(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/producetask/synchro',
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export default { add, edit, del, getMaterial, getDevice, getProduceline, getCust, getWorkprocedure, excelImport, getDevice1, copyAdd, sortUpdate, mandFinish, issued }
|
export default { add, edit, del, getMaterial, getDevice, getProduceline, getCust, getWorkprocedure, excelImport, getDevice1, copyAdd, sortUpdate, mandFinish, issued, synchro }
|
||||||
|
|||||||
@@ -124,6 +124,16 @@
|
|||||||
>
|
>
|
||||||
排序
|
排序
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
slot="right"
|
||||||
|
class="filter-item"
|
||||||
|
type="info"
|
||||||
|
icon="el-icon-s-comment"
|
||||||
|
size="mini"
|
||||||
|
@click="is_sys"
|
||||||
|
>
|
||||||
|
同步
|
||||||
|
</el-button>
|
||||||
</crudOperation>
|
</crudOperation>
|
||||||
<!--表单组件-->
|
<!--表单组件-->
|
||||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="780px">
|
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="780px">
|
||||||
@@ -465,6 +475,15 @@ export default {
|
|||||||
this.mind_finish = true
|
this.mind_finish = true
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
is_sys() {
|
||||||
|
crudProducetask.synchro({ producetask_id:'' }).then(res => {
|
||||||
|
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
this.crud.toQuery()
|
||||||
|
this.issue = true
|
||||||
|
this.copy_add = true
|
||||||
|
this.mind_finish = true
|
||||||
|
})
|
||||||
|
},
|
||||||
buttonChange(current) {
|
buttonChange(current) {
|
||||||
if (current !== null) {
|
if (current !== null) {
|
||||||
this.currentRow = current
|
this.currentRow = current
|
||||||
|
|||||||
Reference in New Issue
Block a user