add:半成品库添加入库类型
This commit is contained in:
@@ -30,6 +30,7 @@ import org.nl.wms.masterdata_manage.service.material.IMdMeMaterialbaseService;
|
|||||||
import org.nl.wms.masterdata_manage.service.material.dao.MdMeMaterialbase;
|
import org.nl.wms.masterdata_manage.service.material.dao.MdMeMaterialbase;
|
||||||
import org.nl.wms.product_manage.service.device.IPdmBiDeviceService;
|
import org.nl.wms.product_manage.service.device.IPdmBiDeviceService;
|
||||||
import org.nl.wms.product_manage.service.device.dao.PdmBiDevice;
|
import org.nl.wms.product_manage.service.device.dao.PdmBiDevice;
|
||||||
|
import org.nl.wms.scheduler_manage.service.extendtask.manage.TaskStatusEnum;
|
||||||
import org.nl.wms.scheduler_manage.service.extendtask.wash.WashMachineryTask;
|
import org.nl.wms.scheduler_manage.service.extendtask.wash.WashMachineryTask;
|
||||||
import org.nl.wms.scheduler_manage.service.extendtask.wash.WashSendMaterialQZTask;
|
import org.nl.wms.scheduler_manage.service.extendtask.wash.WashSendMaterialQZTask;
|
||||||
import org.nl.wms.scheduler_manage.service.extendtask.wash.WashSendMaterialTask;
|
import org.nl.wms.scheduler_manage.service.extendtask.wash.WashSendMaterialTask;
|
||||||
@@ -191,8 +192,12 @@ public class PdaWashController {
|
|||||||
SchBaseTask lastTask = taskService.getOne(new QueryWrapper<SchBaseTask>()
|
SchBaseTask lastTask = taskService.getOne(new QueryWrapper<SchBaseTask>()
|
||||||
.eq("task_type", AcsTaskEnum.TASK_WASH_SEND_MATERIAL.getCode()).orderByDesc("task_code").last("limit 1"));
|
.eq("task_type", AcsTaskEnum.TASK_WASH_SEND_MATERIAL.getCode()).orderByDesc("task_code").last("limit 1"));
|
||||||
if (lastTask!=null){
|
if (lastTask!=null){
|
||||||
if (DateUtil.between(new Date(), lastTask.getCreate_time(), DateUnit.MINUTE)<Integer.valueOf(limit_time.getValue())){
|
if (!lastTask.getTask_status().equals(TaskStatusEnum.FINISHED.getCode())&&!lastTask.getTask_status().equals(TaskStatusEnum.CANCEL.getCode())){
|
||||||
throw new BadRequestException("清洗上料任务间隔不小于"+limit_time.getValue()+"分钟,任务:"+lastTask.getTask_code());
|
throw new BadRequestException("上个任务未完成,任务:"+lastTask.getTask_code());
|
||||||
|
}else {
|
||||||
|
if (DateUtil.between(new Date(), lastTask.getUpdate_time(), DateUnit.MINUTE)<Integer.valueOf(limit_time.getValue())){
|
||||||
|
throw new BadRequestException("清洗上料任务完成到开始间隔不小于"+limit_time.getValue()+"分钟,任务:"+lastTask.getTask_code()+"完成时间:"+DateUtil.date(lastTask.getUpdate_time()).toString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -264,7 +269,10 @@ public class PdaWashController {
|
|||||||
@SaIgnore
|
@SaIgnore
|
||||||
public ResponseEntity<Object> washTasks(@RequestBody JSONObject query) {
|
public ResponseEntity<Object> washTasks(@RequestBody JSONObject query) {
|
||||||
List<Map<String, Object>> taskMap = taskService.listMaps(new QueryWrapper<SchBaseTask>()
|
List<Map<String, Object>> taskMap = taskService.listMaps(new QueryWrapper<SchBaseTask>()
|
||||||
.eq("task_status", StatusEnum.TASK_FINISH.getCode()).eq("task_step", 2).orderByAsc("task_code"));
|
.eq("task_status", StatusEnum.TASK_FINISH.getCode())
|
||||||
|
.eq("task_type",AcsTaskEnum.TASK_WASH_SEND_MATERIAL.getCode())
|
||||||
|
.eq("task_step", 2)
|
||||||
|
.orderByAsc("task_code"));
|
||||||
if (!CollectionUtils.isEmpty(taskMap)){
|
if (!CollectionUtils.isEmpty(taskMap)){
|
||||||
Set materials = taskMap.stream().map(a->a.get("material_id")).collect(Collectors.toSet());
|
Set materials = taskMap.stream().map(a->a.get("material_id")).collect(Collectors.toSet());
|
||||||
Map<String, MdMeMaterialbase> materialMap = materialbaseService.list(new QueryWrapper<MdMeMaterialbase>()
|
Map<String, MdMeMaterialbase> materialMap = materialbaseService.list(new QueryWrapper<MdMeMaterialbase>()
|
||||||
@@ -277,7 +285,7 @@ public class PdaWashController {
|
|||||||
task.put("material_code",materialbase!=null?materialbase.getMaterial_code():"");
|
task.put("material_code",materialbase!=null?materialbase.getMaterial_code():"");
|
||||||
task.put("material_spec",materialbase!=null?materialbase.getMaterial_spec():"");
|
task.put("material_spec",materialbase!=null?materialbase.getMaterial_spec():"");
|
||||||
task.put("net_weight",materialbase!=null?materialbase.getNet_weight():"");
|
task.put("net_weight",materialbase!=null?materialbase.getNet_weight():"");
|
||||||
task.put("create_time",task.get("create_time").toString());
|
task.put("create_time",task.get("update_time").toString());
|
||||||
task.put("sep_on",i);
|
task.put("sep_on",i);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ public class PdaStBcpInController {
|
|||||||
@PostMapping("/callVehicle")
|
@PostMapping("/callVehicle")
|
||||||
@Log("呼叫空载具")
|
@Log("呼叫空载具")
|
||||||
//("呼叫空载具")
|
//("呼叫空载具")
|
||||||
public ResponseEntity<Object> callVehicle(JSONObject param) {
|
public ResponseEntity<Object> callVehicle(@RequestBody JSONObject param) {
|
||||||
pdaStBcpInService.callVehicle(param.getString("point"));
|
pdaStBcpInService.callVehicle(param.getString("point"));
|
||||||
return new ResponseEntity<>(TableDataInfo.build(), HttpStatus.OK);
|
return new ResponseEntity<>(TableDataInfo.build(), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -157,11 +157,13 @@ public class PdaStBcpInServiceImpl implements PdaStBcpInService {
|
|||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public JSONObject callVehicle(String pointCode3) {
|
public JSONObject callVehicle(String pointCode3) {
|
||||||
if (StringUtils.isEmpty(pointCode3)){
|
if (pointCode3 == null){
|
||||||
throw new BadRequestException("请求参数不能为空");
|
pointCode3 = "A1_BCPRKW_SD";
|
||||||
}
|
}
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
result.put("message", "下发失败");
|
result.put("message", "下发失败");
|
||||||
|
String finalPointCode = pointCode3;
|
||||||
|
String finalPointCode1 = pointCode3;
|
||||||
RedissonUtils.lock(() -> {
|
RedissonUtils.lock(() -> {
|
||||||
|
|
||||||
// 2.判断此入库点是否有正在执行的任务
|
// 2.判断此入库点是否有正在执行的任务
|
||||||
@@ -169,9 +171,9 @@ public class PdaStBcpInServiceImpl implements PdaStBcpInService {
|
|||||||
new QueryWrapper<SchBaseTask>().lambda()
|
new QueryWrapper<SchBaseTask>().lambda()
|
||||||
.eq(SchBaseTask::getIs_delete, false)
|
.eq(SchBaseTask::getIs_delete, false)
|
||||||
.lt(SchBaseTask::getTask_status, TaskStatusEnum.FINISHED.getCode())
|
.lt(SchBaseTask::getTask_status, TaskStatusEnum.FINISHED.getCode())
|
||||||
.and(qr -> qr.eq(SchBaseTask::getPoint_code1, pointCode3)
|
.and(qr -> qr.eq(SchBaseTask::getPoint_code1, finalPointCode)
|
||||||
.or()
|
.or()
|
||||||
.eq(SchBaseTask::getPoint_code3, pointCode3)
|
.eq(SchBaseTask::getPoint_code3, finalPointCode)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
if (ObjectUtil.isNotEmpty(taskList)) {
|
if (ObjectUtil.isNotEmpty(taskList)) {
|
||||||
@@ -196,7 +198,7 @@ public class PdaStBcpInServiceImpl implements PdaStBcpInService {
|
|||||||
.acs_task_type("7")
|
.acs_task_type("7")
|
||||||
.task_group_id(IdUtil.getStringId())
|
.task_group_id(IdUtil.getStringId())
|
||||||
.point_code1(attrDao.getStruct_code())
|
.point_code1(attrDao.getStruct_code())
|
||||||
.point_code3(pointCode3)
|
.point_code3(finalPointCode1)
|
||||||
.vehicle_code(attrDao.getStoragevehicle_code())
|
.vehicle_code(attrDao.getStoragevehicle_code())
|
||||||
.product_area("A1") // 暂时写死
|
.product_area("A1") // 暂时写死
|
||||||
.build();
|
.build();
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ package org.nl.wms.storage_manage.semimanage.controller.structLvt;
|
|||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.nl.common.anno.Log;
|
import org.nl.common.anno.Log;
|
||||||
import org.nl.common.domain.query.PageQuery;
|
import org.nl.common.domain.query.PageQuery;
|
||||||
@@ -77,6 +78,11 @@ public class StIvtStructivtBcpController {
|
|||||||
@Log("半成品库存导出")
|
@Log("半成品库存导出")
|
||||||
//("半成品库存查询")
|
//("半成品库存查询")
|
||||||
public ResponseEntity<Object> download(StructIvtBcpQuery query, PageQuery page, HttpServletResponse response) {
|
public ResponseEntity<Object> download(StructIvtBcpQuery query, PageQuery page, HttpServletResponse response) {
|
||||||
|
String[] createTime = query.getCreateTime();
|
||||||
|
if (createTime!=null && createTime.length==2){
|
||||||
|
query.setStart_time(createTime[0]);
|
||||||
|
query.setEnd_time(createTime[1]);
|
||||||
|
}
|
||||||
List<Map> maps = bcpService.queryAll(query);
|
List<Map> maps = bcpService.queryAll(query);
|
||||||
columnInfoService.exportFile("st_ivt_structivt_bcp",maps,response,
|
columnInfoService.exportFile("st_ivt_structivt_bcp",maps,response,
|
||||||
ListOf.of("struct_code","bill_type","unit_weight","is_pick","ivt_level","is_active","qty_unit_id","stor_id","ivt_level","struct_id","material_id","quality_scode","canuse_qty"),
|
ListOf.of("struct_code","bill_type","unit_weight","is_pick","ivt_level","is_active","qty_unit_id","stor_id","ivt_level","struct_id","material_id","quality_scode","canuse_qty"),
|
||||||
|
|||||||
@@ -170,6 +170,9 @@
|
|||||||
<if test="query.start_time!= null and query.start_time != ''">
|
<if test="query.start_time!= null and query.start_time != ''">
|
||||||
and ivt.instorage_time >= #{query.start_time}
|
and ivt.instorage_time >= #{query.start_time}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="query.bill_type!= null and query.bill_type != ''">
|
||||||
|
and ivt.bill_type = #{query.bill_type}
|
||||||
|
</if>
|
||||||
<if test="query.end_time!= null and query.end_time != ''">
|
<if test="query.end_time!= null and query.end_time != ''">
|
||||||
and ivt.instorage_time <= #{query.end_time}
|
and ivt.instorage_time <= #{query.end_time}
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
@@ -26,6 +26,10 @@ public class StructIvtBcpQuery extends BaseQuery<StIvtStructivtBcp> {
|
|||||||
|
|
||||||
private String is_lock;
|
private String is_lock;
|
||||||
|
|
||||||
|
private String bill_type;
|
||||||
|
|
||||||
|
private String[] createTime;
|
||||||
|
|
||||||
private Boolean is_delete = false;
|
private Boolean is_delete = false;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -61,6 +61,23 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="入库类型">
|
||||||
|
<el-select
|
||||||
|
v-model="query.bill_type"
|
||||||
|
style="width: 210px"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="入库类型"
|
||||||
|
class="filter-item"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.ST_INV_BCP_IN_TYPE"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<rrOperation />
|
<rrOperation />
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
@@ -88,14 +105,15 @@
|
|||||||
<el-table-column show-overflow-tooltip prop="sect_name" label="库区名称" />
|
<el-table-column show-overflow-tooltip prop="sect_name" label="库区名称" />
|
||||||
<el-table-column show-overflow-tooltip prop="struct_code" label="仓位编码" />
|
<el-table-column show-overflow-tooltip prop="struct_code" label="仓位编码" />
|
||||||
<el-table-column show-overflow-tooltip prop="struct_name" label="仓位名称" />
|
<el-table-column show-overflow-tooltip prop="struct_name" label="仓位名称" />
|
||||||
<el-table-column show-overflow-tooltip prop="bill_type" label="单据类型" :formatter="formatBillType" />
|
<el-table-column show-overflow-tooltip prop="bill_type" label="入库类型" :formatter="formatBillType" />
|
||||||
<el-table-column show-overflow-tooltip min-width="120" prop="material_code" label="物料编码" />
|
<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_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="material_spec" label="物料规格" />
|
||||||
<el-table-column show-overflow-tooltip min-width="120" prop="unit_weight" label="物料单重(g)" />
|
<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="storagevehicle_code" label="载具号" />
|
||||||
<el-table-column show-overflow-tooltip min-width="120" prop="vehicle_weight" label="载具单重(g)" />
|
<el-table-column show-overflow-tooltip min-width="120" prop="vehicle_weight2" label="载具单重(kg)" />
|
||||||
<el-table-column show-overflow-tooltip min-width="120" prop="canuse_qty" label="可用重量(g)" />
|
<el-table-column show-overflow-tooltip min-width="120" prop="canuse_qty2" label="可用重量(kg)" />
|
||||||
|
<el-table-column show-overflow-tooltip min-width="120" prop="m_qty" label="可用数量" />
|
||||||
<!-- <el-table-column show-overflow-tooltip prop="unit_name" label="单位" />-->
|
<!-- <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-column show-overflow-tooltip prop="instorage_time" label="入库时间" min-width="150" />
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|||||||
Reference in New Issue
Block a user