Merge branch 'master' into feature/三线需求_818

This commit is contained in:
zhangzhiqiang
2023-08-23 14:18:52 +08:00
36 changed files with 250 additions and 105 deletions

View File

@@ -46,7 +46,7 @@ public enum AcsTaskEnum {
TASK_STRUCT_HR_EMP_IN("29","入库-海柔半成品-空托盘"),
TASK_STRUCT_HR_EMP_OUT("30","出库-海柔半成品-空托盘"),
TASK_STRUCT_CP_CHECK("13","成品-盘点"),
TASK_WASH_LACK("20","清洗机-料请求"),
TASK_WASH_SEND_MATERIAL("20","清洗机-料请求"),
TASK_WASH_EMP("21","清洗机-空框请求"),
TASK_WASH_FULL_AUTO("22","清洗机-满料请求自动"),//去半成品入库:参数不全也去异常处理位
TASK_WASH_FULL_QZ("23","清洗机-强制搬出"),//去异常位:

View File

@@ -0,0 +1,24 @@
package org.nl.common.utils;
import org.apache.poi.ss.formula.functions.T;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
/*
* @author ZZQ
* @Date 2022/11/29 2:55 下午
*/
public class ListOf implements Serializable {
public static <K> ArrayList of(K... key){
ArrayList list = new ArrayList<>();
for (K k : key) {
list.add(k);
}
return list;
}
}

View File

@@ -425,9 +425,10 @@ public class AcsToWmsServiceImpl implements AcsToWmsService{
} catch (Exception e) {
result.put("status", HttpStatus.BAD_REQUEST.value());
result.put("message", e.getMessage());
return result;
}
result.put("status", HttpStatus.OK.value());
result.put("message", "");
result.put("message", "下发成功!");
return result;
}
}

View File

