Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -36,6 +36,8 @@ public enum IOSEnum {
|
||||
ORDER_STATUS(MapOf.of("生成", "10", "提交", "20", "发货中", "30", "确认", "99")),
|
||||
//锁定类型
|
||||
LOCK_TYPE(MapOf.of("未锁定", "0", "入库锁", "1", "出库锁", "2","盘点锁", "3","损溢锁", "4","拼盘锁","5","其他锁","99")),
|
||||
// 海柔半成品出库类型
|
||||
BILL_TYPE_HR(MapOf.of("生产出库", "1001", "盘点出库", "1002", "手工出库", "1009")),
|
||||
;
|
||||
private Map<String, String> code;
|
||||
|
||||
|
||||
@@ -12,11 +12,13 @@ import java.util.Map;
|
||||
@Getter
|
||||
public enum PDAEnum {
|
||||
//点位区域
|
||||
REGION_CODE(MapOf.of("半成品入库区域", "A1_BCPRK01", "半成品出库区域", "A1_BCPCK01","成品入库区域", "A1_CPRK01","半成品盘点区域", "A1_BCP_PP")),
|
||||
REGION_CODE(MapOf.of("半成品入库区域", "A1_BCPRK01", "半成品出库区域", "A1_BCPCK01","成品入库区域", "A1_CPRK01","半成品盘点区域", "A1_BCP_PP","海柔半成品出库区域","A3_BCPCK01")),
|
||||
//库区编码
|
||||
SECT_CODE(MapOf.of("半成品库区", "KQ005")),
|
||||
//库区id
|
||||
SECT_ID(MapOf.of("成品库区", "1528631043496742912")),
|
||||
//仓库id
|
||||
STOR_ID(MapOf.of("紫铜三线半成品仓库", "15286279952695336963")),
|
||||
//物料类别
|
||||
MATERIAL_CLASS(MapOf.of("管件原材料", "1503644349995552768","管件半成品", "1528555443906023424","管件成品", "1528555444031852544")),
|
||||
;
|
||||
|
||||
@@ -72,5 +72,13 @@ public class StIvtCheckmstHrBcpController {
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@PostMapping("/checkOut")
|
||||
@Log("盘点出库")
|
||||
//("盘点出库")
|
||||
public ResponseEntity<Object> checkOut(@RequestBody JSONObject whereJson) {
|
||||
checkmstBcpService.checkOut(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -66,4 +66,9 @@ public interface IStIvtCheckmstHrBcpService extends IService<StIvtCheckmstHrBcp>
|
||||
*/
|
||||
void taskOperate(JSONObject jo);
|
||||
|
||||
/**
|
||||
* 盘点出库
|
||||
* @param whereJson /
|
||||
*/
|
||||
void checkOut(JSONObject whereJson);
|
||||
}
|
||||
|
||||
@@ -158,5 +158,10 @@ public class StIvtCheckdtlHrBcp implements Serializable {
|
||||
* 任务标识
|
||||
*/
|
||||
private String task_id;
|
||||
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
|
||||
@@ -25,6 +25,10 @@ import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.system.util.CodeUtil;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
import org.nl.wms.ext_manage.acs.service.WmsToAcsService;
|
||||
import org.nl.wms.masterdata_manage.service.master.IMdPbMeasureunitService;
|
||||
import org.nl.wms.masterdata_manage.service.master.dao.MdPbMeasureunit;
|
||||
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.storage.service.storage.IStIvtBsrealstorattrService;
|
||||
import org.nl.wms.masterdata_manage.storage.service.storage.IStIvtStructattrService;
|
||||
import org.nl.wms.masterdata_manage.storage.service.storage.dao.StIvtBsrealstorattr;
|
||||
@@ -37,6 +41,7 @@ import org.nl.wms.scheduler_manage.service.task.ISchBaseTaskService;
|
||||
import org.nl.wms.scheduler_manage.service.task.dao.SchBaseTask;
|
||||
import org.nl.wms.storage_manage.CHECKEnum;
|
||||
import org.nl.wms.storage_manage.IOSEnum;
|
||||
import org.nl.wms.storage_manage.IVTEnum;
|
||||
import org.nl.wms.storage_manage.pda.PDAEnum;
|
||||
import org.nl.wms.storage_manage.semimanage.service.check.dao.StIvtCheckdtlBcp;
|
||||
import org.nl.wms.storage_manage.semimanage.service.check.dao.mapper.StIvtCheckdtlBcpMapper;
|
||||
@@ -47,6 +52,7 @@ import org.nl.wms.storage_manage.semimanagehr.service.check.dao.StIvtCheckmstHrB
|
||||
import org.nl.wms.storage_manage.semimanagehr.service.check.dao.mapper.StIvtCheckdtlHrBcpMapper;
|
||||
import org.nl.wms.storage_manage.semimanagehr.service.check.dao.mapper.StIvtCheckmstHrBcpMapper;
|
||||
import org.nl.wms.storage_manage.semimanagehr.service.check.dto.CheckHrQuery;
|
||||
import org.nl.wms.storage_manage.semimanagehr.service.iostorInv.IStIvtIostorinvHrBcpOutService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -78,18 +84,21 @@ public class StIvtCheckmstHrBcpServiceImpl extends ServiceImpl<StIvtCheckmstHrBc
|
||||
@Autowired
|
||||
private IStIvtStructattrService structattrService; // 仓位服务
|
||||
|
||||
@Autowired
|
||||
private StIvtCheckdtlHrBcpMapper checkdtlBcpMapper; // 明细mapper
|
||||
|
||||
@Autowired
|
||||
private SchBasePointMapper pointMapper; // 点位服务mapper
|
||||
|
||||
@Autowired
|
||||
private ISchBasePointService iSchBasePointService; // 点位服务
|
||||
|
||||
@Autowired
|
||||
private ISchBaseTaskService iSchBaseTaskService; // 任务服务
|
||||
|
||||
@Autowired
|
||||
private IMdMeMaterialbaseService iMdMeMaterialbaseService; // 物料服务
|
||||
|
||||
@Autowired
|
||||
private IMdPbMeasureunitService iMdPbMeasureunitService; // 计量单位服务
|
||||
|
||||
@Autowired
|
||||
private IStIvtIostorinvHrBcpOutService iStIvtIostorinvHrBcpOutService; // 半成品出库服务
|
||||
|
||||
@Override
|
||||
public Object pageQuery(CheckHrQuery query, PageQuery page) {
|
||||
// 查询条件
|
||||
@@ -176,7 +185,7 @@ public class StIvtCheckmstHrBcpServiceImpl extends ServiceImpl<StIvtCheckmstHrBc
|
||||
|
||||
// 更新明细表
|
||||
dtl.setIs_down(IOSEnum.IS_USED.code("是"));
|
||||
dtl.setStatus(CHECKEnum.BILL_STATUS.code("盘点中"));
|
||||
dtl.setStatus(CHECKEnum.DTL_STATUS.code("盘点中"));
|
||||
checkdtlBcpService.updateById(dtl);
|
||||
|
||||
mst.setStatus(CHECKEnum.BILL_STATUS.code("盘点中"));
|
||||
@@ -205,7 +214,7 @@ public class StIvtCheckmstHrBcpServiceImpl extends ServiceImpl<StIvtCheckmstHrBc
|
||||
.eq(StIvtCheckdtlHrBcp::getTask_id, task_id)
|
||||
);
|
||||
|
||||
dtlDao.setStatus(CHECKEnum.BILL_STATUS.code("完成"));
|
||||
dtlDao.setStatus(CHECKEnum.DTL_STATUS.code("确认完成"));
|
||||
dtlDao.setCheck_result(CHECKEnum.CHECK_RESULT.code("正常"));
|
||||
checkdtlBcpService.updateById(dtlDao);
|
||||
|
||||
@@ -222,9 +231,85 @@ public class StIvtCheckmstHrBcpServiceImpl extends ServiceImpl<StIvtCheckmstHrBc
|
||||
.eq(SchBaseTask::getTask_id,task_id )
|
||||
);
|
||||
|
||||
// 更新明细
|
||||
StIvtCheckdtlHrBcp dtlDao = checkdtlBcpService.getOne(
|
||||
new QueryWrapper<StIvtCheckdtlHrBcp>().lambda()
|
||||
.eq(StIvtCheckdtlHrBcp::getTask_id, task_id)
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void checkOut(JSONObject whereJson) {
|
||||
// 校验
|
||||
StIvtCheckdtlHrBcp dtlDao = checkdtlBcpService.getOne(
|
||||
new QueryWrapper<StIvtCheckdtlHrBcp>().lambda()
|
||||
.eq(StIvtCheckdtlHrBcp::getCheckdtl_id, whereJson.getString("checkdtl_id"))
|
||||
);
|
||||
|
||||
if (!dtlDao.getCheck_result().equals(CHECKEnum.CHECK_RESULT.code("异常"))) {
|
||||
throw new BadRequestException("此货位不是异常货位,请正常出库!");
|
||||
}
|
||||
|
||||
/*
|
||||
* 组织出库数据
|
||||
*/
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("biz_date", DateUtil.today());
|
||||
param.put("bill_type", IOSEnum.BILL_TYPE_HR.code("盘点出库"));
|
||||
param.put("remark", "盘点单生成");
|
||||
param.put("product_code", "A3");
|
||||
|
||||
// 出库点
|
||||
SchBasePoint pointDao = iSchBasePointService.getOne(
|
||||
new QueryWrapper<SchBasePoint>().lambda()
|
||||
.eq(SchBasePoint::getRegion_code, PDAEnum.REGION_CODE.code("海柔半成品出库区域"))
|
||||
.eq(SchBasePoint::getIs_used, IOSEnum.IS_USED.code("是"))
|
||||
.eq(SchBasePoint::getIs_delete, IOSEnum.IS_USED.code("否"))
|
||||
, false);
|
||||
if (ObjectUtil.isEmpty(pointDao)) throw new BadRequestException("出库点位异常!");
|
||||
param.put("point_code", pointDao.getPoint_code());
|
||||
|
||||
// 仓库
|
||||
param.put("stor_id", PDAEnum.STOR_ID.code("紫铜三线半成品仓库"));
|
||||
param.put("auto_send", true);
|
||||
|
||||
JSONArray tableData = new JSONArray();
|
||||
JSONObject row = new JSONObject();
|
||||
row.put("material_id", dtlDao.getMaterial_id());
|
||||
row.put("plan_qty", dtlDao.getBase_qty());
|
||||
row.put("quality_scode", IVTEnum.QUALITY_SCODE.code("合格品"));
|
||||
|
||||
MdMeMaterialbase materDao = iMdMeMaterialbaseService.getById(whereJson.getString("material_id"));
|
||||
MdPbMeasureunit unitDao = iMdPbMeasureunitService.getById(materDao.getBase_unit_id());
|
||||
|
||||
row.put("qty_unit_id", unitDao.getMeasure_unit_id());
|
||||
row.put("qty_unit_name", unitDao.getUnit_name());
|
||||
row.put("unit_weight", materDao.getNet_weight());
|
||||
row.put("storagevehicle_code", dtlDao.getStoragevehicle_code());
|
||||
|
||||
StIvtStructattr attrDao = structattrService.getOne(
|
||||
new QueryWrapper<StIvtStructattr>().lambda()
|
||||
.eq(StIvtStructattr::getStruct_code, whereJson.getString("struct_code"))
|
||||
.eq(StIvtStructattr::getIs_used, IOSEnum.IS_USED.code("是")), false
|
||||
);
|
||||
|
||||
row.put("sect_id", attrDao.getSect_id());
|
||||
row.put("sect_code", attrDao.getSect_code());
|
||||
row.put("sect_name", attrDao.getSect_name());
|
||||
row.put("struct_id", attrDao.getStruct_id());
|
||||
row.put("struct_code", attrDao.getStruct_code());
|
||||
row.put("struct_name", attrDao.getStruct_name());
|
||||
|
||||
tableData.add(row);
|
||||
param.put("tableData",tableData);
|
||||
|
||||
// 调用半成品出库服务
|
||||
iStIvtIostorinvHrBcpOutService.create(param);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void delete(Long[] ids) {
|
||||
|
||||
Binary file not shown.
@@ -95,6 +95,17 @@
|
||||
>
|
||||
下发任务
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
:disabled="add_flag"
|
||||
@click="checkOut"
|
||||
>
|
||||
盘点出库
|
||||
</el-button>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
@@ -124,7 +135,8 @@
|
||||
<el-table-column prop="base_qty" label="重量/数量" :formatter="crud.formatNum0" align="center" />
|
||||
<el-table-column prop="qty_unit_name" label="计量单位" align="center" />
|
||||
<el-table-column prop="check_result" label="是否异常" align="center" :formatter="check_resultFormat" />
|
||||
<el-table-column prop="status" label="状态" align="center" :formatter="bill_statusFormat" />
|
||||
<el-table-column prop="status" label="单据状态" align="center" :formatter="bill_statusFormat" />
|
||||
<el-table-column prop="remark" label="备注" align="center" show-overflow-tooltip width="150"/>
|
||||
</el-table>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
@@ -156,7 +168,7 @@ export default {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
dicts: ['CHECK_BILL_STATUS', 'ST_INV_CK_TYPE', 'CHECK_DTL_STATUS', 'check_result'],
|
||||
dicts: ['CHECK_BILL_STATUS', 'ST_INV_CK_TYPE', 'CHECK_DTL_STATUS', 'check_result_hr'],
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
@@ -301,7 +313,7 @@ export default {
|
||||
return this.dict.label.CHECK_DTL_STATUS[row.status]
|
||||
},
|
||||
check_resultFormat(row, column) {
|
||||
return this.dict.label.check_result[row.check_result]
|
||||
return this.dict.label.check_result_hr[row.check_result]
|
||||
},
|
||||
addrow() {
|
||||
if (this.nowrow === null) {
|
||||
@@ -387,6 +399,15 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
checkOut() {
|
||||
if (this.nowrow === null) {
|
||||
this.crud.notify('请先选中一条已存在的库存明细!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
check.checkOut(this.nowrow).then(res => {
|
||||
this.crud.notify('操作成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
},
|
||||
saveCheck() {
|
||||
if (this.tableData.length === 0) {
|
||||
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
|
||||
@@ -119,10 +119,19 @@ export function issueTask(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export function checkOut(data) {
|
||||
return request({
|
||||
url: '/api/bcp/checkHr/checkOut',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default {
|
||||
add,
|
||||
edit,
|
||||
del,
|
||||
checkOut,
|
||||
getCheckDtl,
|
||||
getStructIvt,
|
||||
getOutBillDtl2,
|
||||
|
||||
@@ -263,7 +263,7 @@ export default {
|
||||
if (current !== null) {
|
||||
this.currentRow = current
|
||||
this.downdtl_flag = false
|
||||
if (current.status === '10' || current.status === '30') {
|
||||
if (current.status === '10' || current.status === '30' || current.status === '99') {
|
||||
this.check_flag = false
|
||||
} else {
|
||||
this.check_flag = true
|
||||
|
||||
Reference in New Issue
Block a user