Merge branch 'master' of http://121.40.234.130:8899/root/hl_one
This commit is contained in:
@@ -28,11 +28,11 @@ public enum TASKEnum implements FunctionStrategy<String, JSONObject> {
|
||||
}),
|
||||
CHECK_TASK(type -> AcsTaskEnum.TASK_STRUCT_CHECK.getCode().equals(type), form -> {
|
||||
IStIvtCheckmstYlService bean = SpringContextHolder.getBean(IStIvtCheckmstYlService.class);
|
||||
bean.confirm(form);
|
||||
bean.taskOperate(form);
|
||||
}),
|
||||
SHUT_TASK(type -> AcsTaskEnum.TASK_STRUCT_SHUT.getCode().equals(type), form -> {
|
||||
IStIvtShutframeinvBcpService bean = SpringContextHolder.getBean(IStIvtShutframeinvBcpService.class);
|
||||
bean.confirm(form);
|
||||
bean.taskOperate(form);
|
||||
}),
|
||||
CP_IN_TASK(type -> AcsTaskEnum.TASK_STRUCT_CP_IN.getCode().equals(type), form -> {
|
||||
IStIvtIostorinvCpService bean = SpringContextHolder.getBean(IStIvtIostorinvCpService.class);
|
||||
|
||||
@@ -48,4 +48,8 @@ public interface IStIvtCheckmstBcpService extends IService<StIvtCheckmstBcp> {
|
||||
void process0(JSONObject jo);
|
||||
|
||||
void process1(JSONObject jo);
|
||||
|
||||
void issueTask(JSONObject jo);
|
||||
|
||||
void taskOperate(JSONObject jo);
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ public class StIvtCheckdtlBcp implements Serializable {
|
||||
/**
|
||||
* 是否已下发
|
||||
*/
|
||||
private Boolean is_down;
|
||||
private String is_down;
|
||||
|
||||
/**
|
||||
* 盘点数量
|
||||
@@ -154,5 +154,7 @@ public class StIvtCheckdtlBcp implements Serializable {
|
||||
*/
|
||||
private String process_time;
|
||||
|
||||
private String task_id;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -14,6 +14,9 @@ import io.jsonwebtoken.lang.Assert;
|
||||
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.publish.BussEventMulticaster;
|
||||
import org.nl.common.publish.event.PointEvent;
|
||||
import org.nl.common.utils.IdUtil;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
@@ -32,14 +35,19 @@ import org.nl.wms.storage_manage.semimanage.service.check.IStIvtCheckdtlBcpServi
|
||||
import org.nl.wms.storage_manage.semimanage.service.check.IStIvtCheckmstBcpService;
|
||||
import org.nl.wms.storage_manage.semimanage.service.check.dao.StIvtCheckmstBcp;
|
||||
import org.nl.wms.storage_manage.semimanage.service.check.dao.mapper.StIvtCheckmstBcpMapper;
|
||||
import org.nl.wms.storage_manage.semimanage.service.iostorInv.dao.StIvtIostorinvBcp;
|
||||
import org.nl.wms.storage_manage.semimanage.service.moveOrLess.IStIvtMoreorlessmstBcpService;
|
||||
import org.nl.wms.storage_manage.semimanage.service.shutFrame.dao.StIvtShutframedtlBcp;
|
||||
import org.nl.wms.storage_manage.semimanage.service.shutFrame.dao.StIvtShutframeinvBcp;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -220,6 +228,7 @@ public class StIvtCheckmstBcpServiceImpl extends ServiceImpl<StIvtCheckmstBcpMap
|
||||
this.updateById(jo_mst);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void process0(JSONObject whereJson) {
|
||||
JSONObject form = whereJson.getJSONObject("form");
|
||||
@@ -254,6 +263,67 @@ public class StIvtCheckmstBcpServiceImpl extends ServiceImpl<StIvtCheckmstBcpMap
|
||||
this.updateById(jo_mst);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void issueTask(JSONObject form) {
|
||||
Assert.notNull(new Object[]{form, form.get("checkdtl_id")}, "请求参数不能为空");
|
||||
|
||||
//查询可用的半成品移出点位
|
||||
String point_code = "PD01";
|
||||
StIvtCheckdtlBcp dtl = checkdtlBcpService.getById(form.getString("checkdtl_id"));
|
||||
|
||||
StIvtCheckmstBcp mst = this.getById(dtl.getCheck_id());
|
||||
|
||||
StIvtStructattr struct = structattrService.getOne(new QueryWrapper<StIvtStructattr>().eq("struct_id", dtl.getStruct_id()));
|
||||
|
||||
PointEvent event = PointEvent.builder()
|
||||
.type(AcsTaskEnum.TASK_STRUCT_SHUT.getCode())
|
||||
.point_code1(struct.getStruct_code())
|
||||
.point_code2(point_code)
|
||||
.vehicle_code(dtl.getStoragevehicle_code())
|
||||
.product_area(mst.getWorkshop_id())
|
||||
.callback((Consumer<String>) task_id -> dtl.setTask_id(task_id))
|
||||
.build();
|
||||
|
||||
BussEventMulticaster.Publish(event);
|
||||
|
||||
checkdtlBcpService.update(new UpdateWrapper<StIvtCheckdtlBcp>()
|
||||
.set("is_down", "1")
|
||||
.set("checkpoint_id", point_code)
|
||||
.set("status", CHECKEnum.DTL_STATUS.code("盘点中"))
|
||||
.eq("struct_id", dtl.getStruct_id())
|
||||
.eq("check_id", dtl.getCheck_id()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void taskOperate(JSONObject form) {
|
||||
String task_id = form.getString("task_id");
|
||||
String status = form.getString("status");
|
||||
StIvtCheckdtlBcp dtl = new StIvtCheckdtlBcp();
|
||||
if (status.equals(AcsTaskEnum.STATUS_FINISH.getCode()) && dtl.getIs_down().equals("2")) {
|
||||
checkdtlBcpService.update(new UpdateWrapper<StIvtCheckdtlBcp>()
|
||||
.set("status", CHECKEnum.DTL_STATUS.code("完成"))
|
||||
.eq("struct_id", dtl.getStruct_id())
|
||||
.eq("check_id", dtl.getCheck_id()));
|
||||
//判断是否存在未完成的明细
|
||||
List<StIvtCheckdtlBcp> list = checkdtlBcpService.list(new QueryWrapper<StIvtCheckdtlBcp>().eq("check_id", dtl.getCheck_id())
|
||||
.ne("status", CHECKEnum.DTL_STATUS.code("完成")));
|
||||
if (list.size() == 0) {
|
||||
StIvtCheckmstBcp jo_mst = this.getOne(new QueryWrapper<StIvtCheckmstBcp>().eq("check_id", dtl.getCheck_id()));
|
||||
jo_mst.setStatus(CHECKEnum.BILL_STATUS.code("完成"));
|
||||
jo_mst.setConfirm_optid(SecurityUtils.getCurrentUserId());
|
||||
jo_mst.setConfirm_optname(SecurityUtils.getCurrentNickName());
|
||||
jo_mst.setConfirm_time(DateUtil.now());
|
||||
//解锁起点点位、仓位
|
||||
List<StIvtCheckdtlBcp> finish_list = checkdtlBcpService.list(new QueryWrapper<StIvtCheckdtlBcp>().eq("check_id", dtl.getCheck_id())
|
||||
.eq("status", CHECKEnum.DTL_STATUS.code("完成")));
|
||||
finish_list.stream()
|
||||
.map(finish -> finish.getStruct_id())
|
||||
.distinct()
|
||||
.forEach(struct_id -> structattrService.update(new UpdateWrapper<StIvtStructattr>().set("inv_code", "").set("lock_type", "0").eq("struct_id", struct_id)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void process1(JSONObject whereJson) {
|
||||
JSONObject form = whereJson.getJSONObject("form");
|
||||
|
||||
@@ -106,10 +106,33 @@ public class StIvtShutframeinvBcpServiceImpl extends ServiceImpl<StIvtShutframei
|
||||
StIvtShutframedtlBcp dtl = list.get(0);
|
||||
|
||||
String work_status = dtl.getWork_status();
|
||||
if (all_finish){
|
||||
|
||||
}else {
|
||||
|
||||
if (status.equals(AcsTaskEnum.STATUS_START.getCode())) {
|
||||
if (work_status.equals(SHUTEnum.WORK_STATUS.code("移出中")) || work_status.equals(SHUTEnum.WORK_STATUS.code("生成"))) {
|
||||
shutframedtlBcpService.update(new UpdateWrapper<StIvtShutframedtlBcp>()
|
||||
.eq("task_id", task.getTask_group_id())
|
||||
.set("work_status", SHUTEnum.WORK_STATUS.code("移出中")));
|
||||
}
|
||||
if (work_status.equals(SHUTEnum.WORK_STATUS.code("移出确认")) || work_status.equals(SHUTEnum.WORK_STATUS.code("移回中"))) {
|
||||
shutframedtlBcpService.update(new UpdateWrapper<StIvtShutframedtlBcp>()
|
||||
.eq("task_id", task.getTask_group_id())
|
||||
.set("work_status", SHUTEnum.WORK_STATUS.code("移回中")));
|
||||
}
|
||||
}
|
||||
if (status.equals(AcsTaskEnum.STATUS_FINISH.getCode()) && all_finish) {
|
||||
if (work_status.equals(SHUTEnum.WORK_STATUS.code("移出中"))) {
|
||||
shutframedtlBcpService.update(new UpdateWrapper<StIvtShutframedtlBcp>()
|
||||
.eq("task_id", task.getTask_group_id())
|
||||
.set("work_status", SHUTEnum.WORK_STATUS.code("移出确认")));
|
||||
}
|
||||
if (work_status.equals(SHUTEnum.WORK_STATUS.code("移回中"))) {
|
||||
shutframedtlBcpService.update(new UpdateWrapper<StIvtShutframedtlBcp>()
|
||||
.eq("task_id", task.getTask_group_id())
|
||||
.set("work_status", SHUTEnum.WORK_STATUS.code("完成")));
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("shutframeinv_id", dtl.getShutframeinv_id());
|
||||
this.confirm(jo);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -84,6 +84,17 @@
|
||||
>
|
||||
新增一行
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
:disabled="add_flag"
|
||||
@click="issueTask"
|
||||
>
|
||||
下发任务
|
||||
</el-button>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
@@ -370,6 +381,13 @@ export default {
|
||||
this.dialogVisible = false
|
||||
})
|
||||
},
|
||||
issueTask(){
|
||||
if (this.nowrow === null) {
|
||||
this.crud.notify('请先选中一条已存在的库存明细!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
check.issueTask(this.nowrow)
|
||||
},
|
||||
saveCheck() {
|
||||
if (this.tableData.length === 0) {
|
||||
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
|
||||
@@ -85,7 +85,6 @@ import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import DateRangePicker from '@/components/DateRangePicker/index'
|
||||
import crudProductIn from '@/views/wms/storage_manage/rawproduct/rawProductIn/rawproductin'
|
||||
|
||||
const start = new Date()
|
||||
export default {
|
||||
|
||||
@@ -111,6 +111,14 @@ export function process1(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export function issueTask(data) {
|
||||
return request({
|
||||
url: '/api/bcp/check/issueTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default {
|
||||
add,
|
||||
edit,
|
||||
@@ -122,6 +130,7 @@ export default {
|
||||
getInvTypes,
|
||||
saveCheck,
|
||||
process0,
|
||||
issueTask,
|
||||
getOutBillDis,
|
||||
process1
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
<rrOperation/>
|
||||
</el-form>
|
||||
|
||||
</div>
|
||||
@@ -154,19 +154,19 @@
|
||||
@select="handleSelectionChange"
|
||||
@select-all="onSelectAll"
|
||||
>
|
||||
<el-table-column :selectable="checkboxT" type="selection" width="55" />
|
||||
<el-table-column :selectable="checkboxT" type="selection" width="55"/>
|
||||
<el-table-column prop="bill_code" min-width="140" label="订单编码">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="crud.toView(scope.row)">{{ scope.row.bill_code }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :formatter="stateFormat" min-width="100" prop="bill_status" label="单据状态" />
|
||||
<el-table-column prop="stor_name" label="仓库" min-width="100" />
|
||||
<el-table-column prop="bill_type" :formatter="bill_typeFormat" min-width="100" label="业务类型" />
|
||||
<el-table-column min-width="135" prop="biz_date" label="业务日期" />
|
||||
<el-table-column :formatter="create_modeFormat" prop="create_mode" label="生成方式" min-width="100" />
|
||||
<el-table-column label="制单人" align="center" prop="create_name" min-width="100" />
|
||||
<el-table-column prop="create_time" min-width="135" label="制单时间" />
|
||||
<el-table-column :formatter="stateFormat" min-width="100" prop="bill_status" label="单据状态"/>
|
||||
<el-table-column prop="stor_name" label="仓库" min-width="100"/>
|
||||
<el-table-column prop="bill_type" :formatter="bill_typeFormat" min-width="100" label="业务类型"/>
|
||||
<el-table-column min-width="135" prop="biz_date" label="业务日期"/>
|
||||
<el-table-column :formatter="create_modeFormat" prop="create_mode" label="生成方式" min-width="100"/>
|
||||
<el-table-column label="制单人" align="center" prop="create_name" min-width="100"/>
|
||||
<el-table-column prop="create_time" min-width="135" label="制单时间"/>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
width="160"
|
||||
@@ -184,15 +184,15 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
<pagination/>
|
||||
</div>
|
||||
<AddDialog @AddChanged="querytable" />
|
||||
<AddDialog @AddChanged="querytable"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import shutframe from '@/views/wms/storage_manage/semiproduct/semiproductShutFrame/shutframe'
|
||||
import CRUD, { crud, header, presenter } from '@crud/crud'
|
||||
import CRUD, {crud, header, presenter} from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
@@ -202,21 +202,23 @@ import crudStorattr from '@/views/wms/storage_manage/basedata/basedata'
|
||||
|
||||
export default {
|
||||
name: 'ShutFrame',
|
||||
components: { AddDialog, crudOperation, rrOperation, udOperation, pagination },
|
||||
components: {AddDialog, crudOperation, rrOperation, udOperation, pagination},
|
||||
cruds() {
|
||||
return CRUD({ title: '拼盘',
|
||||
return CRUD({
|
||||
title: '拼盘',
|
||||
props: {
|
||||
// 每页数据条数
|
||||
size: 20
|
||||
},
|
||||
idField: 'shutframeinv_id', url: 'api/shutframe', crudMethod: { ...shutframe },
|
||||
idField: 'shutframeinv_id', url: 'api/shutframe', crudMethod: {...shutframe},
|
||||
optShow: {
|
||||
add: true,
|
||||
edit: false,
|
||||
del: false,
|
||||
reset: true,
|
||||
download: false
|
||||
}})
|
||||
}
|
||||
})
|
||||
},
|
||||
mixins: [presenter(), header(), crud()],
|
||||
// 数据字典
|
||||
@@ -230,14 +232,14 @@ export default {
|
||||
storlist: []
|
||||
}
|
||||
},
|
||||
mounted: function() {
|
||||
mounted: function () {
|
||||
const that = this
|
||||
window.onresize = function temp() {
|
||||
that.height = document.documentElement.clientHeight - 180 + 'px;'
|
||||
}
|
||||
},
|
||||
created() {
|
||||
crudStorattr.getStor({ 'stor_type': '2' }).then(res => {
|
||||
crudStorattr.getStor({'stor_type': '2'}).then(res => {
|
||||
this.storlist = res.content
|
||||
})
|
||||
},
|
||||
@@ -290,12 +292,12 @@ export default {
|
||||
}
|
||||
},
|
||||
taskOpen() {
|
||||
shutframe.handdown({ 'shutframeinv_id': this.currentRow.shutframeinv_id }).then(res => {
|
||||
shutframe.issueTask({'shutframeinv_id': this.currentRow.shutframeinv_id}).then(res => {
|
||||
this.querytable()
|
||||
})
|
||||
},
|
||||
confirm() {
|
||||
shutframe.confirm({ 'shutframeinv_id': this.currentRow.shutframeinv_id }).then(res => {
|
||||
shutframe.confirm({'shutframeinv_id': this.currentRow.shutframeinv_id}).then(res => {
|
||||
this.querytable()
|
||||
})
|
||||
},
|
||||
|
||||
@@ -131,6 +131,6 @@ export default {
|
||||
confirm,
|
||||
getInvTypes,
|
||||
getOutBillDtl2,
|
||||
getStructIvt2,
|
||||
issueTask,
|
||||
getStruct
|
||||
}
|
||||
|
||||
@@ -82,7 +82,6 @@ import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import DateRangePicker from '@/components/DateRangePicker/index'
|
||||
import crudProductIn from '@/views/wms/storage_manage/rawproduct/rawProductIn/rawproductin'
|
||||
|
||||
const start = new Date()
|
||||
export default {
|
||||
|
||||
Reference in New Issue
Block a user