fix: 新增混碾指定压机
This commit is contained in:
@@ -82,4 +82,11 @@ public class DeviceController {
|
|||||||
return new ResponseEntity<>(deviceService.getAllRegions(),HttpStatus.OK);
|
return new ResponseEntity<>(deviceService.getAllRegions(),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/getYjDeviceList")
|
||||||
|
@ApiOperation("查询压机生产设备")
|
||||||
|
//@SaCheckPermission("device:list")
|
||||||
|
public ResponseEntity<Object> getYjDeviceList(){
|
||||||
|
return new ResponseEntity<>(deviceService.getYjDeviceList(),HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,4 +72,10 @@ public interface DeviceService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
JSONArray getAllRegions();
|
JSONArray getAllRegions();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 压机设备下拉框
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
JSONArray getYjDeviceList();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -122,4 +122,5 @@ public class WorkorderDto implements Serializable {
|
|||||||
|
|
||||||
private String gg;
|
private String gg;
|
||||||
private String kh;
|
private String kh;
|
||||||
|
private String associated_device;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -146,4 +146,11 @@ public class DeviceServiceImpl implements DeviceService {
|
|||||||
return resultJSONArray;
|
return resultJSONArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONArray getYjDeviceList() {
|
||||||
|
WQLObject wo = WQLObject.getWQLObject("pdm_bi_device");
|
||||||
|
JSONArray resultJSONArray = wo.query("region_code = 'YZ' AND device_model = '4'").getResultJSONArray(0);
|
||||||
|
return resultJSONArray;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,19 +104,28 @@ public class HLSendMaterialTask extends AbstractAcsTask {
|
|||||||
.process()
|
.process()
|
||||||
.uniqueResult(0);
|
.uniqueResult(0);
|
||||||
} else if ("2".equals(startPointType)) {
|
} else if ("2".equals(startPointType)) {
|
||||||
|
// 通过工单的关联压机送到对应位置,如果不满足就走以下流程
|
||||||
nextPoint = WQL.getWO("SEND_MATERIAL_TASK")
|
nextPoint = WQL.getWO("SEND_MATERIAL_TASK")
|
||||||
.addParam("flag", "4")
|
.addParam("flag", "8")
|
||||||
.addParam("material_id", task.getString("material_id"))
|
.addParam("device_code", startPoint.getString("device_code"))
|
||||||
.process()
|
.process()
|
||||||
.uniqueResult(0);
|
.uniqueResult(0);
|
||||||
if (ObjectUtil.isEmpty(nextPoint)) {
|
if (ObjectUtil.isEmpty(nextPoint) || ObjectUtil.isEmpty(nextPoint.get("point_code"))) {
|
||||||
|
// 先去普通压机困料货位
|
||||||
nextPoint = WQL.getWO("SEND_MATERIAL_TASK")
|
nextPoint = WQL.getWO("SEND_MATERIAL_TASK")
|
||||||
.addParam("flag", "5")
|
.addParam("flag", "4")
|
||||||
|
.addParam("material_id", task.getString("material_id"))
|
||||||
.process()
|
.process()
|
||||||
.uniqueResult(0);
|
.uniqueResult(0);
|
||||||
|
if (ObjectUtil.isEmpty(nextPoint)) {
|
||||||
|
// 公共货位
|
||||||
|
nextPoint = WQL.getWO("SEND_MATERIAL_TASK")
|
||||||
|
.addParam("flag", "5")
|
||||||
|
.process()
|
||||||
|
.uniqueResult(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ObjectUtil.isNotEmpty(nextPoint)) {
|
if (ObjectUtil.isNotEmpty(nextPoint)) {
|
||||||
task.put("task_status", TaskStatus.START_AND_END.value());
|
task.put("task_status", TaskStatus.START_AND_END.value());
|
||||||
task.put("point_code2", nextPoint.getString("point_code"));
|
task.put("point_code2", nextPoint.getString("point_code"));
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
输入.flag TYPEAS s_string
|
输入.flag TYPEAS s_string
|
||||||
输入.material_id TYPEAS f_string
|
输入.material_id TYPEAS f_string
|
||||||
输入.vd_id TYPEAS f_string
|
输入.vd_id TYPEAS f_string
|
||||||
|
输入.device_code TYPEAS s_string
|
||||||
|
|
||||||
[临时表]
|
[临时表]
|
||||||
--这边列出来的临时表就会在运行期动态创建
|
--这边列出来的临时表就会在运行期动态创建
|
||||||
@@ -159,3 +160,16 @@
|
|||||||
ENDSELECT
|
ENDSELECT
|
||||||
ENDQUERY
|
ENDQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
|
IF 输入.flag = "8"
|
||||||
|
QUERY
|
||||||
|
SELECT
|
||||||
|
p.*
|
||||||
|
FROM
|
||||||
|
`pdm_bd_workorder` wo
|
||||||
|
LEFT JOIN sch_base_point p ON p.device_code = wo.associated_device AND p.region_code = 'KLHJ'
|
||||||
|
AND p.point_type = '3' AND p.point_status = '1' AND p.lock_type = '1' AND p.is_used = '1'
|
||||||
|
WHERE wo.order_status = '3' AND wo.device_code = 输入.device_code
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
|
ENDIF
|
||||||
|
|||||||
Binary file not shown.
@@ -8,7 +8,7 @@ spring:
|
|||||||
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
||||||
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:yksh_lms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useOldAliasMetadataBehavior=true
|
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:yksh_lms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useOldAliasMetadataBehavior=true
|
||||||
username: ${DB_USER:root}
|
username: ${DB_USER:root}
|
||||||
password: ${DB_PWD:123456}
|
password: ${DB_PWD:12356}
|
||||||
# 初始连接数
|
# 初始连接数
|
||||||
initial-size: 5
|
initial-size: 5
|
||||||
# 最小连接数
|
# 最小连接数
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ spring:
|
|||||||
freemarker:
|
freemarker:
|
||||||
check-template-location: false
|
check-template-location: false
|
||||||
profiles:
|
profiles:
|
||||||
active: prod
|
active: dev
|
||||||
jackson:
|
jackson:
|
||||||
time-zone: GMT+8
|
time-zone: GMT+8
|
||||||
data:
|
data:
|
||||||
|
|||||||
@@ -36,4 +36,15 @@ public class TempTest {
|
|||||||
.getResultJSONArray(0);
|
.getResultJSONArray(0);
|
||||||
info.forEach(System.out::println);
|
info.forEach(System.out::println);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void test02() {
|
||||||
|
JSONArray cupData = WQLObject.getWQLObject("st_ivt_vehicle_detail").query("is_delete = '0' AND vehicle_type = '1'").getResultJSONArray(0);
|
||||||
|
System.out.println("data" + cupData);
|
||||||
|
// 处理
|
||||||
|
System.out.println("ssss" + String.format("%.2f", cupData.stream().filter(o -> "1".equals(((JSONObject) o).getString("stand_status"))).mapToDouble(o -> ((JSONObject) o).getDoubleValue("weight")).sum() / 1000));
|
||||||
|
System.out.println("opop" + String.format("%.2f", cupData.stream().filter(o -> "23".contains(((JSONObject) o).getString("stand_status"))).mapToDouble(o -> ((JSONObject) o).getDoubleValue("weight")).sum() / 1000));
|
||||||
|
List<Object> standStatus = cupData.stream().filter(o -> "23".contains(((JSONObject) o).getString("stand_status"))).collect(Collectors.toList());
|
||||||
|
System.out.println("sdf");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,6 +69,12 @@ export function copyAdd(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function getYjDeviceList() {
|
||||||
|
return request({
|
||||||
|
url: 'api/device/getYjDeviceList',
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export function changeActive(data) {
|
export function changeActive(data) {
|
||||||
return request({
|
return request({
|
||||||
@@ -78,4 +84,4 @@ export function changeActive(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export default { add, edit, del, getWorkprocedure, getItemByDeviceId, copyAdd, changeActive, getAllRegions }
|
export default { add, edit, del, getWorkprocedure, getItemByDeviceId, copyAdd, changeActive, getAllRegions, getYjDeviceList }
|
||||||
|
|||||||
@@ -208,6 +208,25 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="关联压机" prop="is_urgent">
|
||||||
|
<el-select
|
||||||
|
v-model="form.associated_device"
|
||||||
|
filterable
|
||||||
|
placeholder="关联压机"
|
||||||
|
clearable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in yjDeviceList"
|
||||||
|
:key="item.device_code"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.device_code"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="info" @click="crud.cancelCU">取消</el-button>
|
<el-button type="info" @click="crud.cancelCU">取消</el-button>
|
||||||
@@ -282,6 +301,7 @@ import pagination from '@crud/Pagination'
|
|||||||
import ViewDialog from '@/views/wms/pdm/workerorder/ViewDialog'
|
import ViewDialog from '@/views/wms/pdm/workerorder/ViewDialog'
|
||||||
import DeviceDialog from '@/views/wms/pub/DeviceDialog'
|
import DeviceDialog from '@/views/wms/pub/DeviceDialog'
|
||||||
import MaterDtl from '@/views/wms/pub/MaterDialog.vue'
|
import MaterDtl from '@/views/wms/pub/MaterDialog.vue'
|
||||||
|
import crudDevice from '@/api/wms/pdm/device'
|
||||||
|
|
||||||
const defaultForm = {
|
const defaultForm = {
|
||||||
workorder_id: null,
|
workorder_id: null,
|
||||||
@@ -331,6 +351,7 @@ const defaultForm = {
|
|||||||
region_code: null,
|
region_code: null,
|
||||||
plan_date: null,
|
plan_date: null,
|
||||||
plan_weight: null,
|
plan_weight: null,
|
||||||
|
associated_device: null,
|
||||||
dz: null,
|
dz: null,
|
||||||
gg: null,
|
gg: null,
|
||||||
kh: null
|
kh: null
|
||||||
@@ -365,6 +386,7 @@ export default {
|
|||||||
deviceShow: false,
|
deviceShow: false,
|
||||||
bomShow: false,
|
bomShow: false,
|
||||||
workprocedureList: [],
|
workprocedureList: [],
|
||||||
|
yjDeviceList: [],
|
||||||
order_status: ['-1'],
|
order_status: ['-1'],
|
||||||
permission: {},
|
permission: {},
|
||||||
orderData: {},
|
orderData: {},
|
||||||
@@ -395,8 +417,14 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
this.getYjDeviceList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getYjDeviceList() {
|
||||||
|
crudDevice.getYjDeviceList().then(res => {
|
||||||
|
this.yjDeviceList = res
|
||||||
|
})
|
||||||
|
},
|
||||||
// 工单状态多选搜索
|
// 工单状态多选搜索
|
||||||
handTaskStatus(value) {
|
handTaskStatus(value) {
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
|
|||||||
Reference in New Issue
Block a user