rev:修改
This commit is contained in:
@@ -92,7 +92,7 @@
|
||||
AND class.class_code IN ('YL001','FL001','WBC001','NBC001','OTHER01')
|
||||
<if test="param.class_code != null and param.class_code != ''">
|
||||
AND
|
||||
(class.class_code = #{param.class_code}
|
||||
class.class_code = #{param.class_code}
|
||||
</if>
|
||||
|
||||
<if test="param.material_code != null and param.material_code != ''">
|
||||
@@ -101,7 +101,6 @@
|
||||
mater.material_name LIKE #{param.material_code})
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY mater.update_time Desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -38,7 +38,7 @@ public class WmsToNotCarServiceImpl implements WmsToNotCarService {
|
||||
if (ObjectUtil.isEmpty(isConnectCar)) {
|
||||
return NoCarResponse.requestError("系统参数表中:" + SysParamConstant.IS_NOT_CAR + "不存在");
|
||||
}
|
||||
if (isConnectCar.getValue().equals(IOSConstant.ONE)) {
|
||||
if (isConnectCar.getValue().equals(IOSConstant.ZERO)) {
|
||||
return NoCarResponse.responseOk("下发成功,未连接无人车系统!");
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ public class WmsToNotCarServiceImpl implements WmsToNotCarService {
|
||||
if (ObjectUtil.isEmpty(isConnectCar)) {
|
||||
return NoCarResponse.requestError("系统参数表中:" + SysParamConstant.IS_NOT_CAR + "不存在");
|
||||
}
|
||||
if (isConnectCar.getValue().equals(IOSConstant.ONE)) {
|
||||
if (isConnectCar.getValue().equals(IOSConstant.ZERO)) {
|
||||
return NoCarResponse.responseOk("下发成功,未连接无人车系统!");
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ public class WmsToNotCarServiceImpl implements WmsToNotCarService {
|
||||
if (ObjectUtil.isEmpty(isConnectCar)) {
|
||||
return NoCarResponse.requestError("系统参数表中:" + SysParamConstant.IS_NOT_CAR + "不存在");
|
||||
}
|
||||
if (isConnectCar.getValue().equals(IOSConstant.ONE)) {
|
||||
if (isConnectCar.getValue().equals(IOSConstant.ZERO)) {
|
||||
return NoCarResponse.responseOk("下发成功,未连接无人车系统!");
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ public class PdaNotCarController {
|
||||
@PostMapping("/queryZhPoint")
|
||||
@Log("无人车装货 - 二级页面查询(物料维护)")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> queryZhPoint(JSONObject whereJson) {
|
||||
public ResponseEntity<Object> queryZhPoint(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(notCarService.queryZhPoint(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@@ -116,5 +116,17 @@ public class PdaNotCarController {
|
||||
return new ResponseEntity<>(notCarService.sendTask(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/queryIvtRegion")
|
||||
@Log("卸货库存查询 - 查询区域下拉框")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> queryIvtRegion() {
|
||||
return new ResponseEntity<>(notCarService.queryIvtRegion(), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/queryIvt")
|
||||
@Log("卸货库存查询 - 查询库存")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> queryIvt(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(notCarService.queryIvt(whereJson), HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,6 +124,23 @@ public interface PdaNotCarService {
|
||||
*/
|
||||
PdaResponse sendTask(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 卸货库存查询 - 查询区域下拉框
|
||||
*
|
||||
* @return PdaResponse
|
||||
*/
|
||||
PdaResponse queryIvtRegion();
|
||||
|
||||
/**
|
||||
* 卸货库存查询 - 查询库存
|
||||
*
|
||||
* @param whereJson {
|
||||
* region_code: 区域编码
|
||||
* }
|
||||
* @return PdaResponse
|
||||
*/
|
||||
PdaResponse queryIvt(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 公共 - 呼叫无人车
|
||||
*
|
||||
|
||||
@@ -150,7 +150,7 @@ public class PdaNotCarServiceImpl implements PdaNotCarService {
|
||||
// 更新到达点位系统参数
|
||||
Param sysParamService = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("IS_ARRIVE");
|
||||
sysParamService.setValue(IOSConstant.ZERO);
|
||||
iSysParamService.updateById(sysParamService);
|
||||
iSysParamService.update(sysParamService);
|
||||
return PdaResponse.requestOk();
|
||||
}
|
||||
|
||||
@@ -232,7 +232,7 @@ public class PdaNotCarServiceImpl implements PdaNotCarService {
|
||||
// 更新到达点位系统参数
|
||||
Param sysParamService = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("IS_ARRIVE");
|
||||
sysParamService.setValue(IOSConstant.ZERO);
|
||||
iSysParamService.updateById(sysParamService);
|
||||
iSysParamService.update(sysParamService);
|
||||
return PdaResponse.requestOk();
|
||||
}
|
||||
|
||||
@@ -290,7 +290,7 @@ public class PdaNotCarServiceImpl implements PdaNotCarService {
|
||||
// ---------------校验车间空位---------------
|
||||
if (wbClass > 0) {
|
||||
// 查询外包材空位
|
||||
List<SchBasePoint> wbPointList = schBasePointMapper.getNoTaskPointByRegionAndType(IOSConstant.WBC001, IOSConstant.ONE, IOSConstant.ONE);
|
||||
List<SchBasePoint> wbPointList = schBasePointMapper.getNoTaskPointByRegionAndType(IOSConstant.AGVDJ01, IOSConstant.ONE, IOSConstant.ONE);
|
||||
if (wbClass > wbPointList.size()) {
|
||||
throw new BadRequestException("存放外包材空位不足,当前需要空位【" + wbClass + "】当前已有空位【" + wbPointList.size() + "】");
|
||||
}
|
||||
@@ -306,18 +306,42 @@ public class PdaNotCarServiceImpl implements PdaNotCarService {
|
||||
// 更新已到达点位系统参数:1-下发车间卸货任务
|
||||
Param sysParamService = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("IS_ARRIVE");
|
||||
sysParamService.setValue(IOSConstant.ONE);
|
||||
iSysParamService.updateById(sysParamService);
|
||||
iSysParamService.update(sysParamService);
|
||||
return PdaResponse.requestOk();
|
||||
}
|
||||
|
||||
@Override
|
||||
public PdaResponse queryIvtRegion() {
|
||||
return PdaResponse.requestParamOk(PDAEnum.REGION_CODE.getDict());
|
||||
}
|
||||
|
||||
@Override
|
||||
public PdaResponse queryIvt(JSONObject whereJson) {
|
||||
String region_code = whereJson.getString("region_code");
|
||||
List<JSONObject> list;
|
||||
if (region_code.equals(IOSConstant.WXHHC01)) {
|
||||
// 卸货缓存区
|
||||
list = schBasePointMapper.getUnLoadIvt(whereJson);
|
||||
} else {
|
||||
// 外包材区
|
||||
list = schBasePointMapper.getUnLoadIvtWbc(whereJson);
|
||||
}
|
||||
return PdaResponse.requestParamOk(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void publicCallCar(JSONObject whereJson) {
|
||||
// 根据区域找对应的无人车对接点
|
||||
String taskNo = IdUtil.getStringId();
|
||||
// 将任务号存在系统中
|
||||
Param sysParamService = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("NO_CAR_TASK");
|
||||
// 判断任务号是否为0
|
||||
if (!sysParamService.getValue().equals(IOSConstant.ZERO)) {
|
||||
throw new BadRequestException("无人车正执行中!");
|
||||
}
|
||||
sysParamService.setValue(taskNo);
|
||||
iSysParamService.updateById(sysParamService);
|
||||
iSysParamService.update(sysParamService);
|
||||
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("requestType", "WCS_101");
|
||||
@@ -357,6 +381,9 @@ public class PdaNotCarServiceImpl implements PdaNotCarService {
|
||||
param.put("data", data);
|
||||
// 是否有成品配送
|
||||
wmsToNotCarService.isGoBack(param);
|
||||
// 更新任务号为 0
|
||||
sysParamService.setValue(IOSConstant.ZERO);
|
||||
iSysParamService.update(sysParamService);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -43,6 +43,8 @@ public enum PDAEnum {
|
||||
// 物料类别
|
||||
CLASS_TYPE(MapOf.of("原料", "YL001", "辅料", "FL001", "内包材", "NBC001", "外包材", "WBC001", "其他", "OTHER01")),
|
||||
|
||||
// 卸货库存查询-区域下拉框
|
||||
REGION_CODE(MapOf.of("外包材储存区", "AGVDJ01", "临时储存区", "LSCC01", "无人车卸货缓存区", "WXHHC01")),
|
||||
;
|
||||
|
||||
private Map<String, String> code;
|
||||
|
||||
@@ -133,6 +133,8 @@ public class SchBasePoint implements Serializable {
|
||||
|
||||
private String material_id;
|
||||
|
||||
private String material_qty;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<String> can_vehicle_types;
|
||||
|
||||
@@ -152,8 +154,6 @@ public class SchBasePoint implements Serializable {
|
||||
@TableField(exist = false)
|
||||
private String device_code;
|
||||
@TableField(exist = false)
|
||||
private String material_qty;
|
||||
@TableField(exist = false)
|
||||
private String material_code;
|
||||
@TableField(exist = false)
|
||||
private String material_name;
|
||||
|
||||
@@ -81,4 +81,22 @@ public interface SchBasePointMapper extends BaseMapper<SchBasePoint> {
|
||||
List<SchBasePoint> getNoTaskPointByRegionAndTypeCp(String region, String type, String pointStatus);
|
||||
|
||||
List<SchBasePoint> getCRUsedDevice();
|
||||
|
||||
/**
|
||||
* 手持:卸货库存查询 - 查询库存
|
||||
* @param whereJson {
|
||||
* region_code: 区域编码
|
||||
* }
|
||||
* @return List<JSONObject>
|
||||
*/
|
||||
List<JSONObject> getUnLoadIvt(@Param("param") JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 手持:卸货库存查询 - 查询库存
|
||||
* @param whereJson {
|
||||
* region_code: 区域编码
|
||||
* }
|
||||
* @return List<JSONObject>
|
||||
*/
|
||||
List<JSONObject> getUnLoadIvtWbc(@Param("param") JSONObject whereJson);
|
||||
}
|
||||
|
||||
@@ -139,6 +139,12 @@
|
||||
IFNULL(point.material_id, '') != ''
|
||||
AND point.point_status != '1'
|
||||
AND point.region_code = 'WRC01'
|
||||
AND 0 = (SELECT COUNT(*)
|
||||
FROM sch_base_task t
|
||||
WHERE t.is_delete = '0'
|
||||
AND (t.point_code1 = point.point_code OR
|
||||
t.point_code2 = point.point_code OR t.point_code3 = point.point_code OR t.point_code4 = point.point_code)
|
||||
AND '5' > t.task_status)
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@@ -224,4 +230,55 @@
|
||||
AND p.is_used = TRUE
|
||||
AND p.region_code = 'CRHCQ')
|
||||
</select>
|
||||
|
||||
<select id="getUnLoadIvt" resultType="com.alibaba.fastjson.JSONObject">
|
||||
SELECT
|
||||
point.*,
|
||||
mater.material_code,
|
||||
mater.material_name,
|
||||
class.class_name,
|
||||
supp.supp_name
|
||||
FROM
|
||||
sch_base_point point
|
||||
LEFT JOIN md_me_materialbase mater ON mater.material_id = point.material_id
|
||||
LEFT JOIN md_pb_classstandard class ON mater.material_type_id = class.class_id
|
||||
LEFT JOIN md_cs_supplierbase supp ON mater.supp_code = supp.supp_code
|
||||
<where>
|
||||
point.is_used = '1'
|
||||
AND point.region_code IN ('WXHHC01')
|
||||
AND point.point_status = '2'
|
||||
|
||||
<if test="param.region_code != null and param.region_code != ''">
|
||||
AND
|
||||
point.region_code = #{param.region_code}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getUnLoadIvtWbc" resultType="com.alibaba.fastjson.JSONObject">
|
||||
SELECT
|
||||
pack.point_code,
|
||||
pack.material_id,
|
||||
pack.pcsn,
|
||||
pack.qty AS material_qty,
|
||||
mater.material_code,
|
||||
mater.material_name,
|
||||
class.class_name,
|
||||
supp.supp_name
|
||||
FROM
|
||||
md_pdm_packaging pack
|
||||
LEFT JOIN sch_base_point point ON pack.point_code = point.point_code
|
||||
LEFT JOIN md_me_materialbase mater ON mater.material_id = pack.material_id
|
||||
LEFT JOIN md_pb_classstandard class ON mater.material_type_id = class.class_id
|
||||
LEFT JOIN md_cs_supplierbase supp ON mater.supp_code = supp.supp_code
|
||||
<where>
|
||||
point.is_used = '1'
|
||||
AND point.region_code IN ('AGVDJ01','LSCC01')
|
||||
|
||||
<if test="param.region_code != null and param.region_code != ''">
|
||||
AND
|
||||
point.region_code = #{param.region_code}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -189,7 +189,11 @@ public class NoCarBackCpTask extends AbstractTask {
|
||||
// 获取系统参数:无人车到达点位处理
|
||||
Param sysParamService = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("IS_ARRIVE");
|
||||
sysParamService.setValue(IOSConstant.ZERO);
|
||||
iSysParamService.updateById(sysParamService);
|
||||
iSysParamService.update(sysParamService);
|
||||
// 更新任务号为0
|
||||
Param sysParamTask = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("NO_CAR_TASK");
|
||||
sysParamTask.setValue(IOSConstant.ZERO);
|
||||
iSysParamService.update(sysParamTask);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -178,6 +178,7 @@ public class NoCarUnloadTask extends AbstractTask {
|
||||
.set(SchBasePoint::getVehicle_code, "")
|
||||
.set(SchBasePoint::getPoint_status, IOSEnum.POINT_STATUS.code("空位"))
|
||||
.set(SchBasePoint::getMaterial_id, "")
|
||||
.set(SchBasePoint::getMaterial_qty, "")
|
||||
);
|
||||
// 更新终点
|
||||
iSchBasePointService.update(
|
||||
@@ -218,7 +219,7 @@ public class NoCarUnloadTask extends AbstractTask {
|
||||
if (ObjectUtil.isNotEmpty(pointList)) {
|
||||
// 更新系统参数到达参数
|
||||
sysParamService.setValue(IOSConstant.TWO);
|
||||
iSysParamService.updateById(sysParamService);
|
||||
iSysParamService.update(sysParamService);
|
||||
// 返回有成品配送
|
||||
isGoBackParam.put("isGoback", IOSConstant.ZERO);
|
||||
pdaNotCarService.publicIsGoBack(isGoBackParam);
|
||||
@@ -233,7 +234,7 @@ public class NoCarUnloadTask extends AbstractTask {
|
||||
pdaNotCarService.publicIsGoBack(isGoBackParam);
|
||||
// 更新系统参数到达参数
|
||||
sysParamService.setValue(IOSConstant.ZERO);
|
||||
iSysParamService.updateById(sysParamService);
|
||||
iSysParamService.update(sysParamService);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user