@@ -30,8 +30,6 @@ import java.util.Map;
@RequestMapping("api/storagevehicleinfo")
public class MdPbStoragevehicleinfoController {
@Autowired
private IMdPbStoragevehicleinfoService storagevehicleinfoService;
@Autowired
private IMdPbStoragevehicleinfoService istoragevehicleinfoService;
@@ -50,7 +48,7 @@ public class MdPbStoragevehicleinfoController {
@Log("查询载具")
//("查询载具")
public ResponseEntity<Object> query(VehicleQuery whereJson, PageQuery page){
return new ResponseEntity<>(TableDataInfo.build(storagevehicleinfoService.queryAll(whereJson,page)),HttpStatus.OK);
return new ResponseEntity<>(TableDataInfo.build(istoragevehicleinfoService.queryAll(whereJson,page)),HttpStatus.OK);
}
@PostMapping
@@ -65,7 +63,7 @@ public class MdPbStoragevehicleinfoController {
//("修改载具")
//@PreAuthorize("@el.check('mdPbStoragevehicleinfo:edit')")
public ResponseEntity<Object> update(@Validated @RequestBody JSONObject dto){
storagevehicleinfoService.update(dto);
istoragevehicleinfoService.update(dto);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@@ -74,7 +72,7 @@ public class MdPbStoragevehicleinfoController {
//@PreAuthorize("@el.check('mdPbStoragevehicleinfo:del')")
@DeleteMapping
public ResponseEntity<Object> delete(@RequestBody Long[] ids) {
storagevehicleinfoService.deleteAll(ids);
istoragevehicleinfoService.deleteAll(ids);
return new ResponseEntity<>(HttpStatus.OK);
}
@@ -83,7 +81,7 @@ public class MdPbStoragevehicleinfoController {
//("修改点位启用状态")
//@PreAuthorize("@el.check('store:edit')")
public ResponseEntity<Object> changeActive(@RequestBody JSONObject json) {
storagevehicleinfoService.changeActive(json);
istoragevehicleinfoService.changeActive(json);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@@ -92,7 +90,7 @@ public class MdPbStoragevehicleinfoController {
//("获取起始载具号")
//@PreAuthorize("@el.check('store:edit')")
public ResponseEntity<Object> getVehicle(@PathVariable String code) {
JSONObject json = storagevehicleinfoService.getVehicle(code);
JSONObject json = istoragevehicleinfoService.getVehicle(code);
return new ResponseEntity<>(json,HttpStatus.OK);
}

View File

@@ -101,6 +101,13 @@ public class MdPbStoragevehicleinfo implements Serializable {
*/
private BigDecimal vehicle_width;
/**
* 载具重量(kg)
*/
private BigDecimal vehicle_weight;
/**
* 载具长度
*/

View File

@@ -165,10 +165,6 @@ public class MdPbStoragevehicleinfoServiceImpl extends ServiceImpl<MdPbStorageve
@Override
public void update(JSONObject dto) {
Object byCode = this.findByCode(dto.getString("storagevehicle_code"));
if (!ObjectUtil.isEmpty(byCode)) {
throw new BadRequestException("此载具已存在");
}
MdPbStoragevehicleinfo entity = dto.toJavaObject(MdPbStoragevehicleinfo.class);
this.updateById(entity);
}

View File

@@ -183,18 +183,16 @@ public class PdaWashController {
LIMIT_WEIGHT = Double.valueOf(one.getValue());
}
if (sum>LIMIT_WEIGHT){
throw new BadRequestException("选择的储料仓物料总重量大于"+LIMIT_WEIGHT+"公斤");
throw new BadRequestException("选择的储料仓物料总重量大于"+LIMIT_WEIGHT/1000+"公斤");
}
Param limit_time = paramService.getOne(new QueryWrapper<Param>().eq("code", "pda_wash_time"));
//开启清洗上料时间限制
if (limit_time!=null &&limit_time.getValue().equals("1")){
if (limit_time!=null && !limit_time.getValue().equals("0")){
SchBaseTask lastTask = taskService.getOne(new QueryWrapper<SchBaseTask>()
.eq("task_type", AcsTaskEnum.REQUEST_WASH_SEND_MATERIAL.getCode()).orderByDesc("task_code").last("limit 1"));
String materialId = lastTask.getMaterial_id();
if (!list.get(0).getMaterial_id().equals(materialId)){
long between = DateUtil.between(new Date(), lastTask.getCreate_time(), DateUnit.MINUTE);
if (between<5){
throw new BadRequestException("不同物料任务间隔小于5分钟,任务:"+lastTask.getTask_code());
.eq("task_type", AcsTaskEnum.TASK_WASH_SEND_MATERIAL.getCode()).orderByDesc("task_code").last("limit 1"));
if (lastTask!=null){
if (DateUtil.between(new Date(), lastTask.getCreate_time(), DateUnit.MINUTE)<Integer.valueOf(limit_time.getValue())){
throw new BadRequestException("清洗上料任务间隔不小于"+limit_time.getValue()+"分钟,任务:"+lastTask.getTask_code());
}
}
}
@@ -278,6 +276,7 @@ public class PdaWashController {
task.put("material_name",materialbase!=null?materialbase.getMaterial_name():"");
task.put("material_code",materialbase!=null?materialbase.getMaterial_code():"");
task.put("material_spec",materialbase!=null?materialbase.getMaterial_spec():"");
task.put("net_weight",materialbase!=null?materialbase.getNet_weight():"");
task.put("create_time",task.get("create_time").toString());
task.put("sep_on",i);
i++;

View File

@@ -76,27 +76,27 @@ public class EngraveCallService {
kzDevice.remove("A1_KZ_14");
StIvtStructivtBcp stIvtStructivt = iStIvtStructivtBcpService.getOne(new QueryWrapper<StIvtStructivtBcp>()
.eq("struct_code", struct_code));
if (!CollectionUtils.isEmpty(kzDevice)){
List<PdmProduceWorkorder> workorders = workorderService.list(new QueryWrapper<PdmProduceWorkorder>()
.eq("workprocedure_id", ENGRAVE_WORKPRODURE)
.in("device_code", kzDevice)
.eq("workorder_status", WorkerOrderEnum.PRODUCTING.getCode()));
if (workorders.size()!=kzDevice.size()){
throw new BadRequestException("当前刻字工单不在生产状态");
}
if (workorders.stream().map(PdmProduceWorkorder::getMaterial_id).collect(Collectors.toSet()).size()>1){
throw new BadRequestException("所选刻字机的物料规格不是同一种");
}
if(!workorders.get(0).getMaterial_id().equals(stIvtStructivt.getMaterial_id())){
throw new BadRequestException("半成品库存物料规格与刻字机工单物料不一致");
}
List<SchBaseTask> list = taskService.list(new QueryWrapper<SchBaseTask>()
.lt("task_status", StatusEnum.TASK_FINISH.getCode())
.in("task_type", AcsTaskEnum.TASK_STRUCT_OUT.getCode(),AcsTaskEnum.TASK_Engrave_CALL.getCode(), AcsTaskEnum.TASK_Engrave_EMPTY.getCode()));
if (!CollectionUtils.isEmpty(list)){
throw new BadRequestException("存在正在执行的刻字上料相关任务:"+list.stream().map(SchBaseTask::getTask_code).collect(Collectors.joining(",")));
}
// if (!CollectionUtils.isEmpty(kzDevice)){
// List<PdmProduceWorkorder> workorders = workorderService.list(new QueryWrapper<PdmProduceWorkorder>()
// .eq("workprocedure_id", ENGRAVE_WORKPRODURE)
// .in("device_code", kzDevice)
// .eq("workorder_status", WorkerOrderEnum.PRODUCTING.getCode()));
// if (workorders.size()!=kzDevice.size()){
// throw new BadRequestException("当前刻字工单不在生产状态");
// }
// if (workorders.stream().map(PdmProduceWorkorder::getMaterial_id).collect(Collectors.toSet()).size()>1){
// throw new BadRequestException("所选刻字机的物料规格不是同一种");
// }
//
// if(!workorders.get(0).getMaterial_id().equals(stIvtStructivt.getMaterial_id())){
// throw new BadRequestException("半成品库存物料规格与刻字机工单物料不一致");
// }
// }
List<SchBaseTask> list = taskService.list(new QueryWrapper<SchBaseTask>()
.lt("task_status", StatusEnum.TASK_FINISH.getCode())
.in("task_type", AcsTaskEnum.TASK_STRUCT_OUT.getCode(),AcsTaskEnum.TASK_Engrave_CALL.getCode(), AcsTaskEnum.TASK_Engrave_EMPTY.getCode()));
if (!CollectionUtils.isEmpty(list)){
throw new BadRequestException("存在正在执行的刻字上料相关任务:"+list.stream().map(SchBaseTask::getTask_code).collect(Collectors.joining(",")));
}
JSONObject form = new JSONObject();
form.put("stor_id", IOSEnum.STOR_CODE.code("半成品仓库"));//st_ivt_sectattr紫铜车间-半成品库区

View File

@@ -122,11 +122,12 @@ public class EngraveSendEmpTask extends AbstractAcsTask {
task.put("priority", "1");
task.put("finished_type", "1");
task.put("agv_system_type", AcsTaskEnum.AGV_SYSTEM_XC.getCode());
SchBaseTask schBaseTask = task.toJavaObject(SchBaseTask.class);
Param one = paramService.getOne(new QueryWrapper<Param>().eq("code", "engrave_priority"));
if (one!=null){
schBaseTask.setPriority(one.getValue());
task.put("priority",one.getValue());
}
SchBaseTask schBaseTask = task.toJavaObject(SchBaseTask.class);
taskService.save(schBaseTask);
// 找终点
try {

View File

@@ -117,11 +117,11 @@ public class WashCallEmptyTask extends AbstractAcsTask {
}
// 查找任务状态
JSONObject task = packageTask(param.getString("device_code"));
SchBaseTask schBaseTask = task.toJavaObject(SchBaseTask.class);
Param one = paramService.getOne(new QueryWrapper<Param>().eq("code", "wash_priority"));
if (one!=null){
schBaseTask.setPriority(one.getValue());
task.put("priority",one.getValue());
}
SchBaseTask schBaseTask = task.toJavaObject(SchBaseTask.class);
taskService.save(schBaseTask);
// 找终点
try {
@@ -207,7 +207,7 @@ public class WashCallEmptyTask extends AbstractAcsTask {
.eq(StIvtStructattr::getLock_type, IOSEnum.LOCK_TYPE.code("未锁定"))
.eq(StIvtStructattr::getIs_used,true)
.orderByDesc(StIvtStructattr::getXqty)
.orderByAsc(StIvtStructattr::getYqty),false
.orderByAsc(StIvtStructattr::getZqty),false
);
if (ObjectUtil.isEmpty(attrDao)) throw new BadRequestException("未找到空载具!");

View File

@@ -125,8 +125,8 @@ public class WashMachineryTask extends AbstractAcsTask {
}
JSONObject task = new JSONObject();
task.put("task_id", IdUtil.getStringId());
task.put("task_name", AcsTaskEnum.REQUEST_WASH_SEND_MATERIAL.getDesc());
task.put("task_type", AcsTaskEnum.REQUEST_WASH_SEND_MATERIAL.getCode());
task.put("task_name", AcsTaskEnum.TASK_WASH_SEND_MATERIAL.getDesc());
task.put("task_type", AcsTaskEnum.TASK_WASH_SEND_MATERIAL.getCode());
task.put("task_code", CodeUtil.getNewCode("TASK_CODE"));
task.put("task_status", StatusEnum.TASK_PUBLISH.getCode());
task.put("point_code3", "A1_SKQXJ_01_S");//A1_SKQXJ_01_X

View File

@@ -83,14 +83,13 @@ public class WashSendMaterialTask extends AbstractAcsTask {
throw new BadRequestException(String.format("设备%s存在未完成任务"+list.stream().map(SchBaseTask::getTask_id).collect(Collectors.toList()).toString(), param.getString("device_code")));
}
SchBaseTask order = taskService.getById(param.getString("task_id"));
MdMeMaterialbase byId = materialbaseService.getById(order.getMaterial_id());
JSONObject form = new JSONObject();
form.put("bill_type","0001");
form.put("point_code",start_point_code);
form.put("stor_id", IOSEnum.STOR_CODE.code("半成品仓库"));//半成品仓库
form.put("total_qty",param.getString("wegiht"));
form.put("material_id",order.getMaterial_id());
form.put("unit_weight",byId.getNet_weight());
form.put("unit_weight",param.getString("net_weight"));
form.put("storagevehicle_code",param.getString("vechile_code"));
form.put("product_code","A1");
form.put("auto_send",true);

View File

@@ -224,5 +224,10 @@ public class SchBasePoint implements Serializable {
*/
private String control_point;
/**
* 点位优先级默认1
*/
private String priority;
}

View File

@@ -138,6 +138,7 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
schBasePoint.setCreate_id(SecurityUtils.getCurrentUserId());
schBasePoint.setCreate_name(SecurityUtils.getCurrentNickName());
schBasePoint.setCreate_time(new Date());
schBasePoint.setPriority("1");
this.save(schBasePoint);
}

View File

@@ -17,6 +17,7 @@ import org.jetbrains.annotations.NotNull;
import org.nl.common.TableDataInfo;
import org.nl.common.domain.query.PageQuery;
import org.nl.common.enums.AcsTaskEnum;
import org.nl.common.enums.StatusEnum;
import org.nl.common.publish.BussEventMulticaster;
import org.nl.common.publish.event.PointEvent;
import org.nl.common.utils.IdUtil;
@@ -342,10 +343,16 @@ public class StIvtIostorinvCpOutServiceImpl extends ServiceImpl<StIvtIostorinvCp
// 判断是否有已经有正在执行中的任务
boolean is_create_task = disDaoList.stream()
.anyMatch(row -> Integer.parseInt(row.getWork_status()) > Integer.parseInt(IOSEnum.WORK_STATUS.code("生成")));
if (is_create_task) throw new BadRequestException("任务已执行或已完成,不可取消!");
.anyMatch(row -> Integer.parseInt(row.getWork_status()) > Integer.parseInt(IOSEnum.WORK_STATUS.code("执行中")));
if (is_create_task) throw new BadRequestException("单据已完成,不可取消!");
List<String> collect = disDaoList.stream().map(StIvtIostorinvdisCp::getTask_id).collect(Collectors.toList());
List<SchBaseTask> tasks = iSchBaseTaskService.list(new QueryWrapper<SchBaseTask>()
.lt("task_status", StatusEnum.TASK_CANNEL.getCode())
.in("task_id", collect));
if (!CollectionUtils.isEmpty(tasks)){
throw new BadRequestException("搬运:"+tasks.stream().map(SchBaseTask::getTask_code).collect(Collectors.joining(","))+"任务以生成,不可取消!请先取消任务再操作");
}
// 2.更新库存,删除任务
for (StIvtIostorinvdisCp disDao : disDaoList) {
// 更新库存、更新仓位
@@ -370,6 +377,7 @@ public class StIvtIostorinvCpOutServiceImpl extends ServiceImpl<StIvtIostorinvCp
dtlDao.setBill_status(IOSEnum.BILL_STATUS.code("生成"));
dtlDao.setAssign_qty(BigDecimal.valueOf(0));
dtlDao.setUnassign_qty(dtlDao.getReal_qty());
dtlDao.setRemark_ext("");
iostorinvdtlCpService.updateById(dtlDao);
@@ -385,7 +393,7 @@ public class StIvtIostorinvCpOutServiceImpl extends ServiceImpl<StIvtIostorinvCp
dtlDao.setBill_status(IOSEnum.BILL_STATUS.code("生成"));
dtlDao.setAssign_qty(BigDecimal.valueOf(0));
dtlDao.setUnassign_qty(dtlDao.getReal_qty());
dtlDao.setRemark_ext("");
iostorinvdtlCpService.updateById(dtlDao);
}
@@ -478,6 +486,7 @@ public class StIvtIostorinvCpOutServiceImpl extends ServiceImpl<StIvtIostorinvCp
.task_group_id(IdUtil.getStringId())
.point_code1(disDao.getStruct_code())
.point_code3(pointDao.getPoint_code())
.priority(pointDao.getPriority())
.vehicle_code(disDao.getStoragevehicle_code())
.product_area("A1") // 暂时写死
.callback((Consumer<String>) disDao::setTask_id)
@@ -586,6 +595,7 @@ public class StIvtIostorinvCpOutServiceImpl extends ServiceImpl<StIvtIostorinvCp
.task_group_id(IdUtil.getStringId())
.point_code1(struct_code)
.point_code3(dao.getPoint_code())
.priority(dao.getPriority())
.vehicle_code(disDao.getStoragevehicle_code())
.product_area("A1") // 暂时写死
.callback((Consumer<String>) disDao::setTask_id)
@@ -865,9 +875,17 @@ public class StIvtIostorinvCpOutServiceImpl extends ServiceImpl<StIvtIostorinvCp
);
} if (status.equals(AcsTaskEnum.STATUS_CANNEL.getCode())) {
// 取消任务
JSONObject param = new JSONObject();
param.put("iostorinvdis_id",disDao.getIostorinvdis_id());
delTask(param);
// 1.删除任务
iSchBaseTaskService.update(
new UpdateWrapper<SchBaseTask>().lambda()
.set(SchBaseTask::getTask_status,TaskStatusEnum.CANCEL.getCode())
.eq(SchBaseTask::getTask_id, task_id)
);
if (disDao!=null){
JSONObject param = new JSONObject();
param.put("iostorinvdis_id",disDao.getIostorinvdis_id());
delTask(param);
}
// 更新发货点位
iSchBasePointService.update(

View File

@@ -11,7 +11,6 @@ import org.nl.common.utils.IdUtil;
import org.nl.modules.common.exception.BadRequestException;
import org.nl.modules.system.util.CodeUtil;
import org.nl.wms.masterdata_manage.service.vehicle.IMdPbStoragevehicleinfoService;
import org.nl.wms.masterdata_manage.service.vehicle.dao.MdPbStoragevehicleinfo;
import org.nl.wms.masterdata_manage.storage.service.storage.IStIvtSectattrService;
import org.nl.wms.masterdata_manage.storage.service.storage.IStIvtStructattrService;
import org.nl.wms.masterdata_manage.storage.service.storage.dao.StIvtSectattr;

View File

@@ -2,6 +2,7 @@ package org.nl.wms.storage_manage.productmanage.util.impl;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import org.nl.common.utils.RedissonUtils;
@@ -56,18 +57,22 @@ public class DivRuleCpServiceImpl implements DivRuleCpService {
switch (whereJson.getString("rule_type")) {
case RuleUtil.PRODUCTION_IN_1 :
attrDao = iStIvtStructattrService.getOne(
new QueryWrapper<StIvtStructattr>().lambda()
.eq(StIvtStructattr::getStor_id, stor_id)
.eq(StIvtStructattr::getSect_id, sect_id)
.eq(StIvtStructattr::getIs_used, IOSEnum.IS_USED.code(""))
.eq(StIvtStructattr::getLock_type, IOSEnum.LOCK_TYPE.code("未锁定"))
.and(qr -> qr.eq(StIvtStructattr::getStoragevehicle_code,"")
.or().isNull(StIvtStructattr::getStoragevehicle_code)
)
.ne(StIvtStructattr::getIs_emptyvehicle, true)
.orderByDesc(StIvtStructattr::getXqty)
.orderByAsc(StIvtStructattr::getYqty)
LambdaQueryWrapper<StIvtStructattr> wrapper = new QueryWrapper<StIvtStructattr>().lambda()
.eq(StIvtStructattr::getStor_id, stor_id)
.eq(StIvtStructattr::getSect_id, sect_id)
.eq(StIvtStructattr::getIs_used, IOSEnum.IS_USED.code(""))
.eq(StIvtStructattr::getLock_type, IOSEnum.LOCK_TYPE.code("未锁定"))
.and(qr -> qr.eq(StIvtStructattr::getStoragevehicle_code, "")
.or().isNull(StIvtStructattr::getStoragevehicle_code)
)
.ne(StIvtStructattr::getIs_emptyvehicle, true)
.orderByDesc(StIvtStructattr::getXqty);
if (IOSEnum.STOR_CODE.code("半成品仓库").equals(stor_id)){
wrapper.orderByAsc(StIvtStructattr::getYqty);
}else {
wrapper.orderByAsc(StIvtStructattr::getZqty);
}
attrDao = iStIvtStructattrService.getOne(wrapper
, false);
break;
case RuleUtil.PRODUCTION_IN_2 :

View File

@@ -7,6 +7,7 @@ import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.ApiOperation;
import org.nl.common.anno.Log;
import org.nl.common.domain.query.PageQuery;
import org.nl.common.utils.ListOf;
import org.nl.common.utils.MapOf;
import org.nl.wms.storage_manage.basedata.service.record.dto.StIvtStructivtflowVo;
import org.nl.wms.storage_manage.productmanage.service.structIvt.dto.CpIvtQuery;
@@ -79,7 +80,8 @@ public class StIvtStructivtBcpController {
List<Map> maps = bcpService.queryAll(query);
String s = JSON.toJSONString(maps);
List<StIvtStructivtBcpVo> bcpVos = JSONArray.parseArray(s, StIvtStructivtBcpVo.class);
columnInfoService.exportFile(bcpVos,response, MapOf.of("stor_name","仓库名称","material_name","物料名称","material_spec","物料规格"));
columnInfoService.exportFile(bcpVos,response, ListOf.of("is_pick","ivt_level","is_active","qty_unit_id","stor_id","ivt_level","struct_id","material_id","quality_scode"),
MapOf.of("stor_name","仓库名称","material_name","物料名称","material_spec","物料规格","material_code","物料编号","storagevehicle_code","载具编号","vehicle_weight","载具单重(g)"));
return new ResponseEntity<>(HttpStatus.OK);
}
}

View File

@@ -219,6 +219,9 @@ public class StIvtIostorinvBcpServiceImpl extends ServiceImpl<StIvtIostorinvBcpM
.workshop_id(stor.getProduct_area())
.unit_weight(mdMeMaterialbase.getNet_weight())
.build();
if (form.getString("bill_type")!=null){
ivtDao.setBill_type(form.getString("bill_type"));
}
structivtBcpService.save(ivtDao);
// 插入库存变动记录
JSONObject param = JSONObject.parseObject(JSON.toJSONString(ivtDao));

View File

@@ -142,12 +142,14 @@
attr.sect_code,
attr.sect_name,
attr.stor_name,
attr.storagevehicle_code
attr.storagevehicle_code,
vehicle.vehicle_weight
FROM
st_ivt_structivt_bcp ivt
LEFT JOIN md_me_materialbase mater ON ivt.material_id = mater.material_id
LEFT JOIN st_ivt_structattr attr ON attr.struct_id = ivt.struct_id
LEFT JOIN md_pb_measureunit unit ON unit.measure_unit_id = ivt.qty_unit_id
LEFT JOIN md_pb_storagevehicleinfo vehicle ON vehicle.storagevehicle_code = attr.storagevehicle_code
<where>
1=1
<if test="query.material_code!= null and query.material_code != ''">

View File

@@ -98,5 +98,6 @@ public class StIvtStructivtBcpVo {
private String sect_name;
private String stor_name;
private String storagevehicle_code;
private String vehicle_weight;
}

View File

@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.nl.common.anno.Log;
import org.nl.common.domain.query.PageQuery;
import org.nl.common.utils.ListOf;
import org.nl.common.utils.MapOf;
import org.nl.wms.storage_manage.semimanage.service.structIvt.dto.StIvtStructivtBcpVo;
import org.nl.wms.storage_manage.semimanagehr.service.structIvt.IStIvtStructivtHrBcpService;
@@ -72,7 +73,9 @@ public class StIvtStructivtHrBcpController {
List<Map> maps = bcpService.queryAll(query);
String s = JSON.toJSONString(maps);
List<StIvtStructivtBcpVo> bcpVos = JSONArray.parseArray(s, StIvtStructivtBcpVo.class);
columnInfoService.exportFile(bcpVos,response, MapOf.of("stor_name","仓库名称","material_name","物料名称","material_spec","物料规格"));
columnInfoService.exportFile(bcpVos,response,
ListOf.of(""),
MapOf.of("stor_name","仓库名称","material_name","物料名称","material_spec","物料规格"));
return new ResponseEntity<>(HttpStatus.OK);
}
}

View File

@@ -164,7 +164,7 @@ public class StIvtCheckmstHrBcpServiceImpl extends ServiceImpl<StIvtCheckmstHrBc
// 生成任务
String task_group_id = IdUtil.getStringId();
PointEvent event = PointEvent.builder()
.acs_task_type("7")
.acs_task_type("15")
.type(AcsTaskEnum.TASK_STRUCT_HR_CHECK)
.point_code1(struct.getStruct_code())
.point_code3(struct.getStruct_code())
@@ -391,7 +391,7 @@ public class StIvtCheckmstHrBcpServiceImpl extends ServiceImpl<StIvtCheckmstHrBc
// 判断是否都为完成
boolean is_status = dtlDaoList.stream()
.anyMatch(row -> row.getStatus().equals(CHECKEnum.BILL_STATUS.code("完成")));
.allMatch(row -> row.getStatus().equals(CHECKEnum.BILL_STATUS.code("完成")));
if (is_status) {
// 完成单据
@@ -410,9 +410,9 @@ public class StIvtCheckmstHrBcpServiceImpl extends ServiceImpl<StIvtCheckmstHrBc
// 判断是否都为正常
boolean is_check = dtlDaoList.stream()
.filter(row -> ObjectUtil.isNotEmpty(row.getCheck_result()))
.anyMatch(row -> row.getCheck_result().equals(CHECKEnum.CHECK_RESULT.code("正常")));
.allMatch(row -> row.getCheck_result().equals(CHECKEnum.CHECK_RESULT.code("正常")));
mstDao.setIs_nok(is_check);
mstDao.setIs_nok(!is_check);
this.updateById(mstDao);

View File

@@ -95,10 +95,10 @@ public class StIvtIostorinvEmpBcpServiceImpl implements IStIvtIostorinvEmpBcpSe
SchBaseTask taskDao = new SchBaseTask();
PointEvent event = PointEvent.builder()
.type(AcsTaskEnum.TASK_STRUCT_HR_EMP_IN)
.acs_task_type("7")
.acs_task_type("17")
.task_group_id(IdUtil.getStringId())
.point_code1(device_code)
.point_code3(barcode)
.point_code3(arrtDao.getStruct_code())
.vehicle_code(barcode)
.product_area("A3")
.callback((Consumer<String>) taskDao::setTask_id)
@@ -192,7 +192,7 @@ public class StIvtIostorinvEmpBcpServiceImpl implements IStIvtIostorinvEmpBcpSe
SchBaseTask taskDao = new SchBaseTask();
PointEvent event = PointEvent.builder()
.type(AcsTaskEnum.TASK_STRUCT_HR_EMP_OUT)
.acs_task_type("7")
.acs_task_type("16")
.task_group_id(IdUtil.getStringId())
.point_code1(arrtDao.getStruct_code())
.point_code3(device_code)

View File

@@ -347,7 +347,7 @@ public class StIvtIostorinvHrBcpInServiceImpl extends ServiceImpl<StIvtIostorinv
PointEvent event = PointEvent.builder()
.type(AcsTaskEnum.TASK_STRUCT_HR_IN)
.acs_task_type("7")
.acs_task_type("13")
.task_group_id(IdUtil.getStringId())
.point_code1(mst.getPoint_code())
.point_code3(stIvtStructattr.getStruct_code())

View File

@@ -210,10 +210,11 @@ public class StIvtIostorinvHrBcpOutServiceImpl extends ServiceImpl<StIvtIostorin
param.put("bill_type_scode",mst.getBill_type());
iStIvtStructivtflowService.insetIvtChange(param);
//维护载具
//更新仓位
structattrService.update(new UpdateWrapper<StIvtStructattr>().lambda()
.eq(StIvtStructattr::getStruct_code, mst.getStruct_code())
.set(StIvtStructattr::getLock_type, IOSEnum.LOCK_TYPE.code("未锁定"))
.set(StIvtStructattr::getTask_code, "")
.set(StIvtStructattr::getInv_code,"")
.set(StIvtStructattr::getStoragevehicle_code, ""));
@@ -437,7 +438,7 @@ public class StIvtIostorinvHrBcpOutServiceImpl extends ServiceImpl<StIvtIostorin
PointEvent event = PointEvent.builder()
.type(AcsTaskEnum.TASK_STRUCT_HR_OUT)
.acs_task_type("7")
.acs_task_type("14")
.task_group_id(IdUtil.getStringId())
.point_code3(mst.getPoint_code())
.point_code1(mst.getStruct_code())

View File

@@ -7,6 +7,7 @@ import org.quartz.*;
import org.quartz.impl.triggers.CronTriggerImpl;
import org.springframework.stereotype.Component;
import javax.annotation.PreDestroy;
import javax.annotation.Resource;
import java.util.Date;
@@ -155,4 +156,16 @@ public class QuartzManage {
throw new BadRequestException("删除定时任务失败");
}
}
@PreDestroy
private void shutdown(){
try {
log.warn("---------JobTask shutdown begin--------");
scheduler.shutdown(true);
log.warn("---------JobTask shutdown complete--------");
} catch (Exception e) {
log.error("---------JobTask shutdown error--------", e);
}
}
}

View File

@@ -43,7 +43,7 @@ public class ColumnInfoService {
};
@SneakyThrows
public <T> void exportFile(List<T> data, HttpServletResponse response, Map<String,String> customizMap) {
public <T> void exportFile(List<T> data, HttpServletResponse response,List passParam, Map<String,String> customizMap) {
if (CollectionUtils.isEmpty(data)){
throw new BindException("导出失败,没有导出数据"+data.size());
}
@@ -58,6 +58,11 @@ public class ColumnInfoService {
}
}
Map<String,String> map = this.TableColumn(tableName.value());
if (!CollectionUtils.isEmpty(passParam)){
for (Object s : passParam) {
map.remove(s);
}
}
map.putAll(customizMap);
if (CollectionUtils.isEmpty(map)){
throw new BindException("导出失败,表结构信息失败"+tableName.value());

View File

@@ -22,7 +22,7 @@ spring:
druid:
db-type: com.alibaba.druid.pool.DruidDataSource
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.46.5}:${DB_PORT:3306}/${DB_NAME:hl_one_mes}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.46.5}:${DB_PORT:3306}/${DB_NAME:hl_one_lms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
# url: jdbc:log4jdbc:mysql://${DB_HOST:localhost}:${DB_PORT:3306}/${DB_NAME:hl_one_mes}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
username: ${DB_USER:root}
# password: ${DB_PWD:123456}
@@ -199,4 +199,4 @@ sa-token:
# - redis://127.0.0.1:6379
es:
index: mes_log
schedulerFile: C:\mes\scheduler.xml
schedulerFile: C:\lms\scheduler.xml

View File

@@ -34,7 +34,7 @@ export default {
},
data() {
return {
title: '海亮mes系统',
title: '海亮lms系统',
logo: Logo,
title_param: 'platform'
}

View File

@@ -2,7 +2,7 @@
<div class="login" :style="'background-image:url('+ Background +');'">
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" label-position="left" label-width="0px" class="login-form">
<h3 class="title">
海亮mes系统
海亮LMS系统
</h3>
<el-form-item prop="username">
<el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">

View File

@@ -101,6 +101,29 @@
<el-button type="primary" @click="materiValueSubmit()">确认</el-button>
</div>
</el-dialog>
<el-dialog
:close-on-click-modal="false"
:visible.sync="pointMVisible"
title="载具信息"
width="540px"
@close="materiValueCancel()"
>
<el-form ref="form" :model="updateForm" :rules="rules" size="mini" label-width="110px">
<el-form-item label="载具编号" prop="material_code">
<template slot-scope="scope">
<el-input v-model="updateForm.storagevehicle_code" clearable>
</el-input>
</template>
</el-form-item>
<el-form-item label="载具重量(kg)" prop="vehicle_weight">
<el-input-number v-model="updateForm.vehicle_weight" clearable style="width: 370px;" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="materiValueCancel()">取消</el-button>
<el-button type="primary" @click="pointMateriSubmit()">确认</el-button>
</div>
</el-dialog>
<el-dialog
:before-close="crud.cancelCU"
@@ -167,6 +190,7 @@
</template>
</el-table-column>
<el-table-column prop="storagevehicle_name" label="载具名称" />
<el-table-column prop="vehicle_weight" label="载具单重(g)" />
<el-table-column label="是否启用" align="center" prop="is_used">
<template slot-scope="scope">
<el-switch
@@ -182,15 +206,18 @@
<el-table-column
v-permission="['admin','storagevehicleinfo:edit','storagevehicleinfo:del']"
label="操作"
width="100px"
width="200px"
align="center"
fixed="right"
>
<template slot-scope="scope">
<el-button icon="el-icon-position" type="text" class="filter-item" size="mini" @click="updateweight(scope.row)">修改</el-button>
<udOperation
:data="scope.row"
:permission="permission"
:is-visiable-edit="false"
class="filter-item"
/>
</template>
</el-table-column>
@@ -274,6 +301,8 @@ export default {
}
}
return {
updateForm: {},
pointMVisible: false,
materType:'',
materialShow: false,
dialogVisible: false,
@@ -329,17 +358,17 @@ export default {
this.materialForm.material_spec = row.material_spec
},
materiValueCancel(){
this.materialForm = {}
this.dialogVisible = false
this.updateForm = {}
this.pointMVisible = false
},
materiValueSubmit(){
console.log(this.materialForm)
crudStoragevehicleinfo.updateVehicleMaterial(this.materialForm).then(res => {
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.materiValueCancel()
}).catch(() => {
})
console.log(this.updateForm)
// crudStoragevehicleinfo.updateVehicleMaterial(this.materialForm).then(res => {
// this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
// this.materiValueCancel()
// }).catch(() => {
//
// })
},
hand(value) {
this.crud.toQuery()
@@ -392,6 +421,19 @@ export default {
this.materialForm = data
})
},
updateweight(row){
this.pointMVisible = true
this.updateForm = row
},
pointMateriSubmit(){
console.log(this.updateForm)
crudStoragevehicleinfo.edit(this.updateForm).then(res => {
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
})
this.updateForm = {}
this.pointMVisible = false
this.crud.refresh()
},
addAndprint() {
const data = this.form
if (!this.form.storagevehicle_type) {

View File

@@ -90,6 +90,23 @@
<el-input-number v-model="materialForm.qty" style="width: 200px;" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-if="materialForm.is_emptyvehicle==false" label="入库类型">
<el-select
clearable
v-model="materialForm.bill_type"
placeholder=""
style="width: 200px"
>
<el-option
v-for="item in dict.ST_INV_BCP_IN_TYPE"
:key="item.id"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
@@ -386,7 +403,7 @@ const defaultForm = {
}
export default {
name: 'Structattr',
dicts: ['ST_HEIGHT_TYPE', 'd_lock_type', 'SCH_TASK_TYPE_DTL'],
dicts: ['ST_HEIGHT_TYPE', 'd_lock_type', 'SCH_TASK_TYPE_DTL','ST_INV_BCP_IN_TYPE'],
components: { pagination, crudOperation, rrOperation, udOperation, MaterDtl },
mixins: [presenter(), header(), form(defaultForm), crud()],
cruds() {

View File

@@ -11,7 +11,7 @@
<span slot="title" class="dialog-footer">
<div class="crud-opts2">
<span class="el-dialog__title2">库单任务操作</span>
<span class="el-dialog__title2">库单任务操作</span>
<span class="crud-opts-right2">
<!--左侧插槽-->
<slot name="left" />
@@ -20,7 +20,7 @@
</div>
</span>
<div class="crud-opts2">
<span class="role-span">库单据明细项</span>
<span class="role-span">库单据明细项</span>
</div>
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
<!--表格渲染-->
@@ -54,7 +54,7 @@
</el-form>
</el-card>-->
<div class="crud-opts2">
<span class="role-span">库单据任务项</span>
<span class="role-span">库单据任务项</span>
<span class="crud-opts-right2">
<!--左侧插槽-->
<slot name="left" />

View File

@@ -92,8 +92,10 @@
<el-table-column show-overflow-tooltip min-width="120" prop="material_code" label="物料编码" />
<el-table-column show-overflow-tooltip min-width="120" prop="material_name" label="物料名称" />
<el-table-column show-overflow-tooltip min-width="120" prop="material_spec" label="物料规格" />
<el-table-column show-overflow-tooltip min-width="120" prop="unit_weight" label="物料单重(g)" />
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="载具号" />
<el-table-column show-overflow-tooltip prop="canuse_qty" label="可用重量(g)" :formatter="crud.formatNum3" />
<el-table-column show-overflow-tooltip min-width="120" prop="vehicle_weight" label="载具单重(g)" />
<el-table-column show-overflow-tooltip min-width="120" prop="canuse_qty" label="可用重量(g)" :formatter="crud.formatNum3" />
<!-- <el-table-column show-overflow-tooltip prop="unit_name" label="单位" />-->
<el-table-column show-overflow-tooltip prop="instorage_time" label="入库时间" min-width="150" />
</el-table>