add:新需求
This commit is contained in:
@@ -9,5 +9,7 @@ public interface WmsToErpService {
|
||||
|
||||
void getPurchaseInfo(Map map);
|
||||
|
||||
void getOtherIosInfo(Map map);
|
||||
|
||||
void getPurchaseInInfo(Map map);
|
||||
}
|
||||
|
||||
@@ -407,6 +407,68 @@ public class WmsToErpServiceImpl implements WmsToErpService {
|
||||
log.info("采购订单导入数据结束---------成功:" + ja.size() + "条");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void getOtherIosInfo(Map map) {
|
||||
WQLObject otherPorc = WQLObject.getWQLObject("pcs_if_otheriosinproc");
|
||||
|
||||
JSONArray ja = WQL.getWO("QERP").setDbname("dataSource1").addParam("flag", "33").process().getResultJSONArray(0);
|
||||
log.info("其他采购订单导入数据---------:" + ja.toString());
|
||||
List<String> list = new ArrayList<>();
|
||||
for (int i = 0; i < ja.size(); i++) {
|
||||
// 过滤相同数据
|
||||
JSONObject jo2 = ja.getJSONObject(i);
|
||||
// 订单编号
|
||||
String vbillcode = jo2.getString("vbillcode");
|
||||
// 物料id
|
||||
String cmaterialoid = jo2.getString("cmaterialoid");
|
||||
// 批次
|
||||
String vbatchcode = jo2.getString("vbatchcode");
|
||||
// 行号
|
||||
String crowno = jo2.getString("crowno");
|
||||
// 数量
|
||||
String nnum = jo2.getString("nnum");
|
||||
String orderMd5 = vbillcode + cmaterialoid + vbatchcode + crowno + nnum;
|
||||
if (list.contains(orderMd5)){
|
||||
log.warn("其他采购订单相同:{},md5:{}",JSON.toJSONString(jo2),orderMd5);
|
||||
continue;
|
||||
}
|
||||
list.add(orderMd5);
|
||||
//判断该采购订单是否存在
|
||||
JSONObject jsonLike = otherPorc.query("vbillcode = '" + vbillcode + "' and cmaterialoid = '" + cmaterialoid + "' and vbatchcode = '" + vbatchcode + "' and crowno = '" + crowno + "' and dr = '0'")
|
||||
.uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(jsonLike)) {
|
||||
continue;
|
||||
}
|
||||
//插入其他采购订单处理表
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("id", IdUtil.getSnowflake(1, 1).nextId());
|
||||
jo.put("vbillcode", vbillcode);
|
||||
jo.put("dbilldate", jo2.getString("dbilldate"));
|
||||
jo.put("dr", jo2.getString("dr"));
|
||||
jo.put("vnote", jo2.getString("vnote"));
|
||||
jo.put("cmaterialoid", cmaterialoid);
|
||||
jo.put("vbatchcode", vbatchcode);
|
||||
jo.put("item_no", jo2.getString("item_no"));
|
||||
jo.put("nnum", nnum);
|
||||
jo.put("crowno", crowno);
|
||||
jo.put("vnotebody", jo2.getString("vnotebody"));
|
||||
jo.put("vdef2", jo2.getString("vdef2"));
|
||||
jo.put("pk_org", jo2.getString("pk_org"));
|
||||
jo.put("pk_org_v", jo2.getString("pk_org_v"));
|
||||
jo.put("cwarehouseid", jo2.getString("cwarehouseid"));
|
||||
jo.put("input_optid", SecurityUtils.getCurrentUserId());
|
||||
jo.put("input_optname", SecurityUtils.getNickName());
|
||||
jo.put("input_time", DateUtil.now());
|
||||
try {
|
||||
otherPorc.insert(jo);
|
||||
} catch (Exception e) {
|
||||
throw new BadRequestException("订单号:" + vbillcode + "数据存在问题,请检查!");
|
||||
}
|
||||
}
|
||||
log.info("其他采购订单导入数据结束---------成功:" + list.size() + "条");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void getPurchaseInInfo(Map map) {
|
||||
|
||||
@@ -111,6 +111,18 @@
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "33"
|
||||
QUERY
|
||||
SELECT
|
||||
pp.*
|
||||
FROM
|
||||
V_HHL_OTHERS_IN_VIEW pp
|
||||
WHERE
|
||||
1=1
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "4"
|
||||
QUERY
|
||||
SELECT
|
||||
|
||||
@@ -56,6 +56,13 @@ public class HandNewMaterialController {
|
||||
return new ResponseEntity<>(handNewMaterialService.confirmVehicle(whereJson),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/confirmVehicle2")
|
||||
@Log("新料其他入库组盘")
|
||||
@ApiOperation("新料其他入库组盘")
|
||||
public ResponseEntity<Object> confirmVehicle2(@RequestBody Map whereJson) {
|
||||
return new ResponseEntity<>(handNewMaterialService.confirmVehicle2(whereJson),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/getBillDtl")
|
||||
@Log("获取收货明细")
|
||||
@ApiOperation("获取收货明细")
|
||||
@@ -66,6 +73,16 @@ public class HandNewMaterialController {
|
||||
return new ResponseEntity<>(handNewMaterialService.getBillDtl(whereJson,ctx),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/getBillDtl2")
|
||||
@Log("获取收货明细2")
|
||||
@ApiOperation("获取收货明细2")
|
||||
public ResponseEntity<Object> getBillDtl2(@RequestBody Map whereJson) {
|
||||
HttpContext ctx = new HttpContext("11");
|
||||
ctx.setPage((String)(whereJson.get("page")));
|
||||
ctx.setRows((String)(whereJson.get("size")));
|
||||
return new ResponseEntity<>(handNewMaterialService.getBillDtl2(whereJson,ctx),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/queryPoint")
|
||||
@Log("获取收货明细")
|
||||
@ApiOperation("获取收货明细")
|
||||
|
||||
@@ -30,6 +30,14 @@ public interface HandNewMaterialService {
|
||||
*/
|
||||
Map<String, Object> confirmVehicle(Map jsonObject);
|
||||
|
||||
/**
|
||||
* 确认组盘,生成入库单
|
||||
*
|
||||
* @param jsonObject 条件
|
||||
* @return Map
|
||||
*/
|
||||
Map<String, Object> confirmVehicle2(Map jsonObject);
|
||||
|
||||
/**
|
||||
* 查询收货明细
|
||||
*
|
||||
@@ -38,6 +46,14 @@ public interface HandNewMaterialService {
|
||||
*/
|
||||
Map<String, Object> getBillDtl(Map<String, String> jsonObject, HttpContext ctx);
|
||||
|
||||
/**
|
||||
* 查询收货明细
|
||||
*
|
||||
* @param jsonObject 条件
|
||||
* @return Map<String, Object>
|
||||
*/
|
||||
Map<String, Object> getBillDtl2(Map<String, String> jsonObject, HttpContext ctx);
|
||||
|
||||
/**
|
||||
* 查询收货明细
|
||||
*
|
||||
@@ -131,4 +147,5 @@ public interface HandNewMaterialService {
|
||||
* @return Map
|
||||
*/
|
||||
Map<String, Object> directInConfirm(JSONObject whereJson);
|
||||
|
||||
}
|
||||
|
||||
@@ -708,12 +708,452 @@ public class HandNewMaterialServiceImpl implements HandNewMaterialService {
|
||||
return returnjo;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Map<String, Object> confirmVehicle2(Map jsonObject) {
|
||||
WQLObject task_wql = WQLObject.getWQLObject("SCH_BASE_Task");
|
||||
WQLObject vehicle_wql = WQLObject.getWQLObject("MD_PB_StorageVehicleInfo");
|
||||
WQLObject bucket_wql = WQLObject.getWQLObject("MD_PB_BucketRecord");
|
||||
WQLObject receive_mst = WQLObject.getWQLObject("PCS_RC_ReceiveMst");
|
||||
WQLObject receive_dtl = WQLObject.getWQLObject("PCS_RC_ReceiveDtl");
|
||||
WQLObject io_mst = WQLObject.getWQLObject("ST_IVT_IOStorInv");
|
||||
WQLObject io_dtl = WQLObject.getWQLObject("ST_IVT_IOStorInvDtl");
|
||||
WQLObject io_dis = WQLObject.getWQLObject("ST_IVT_IOStorInvDis");
|
||||
WQLObject point_wql = WQLObject.getWQLObject("SCH_BASE_Point");
|
||||
WQLObject change = WQLObject.getWQLObject("MD_PB_BucketChangeFlow");
|
||||
|
||||
String currentUserId = SecurityUtils.getCurrentUserId() + "";
|
||||
String nickName = SecurityUtils.getNickName();
|
||||
String now = DateUtil.now();
|
||||
int detail_count = 0;
|
||||
double total_qty = 0;
|
||||
|
||||
HashMap<String, String> vehicle = (HashMap<String, String>) jsonObject.get("vehicle");
|
||||
HashMap<String, String> source_bill = (HashMap<String, String>) jsonObject.get("bill");
|
||||
String ivt_level1 = MapUtil.getStr(jsonObject, "ivt_level");
|
||||
|
||||
if (ObjectUtil.isEmpty(vehicle)) {
|
||||
throw new PdaRequestException("载具不能为空,请点击查询载具是否可用!");
|
||||
}
|
||||
HashMap<String, String> point = new HashMap<>();
|
||||
String flag = (String) jsonObject.get("option");
|
||||
String storagevehicle_code = vehicle.get("storagevehicle_code");
|
||||
ArrayList<HashMap> rows = (ArrayList<HashMap>) jsonObject.get("bucket_rows");
|
||||
String material_id = (String) rows.get(0).get("material_id");
|
||||
String pcsn = (String) rows.get(0).get("pcsn");
|
||||
|
||||
String iostorinv_id = IdUtil.getSnowflake(1, 1).nextId() + "";
|
||||
|
||||
//工序返工入库校验
|
||||
if (flag.equals("3") || flag.equals("4") || flag.equals("7")) {
|
||||
point = (HashMap<String, String>) jsonObject.get("point");
|
||||
if (ObjectUtil.isEmpty(point)){
|
||||
throw new PdaRequestException("点位不能为空,请点击查询点位是否可用!");
|
||||
}
|
||||
JSONObject vehicle_jo = vehicle_wql.query("storagevehicle_code = '" + storagevehicle_code + "' AND is_delete = '0' AND is_used = '1'").uniqueResult(0);
|
||||
//校验载具为塑料托盘
|
||||
if (flag.equals("3")){
|
||||
if (!vehicle_jo.getString("storagevehicle_type").equals("10")) {
|
||||
throw new PdaRequestException("必须使用铁托盘!");
|
||||
}
|
||||
}
|
||||
//查询该载具是否存在组盘记录
|
||||
JSONArray mater_rows = bucket_wql.query("storagevehicle_code = '" + vehicle_jo.getString("storagevehicle_code") + "' AND status IN ('03','02')").getResultJSONArray(0);
|
||||
if (mater_rows.size() > 0) {
|
||||
throw new PdaRequestException("请选择空托盘!");
|
||||
}
|
||||
JSONObject point_jo = point_wql.query("vehicle_code = '" + storagevehicle_code + "'").uniqueResult(0);
|
||||
if (!ObjectUtil.isEmpty(point_jo) && !point_jo.getString("point_code").equals(point.get("point_code"))) {
|
||||
throw new PdaRequestException("该载具存在别的点位上!");
|
||||
}
|
||||
//查询是否存在未完成的任务
|
||||
JSONObject task_jo = task_wql.query("vehicle_code = '" + storagevehicle_code + "' AND is_delete = '0' AND task_status < '99'").uniqueResult(0);
|
||||
if (!ObjectUtil.isEmpty(task_jo)) {
|
||||
throw new PdaRequestException("该载具存在未完成的任务!");
|
||||
}
|
||||
JSONObject start_point = point_wql.query("point_code = '" + point.get("point_code") + "'").uniqueResult(0);
|
||||
if (!start_point.getString("lock_type").equals("00")) {
|
||||
throw new PdaRequestException("该点位已被锁定!");
|
||||
}
|
||||
}
|
||||
//插入主表
|
||||
String bill_type = "000103"; // 原材料其他入库
|
||||
JSONObject jo_now = WQL.getWO("QPADST_IN_SERVICE").addParam("flag", "11").addParam("storagevehicle_code", storagevehicle_code).process().uniqueResult(0);
|
||||
if(jo_now!=null){
|
||||
throw new PdaRequestException("该载具"+storagevehicle_code+"已存在未完成的出入库单!");
|
||||
}
|
||||
JSONObject mst_jo = new JSONObject();
|
||||
String bill_code = CodeUtil.getNewCode("IO_CODE");
|
||||
mst_jo.put("iostorinv_id", iostorinv_id);
|
||||
mst_jo.put("bill_code", bill_code);
|
||||
mst_jo.put("buss_type", bill_type.substring(0, 4));
|
||||
mst_jo.put("io_type", "0");
|
||||
mst_jo.put("bill_type", bill_type);
|
||||
mst_jo.put("biz_date", DateUtil.today());
|
||||
mst_jo.put("stor_id", "1473161852946092032");
|
||||
mst_jo.put("stor_code", "01");
|
||||
mst_jo.put("stor_name", "原材料库");
|
||||
mst_jo.put("total_qty", total_qty);
|
||||
mst_jo.put("detail_count", detail_count);
|
||||
mst_jo.put("remark", "");
|
||||
mst_jo.put("bill_status", "10");
|
||||
mst_jo.put("create_mode", "02");
|
||||
mst_jo.put("input_optid", currentUserId + "");
|
||||
mst_jo.put("input_optname", nickName);
|
||||
mst_jo.put("input_time", now);
|
||||
mst_jo.put("update_optid", currentUserId + "");
|
||||
mst_jo.put("update_optname", nickName);
|
||||
mst_jo.put("update_time", now);
|
||||
mst_jo.put("is_delete", "0");
|
||||
mst_jo.put("is_upload", "0");
|
||||
JwtUserDto currentUser = (JwtUserDto) SecurityUtils.getCurrentUser();
|
||||
Long deptId = currentUser.getDeptId();
|
||||
mst_jo.put("sysdeptid", deptId + "");
|
||||
mst_jo.put("syscompanyid", deptId + "");
|
||||
io_mst.insert(mst_jo);
|
||||
|
||||
//批量查询桶:
|
||||
List<String> bucketuniqueCollenct = new ArrayList<>();
|
||||
for (HashMap row : rows) {
|
||||
bucketuniqueCollenct.add(String.valueOf(row.get("bucketunique")));
|
||||
}
|
||||
Map<String, JSONObject> buckqMap = bucket_wql.query("bucketunique in ('" + bucketuniqueCollenct.stream().collect(Collectors.joining("','")) + "')")
|
||||
.getResultJSONArray(0).stream().collect(HashMap::new, (map, buckq) -> {
|
||||
JSONObject jo = (JSONObject) buckq;
|
||||
map.put("key_"+jo.getString("bucketunique")+jo.getString("material_id") + jo.getString("pcsn"), jo);
|
||||
}, HashMap::putAll);
|
||||
|
||||
for (int i = 0; i < rows.size(); i++) {
|
||||
String iostorinvdtl_id = "";
|
||||
String iostorinvdis_id = "";
|
||||
HashMap row = rows.get(i);
|
||||
|
||||
if (flag.equals("5") && row.containsKey("is_new") && row.get("is_new").equals("0")) {
|
||||
continue;
|
||||
}
|
||||
JSONObject bucket_jo = buckqMap.get("key_" + row.get("bucketunique") + row.get("material_id") + row.get("pcsn"));
|
||||
|
||||
check:{ //校验桶状态
|
||||
if (ObjectUtil.isEmpty(bucket_jo)) {
|
||||
throw new PdaRequestException("桶号:" + row.get("bucketunique") + "查不到对应物料批次记录!");
|
||||
}
|
||||
|
||||
if (!ObjectUtil.isEmpty(bucket_jo) && !bucket_jo.getString("status").equals("01")) {
|
||||
//如果为软废采购入库,判断是否为新加,不是新加的不需要判断是否组盘
|
||||
if (!flag.equals("5") && row.containsKey("is_new") && row.get("is_new").equals("0")) {
|
||||
throw new PdaRequestException("桶" + bucket_jo.getString("bucketunique") + "已经组盘!");
|
||||
}
|
||||
}
|
||||
|
||||
if (flag.equals("1")) {
|
||||
if (StrUtil.isNotEmpty(material_id) && StrUtil.isNotEmpty(pcsn)) {
|
||||
if (!row.get("material_id").equals(material_id) || !pcsn.equals(row.get("pcsn"))) {
|
||||
throw new PdaRequestException("存在不同物料、批次的明细!");
|
||||
}
|
||||
}
|
||||
}
|
||||
//工序返工入库校验、零头粉入库
|
||||
if (flag.equals("3") || flag.equals("6")) {
|
||||
//物料为PG粉
|
||||
boolean is_pgf = materialbaseService.isAlongMaterType(MaterOptTypeEnum.PGF.getCode(), bucket_jo.getString("material_id"), null);
|
||||
//桶内物料必须为PG粉;
|
||||
if (!is_pgf) {
|
||||
throw new PdaRequestException("桶内物料不为PG粉!");
|
||||
}
|
||||
}
|
||||
if (flag.equals("5") || flag.equals("7")) {
|
||||
//物料为软废
|
||||
boolean is_rf = materialbaseService.isAlongMaterType(MaterOptTypeEnum.RF.getCode(), bucket_jo.getString("material_id"), null);
|
||||
//桶内物料必须为软废;
|
||||
if (!is_rf) {
|
||||
throw new PdaRequestException("桶内物料不为软废!");
|
||||
}
|
||||
}
|
||||
}
|
||||
//查询该桶记录是否存在
|
||||
if (ObjectUtil.isEmpty(bucket_jo) || !"01,02,03".contains(bucket_jo.getString("status"))) {
|
||||
//插入一条桶记录
|
||||
row.put("create_id", currentUserId + "");
|
||||
row.put("create_name", nickName);
|
||||
row.put("create_time", now);
|
||||
row.put("ivt_level", ivt_level1);
|
||||
row.put("flag", flag);
|
||||
this.insertBucket(row);
|
||||
}
|
||||
//立库返工入库校验
|
||||
if (flag.equals("4")) {
|
||||
//物料为PG粉
|
||||
boolean is_pgf = materialbaseService.isAlongMaterType(MaterOptTypeEnum.PGF.getCode(), bucket_jo.getString("material_id"), null);
|
||||
//桶内物料必须为PG粉;
|
||||
if (!is_pgf) {
|
||||
throw new PdaRequestException("桶内物料不为PG粉!");
|
||||
}
|
||||
}
|
||||
|
||||
//如果为立库返工入库,修改立库出库信息表
|
||||
if (flag.equals("4")) {
|
||||
HashMap<String, String> out_map = new HashMap<>();
|
||||
out_map.put("status", "1");
|
||||
WQLObject.getWQLObject("PDM_LK_OutPalletMateril").update(out_map, "bucketunique = '" + row.get("bucketunique") + "' AND status = '0'");
|
||||
}
|
||||
|
||||
//更新桶记录表桶组盘信息
|
||||
HashMap<String, String> bucket_map = new HashMap<>();
|
||||
bucket_map.put("status", "02");
|
||||
bucket_map.put("makeup_optid", currentUserId + "");
|
||||
bucket_map.put("makeup_optname", nickName);
|
||||
bucket_map.put("makeup_time", now);
|
||||
bucket_map.put("ivt_level", ivt_level1);
|
||||
bucket_map.put("storagevehicle_id", vehicle.get("storagevehicle_id"));
|
||||
bucket_map.put("storagevehicle_code", vehicle.get("storagevehicle_code"));
|
||||
//如果是工序返工入库,修改桶品质类型为不良品
|
||||
if (flag.equals("3")) {
|
||||
bucket_map.put("quality_scode", "02");
|
||||
}
|
||||
bucket_wql.update(bucket_map, "bucketunique = '" + row.get("bucketunique") + "' AND status = '01'");
|
||||
|
||||
JSONObject bucket_now = bucket_wql.query("bucketunique = '" + row.get("bucketunique") + "' AND status = '02'").uniqueResult(0);
|
||||
|
||||
if (flag.equals("7")) {
|
||||
//判断软废是否可用
|
||||
if (!bucket_now.getString("is_active").equals("1")) {
|
||||
throw new PdaRequestException(bucket_now.getString("bucketunique") + "桶,软废不可用!");
|
||||
}
|
||||
}
|
||||
|
||||
if (flag.equals("3")) {
|
||||
//插入桶物料变动记录表,减待检
|
||||
JSONObject change_jo = new JSONObject();
|
||||
change_jo.put("change_id", IdUtil.getSnowflake(1, 1).nextId());
|
||||
change_jo.put("bucket_code", bucket_now.get("bucketunique"));
|
||||
change_jo.put("material_id", bucket_now.get("material_id"));
|
||||
change_jo.put("pcsn", bucket_now.get("pcsn"));
|
||||
change_jo.put("ivt_level", bucket_now.get("ivt_level"));
|
||||
change_jo.put("is_active", bucket_now.get("is_active"));
|
||||
change_jo.put("quality_scode", "00");
|
||||
change_jo.put("qty_unit_id", bucket_now.get("qty_unit_id"));
|
||||
change_jo.put("qty_unit_name", bucket_now.get("qty_unit_name"));
|
||||
change_jo.put("change_type_scode", "02");
|
||||
change_jo.put("change_time", now);
|
||||
change_jo.put("rec_person", currentUserId);
|
||||
change_jo.put("change_qty", bucket_now.get("storage_qty"));
|
||||
change_jo.put("result_qty", "0");
|
||||
change.insert(change_jo);
|
||||
|
||||
//插入桶物料变动记录表,加不良
|
||||
JSONObject change_jo2 = new JSONObject();
|
||||
change_jo2.put("change_id", IdUtil.getSnowflake(1, 1).nextId());
|
||||
change_jo2.put("bucket_code", bucket_now.get("bucketunique"));
|
||||
change_jo2.put("material_id", bucket_now.get("material_id"));
|
||||
change_jo2.put("pcsn", bucket_now.get("pcsn"));
|
||||
change_jo2.put("ivt_level", bucket_now.get("ivt_level"));
|
||||
change_jo2.put("is_active", bucket_now.get("is_active"));
|
||||
change_jo2.put("quality_scode", "02");
|
||||
change_jo2.put("qty_unit_id", bucket_now.get("qty_unit_id"));
|
||||
change_jo2.put("qty_unit_name", bucket_now.get("qty_unit_name"));
|
||||
change_jo2.put("change_type_scode", "01");
|
||||
change_jo2.put("change_time", now);
|
||||
change_jo2.put("rec_person", currentUserId);
|
||||
change_jo2.put("change_qty", bucket_now.get("storage_qty"));
|
||||
change_jo2.put("result_qty", bucket_now.get("storage_qty"));
|
||||
change.insert(change_jo2);
|
||||
}
|
||||
//判断当前物料、批次、库存等级、品质类型、是否可用的入库明细是否存在
|
||||
String bucket_material_id = bucket_now.getString("material_id");
|
||||
String bucket_pcsn = bucket_now.getString("pcsn");
|
||||
String quality_scode = bucket_now.getString("quality_scode");
|
||||
String ivt_level = bucket_now.getString("ivt_level");
|
||||
String is_active = bucket_now.getString("is_active");
|
||||
|
||||
bucket_now.put("storagevehicle_id", vehicle.get("storagevehicle_id"));
|
||||
bucket_now.put("storagevehicle_code", vehicle.get("storagevehicle_code"));
|
||||
bucket_now.put("storagevehicle_type", vehicle.get("storagevehicle_type"));
|
||||
|
||||
String dtl_where = "iostorinv_id = '" + iostorinv_id + "' AND material_id = '" + bucket_material_id + "' AND pcsn = '" + bucket_pcsn + "'" +
|
||||
"AND quality_scode = '" + quality_scode + "' AND ivt_level = '" + ivt_level + "' AND is_active = '" + is_active + "'";
|
||||
JSONObject dtl_jo = io_dtl.query(dtl_where).uniqueResult(0);
|
||||
|
||||
//如果为空新增,否则更新
|
||||
if (ObjectUtil.isEmpty(dtl_jo)) {
|
||||
iostorinvdtl_id = IdUtil.getSnowflake(1, 1).nextId() + "";
|
||||
bucket_now.put("iostorinvdtl_id", iostorinvdtl_id);
|
||||
bucket_now.put("iostorinv_id", iostorinv_id);
|
||||
JSONArray dtl_rows = io_dtl.query("iostorinv_id = '" + iostorinv_id + "'").getResultJSONArray(0);
|
||||
bucket_now.put("seq_no", (dtl_rows.size() + 1) + "");
|
||||
bucket_now.put("bill_status", "30");
|
||||
if (flag.equals("1")) {
|
||||
//新料入库校验
|
||||
//校验到货通知单单据
|
||||
HashMap bill = (HashMap) row.get("bill");
|
||||
String source_bill_code = (String) bill.get("source_bill_code");
|
||||
String source_billdtl_id = (String) bill.get("source_billdtl_id");
|
||||
if (!source_billdtl_id.equals(source_bill.get("source_billdtl_id"))) {
|
||||
throw new PdaRequestException("关联单据不同!");
|
||||
}
|
||||
JSONObject receive_mst_jo = receive_mst.query("receive_code = '" + source_bill_code + "'").uniqueResult(0);
|
||||
JSONObject receive_dtl_jo = receive_dtl.query("receivedtl_id = '" + source_billdtl_id + "'").uniqueResult(0);
|
||||
if (!bill.get("material_id").equals(row.get("material_id")) || !bill.get("pcsn").equals(row.get("pcsn"))) {
|
||||
throw new PdaRequestException("单据物料批次和桶物料批次不同!");
|
||||
}
|
||||
if (ObjectUtil.isEmpty(receive_mst_jo) || ObjectUtil.isEmpty(receive_dtl_jo)) {
|
||||
throw new PdaRequestException("传入的收货单信息有误!");
|
||||
}
|
||||
if (receive_mst_jo.getString("status").equals("99") || receive_mst_jo.getString("is_delete").equals("1")) {
|
||||
throw new PdaRequestException("该到货通知单:" + source_bill_code + "已完成或删除");
|
||||
}
|
||||
if (receive_dtl_jo.getString("status").equals("99")) {
|
||||
throw new PdaRequestException("收货单明细已完成!");
|
||||
}
|
||||
double unin = receive_dtl_jo.getDouble("receive_qty")-receive_dtl_jo.getDouble("instor_qty");
|
||||
if (unin <= 0) {
|
||||
throw new PdaRequestException("收货明细未入库数为0!");
|
||||
}
|
||||
if(bucket_now.getDouble("storage_qty") > unin){
|
||||
throw new PdaRequestException("当前组盘入库数"+bucket_now.getDouble("storage_qty")+"大于收货明细未入库数"+unin+"!");
|
||||
}
|
||||
bucket_now.put("source_billdtl_id", bill.get("source_billdtl_id"));
|
||||
bucket_now.put("source_bill_type", bill.get("source_bill_type"));
|
||||
bucket_now.put("source_bill_code", bill.get("source_bill_code"));
|
||||
bucket_now.put("source_bill_table", bill.get("source_bill_table"));
|
||||
bucket_now.put("base_billdtl_id", bill.get("base_billdtl_id"));
|
||||
bucket_now.put("base_bill_type", bill.get("base_bill_type"));
|
||||
bucket_now.put("base_bill_code", bill.get("base_bill_code"));
|
||||
bucket_now.put("base_bill_table", bill.get("base_bill_table"));
|
||||
}
|
||||
if (flag.equals("5")) {
|
||||
bucket_now.put("source_billdtl_id", row.get("source_billdtl_id"));
|
||||
bucket_now.put("source_bill_type", row.get("source_bill_type"));
|
||||
bucket_now.put("source_bill_code", row.get("source_bill_code"));
|
||||
bucket_now.put("source_bill_table", row.get("source_bill_table"));
|
||||
bucket_now.put("base_billdtl_id", row.get("base_billdtl_id"));
|
||||
bucket_now.put("base_bill_type", row.get("base_bill_type"));
|
||||
bucket_now.put("base_bill_code", row.get("base_bill_code"));
|
||||
bucket_now.put("base_bill_table", row.get("base_bill_table"));
|
||||
if (StrUtil.isNotEmpty((String) row.get("source_billdtl_id"))) {
|
||||
//查询该单据是否存在
|
||||
JSONObject pro_jo = WQLObject.getWQLObject("PCS_IF_PurchaseOrderProc").query("id = '" + row.get("source_billdtl_id") + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(pro_jo)){
|
||||
throw new PdaRequestException("采购订单数据发生变化,请重新选择选择明细生成入库单!");
|
||||
}
|
||||
HashMap<String, String> proc_map = new HashMap<>();
|
||||
proc_map.put("proc_status", "02");
|
||||
proc_map.put("update_optid", currentUserId + "");
|
||||
proc_map.put("update_optname", nickName);
|
||||
proc_map.put("update_time", now);
|
||||
WQLObject.getWQLObject("PCS_IF_PurchaseOrderProc").update(proc_map, "id = '" + row.get("source_billdtl_id") + "'");
|
||||
}
|
||||
}
|
||||
bucket_now.put("unassign_qty", bucket_now.getString("storage_qty"));
|
||||
bucket_now.put("plan_qty", bucket_now.getString("storage_qty"));
|
||||
io_dtl.insert(bucket_now);
|
||||
detail_count++;
|
||||
} else {
|
||||
iostorinvdtl_id = dtl_jo.getString("iostorinvdtl_id");
|
||||
dtl_jo.put("unassign_qty", bucket_now.getDoubleValue("storage_qty"));
|
||||
double unassign_qty = dtl_jo.getDoubleValue("unassign_qty");
|
||||
dtl_jo.put("plan_qty", NumberUtil.add(unassign_qty, dtl_jo.getDoubleValue("assign_qty")));
|
||||
io_dtl.update(dtl_jo);
|
||||
}
|
||||
|
||||
//判断当前载具、物料、批次、库存等级、品质类型、是否可用的入库分配是否存在
|
||||
JSONObject dis_jo = io_dis.query(dtl_where + "AND storagevehicle_code = '" + storagevehicle_code + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(dis_jo)) {
|
||||
iostorinvdis_id = IdUtil.getSnowflake(1, 1).nextId() + "";
|
||||
bucket_now.put("iostorinvdis_id", iostorinvdis_id);
|
||||
bucket_now.put("iostorinv_id", iostorinv_id);
|
||||
bucket_now.put("iostorinvdtl_id", iostorinvdtl_id);
|
||||
JSONArray dis_rows = io_dis.query(dtl_where + "AND storagevehicle_code = '" + storagevehicle_code + "'").getResultJSONArray(0);
|
||||
bucket_now.put("seq_no", dis_rows.size() + 1);
|
||||
//如果是工序返工入库或立库返工入库
|
||||
if (flag.equals("3") || flag.equals("4") || flag.equals("7")) {
|
||||
bucket_now.put("point_id", point.get("point_id"));
|
||||
bucket_now.put("point_code", point.get("point_code"));
|
||||
bucket_now.put("point_name", point.get("point_name"));
|
||||
}
|
||||
inbillService.insertDis(bucket_now);
|
||||
} else {
|
||||
iostorinvdis_id = dis_jo.getString("iostorinvdis_id");
|
||||
}
|
||||
|
||||
//插入分配明细表
|
||||
bucket_now.put("iostorinvdis_id", iostorinvdis_id);
|
||||
bucket_now.put("iostorinv_id", iostorinv_id);
|
||||
bucket_now.put("iostorinvdtl_id", iostorinvdtl_id);
|
||||
bucket_now.put("seq_no", i + 1);
|
||||
inbillService.insertDisDtl(bucket_now);
|
||||
total_qty = total_qty + bucket_now.getDoubleValue("storage_qty");
|
||||
}
|
||||
|
||||
// 判断等级是否一致
|
||||
JSONArray jsonDtlArr = io_dtl.query("iostorinv_id = '" + iostorinv_id + "'").getResultJSONArray(0);
|
||||
String ivt_level = jsonDtlArr.getJSONObject(0).getString("ivt_level");
|
||||
|
||||
boolean is_level = jsonDtlArr.stream()
|
||||
.map(row -> (JSONObject) row)
|
||||
.allMatch(row -> row.getString("ivt_level").equals(ivt_level));
|
||||
|
||||
if (!is_level) {
|
||||
throw new PdaRequestException("库存等级不一致,请检查!");
|
||||
}
|
||||
|
||||
HashMap<String, String> mst_map = new HashMap<>();
|
||||
mst_map.put("total_qty", total_qty + "");
|
||||
mst_map.put("detail_count", detail_count + "");
|
||||
io_mst.update(mst_map, "iostorinv_id = '" + iostorinv_id + "'");
|
||||
|
||||
//如果是工序返工入库,分配货位,生成任务
|
||||
if (flag.equals("3") || flag.equals("4") || flag.equals("7")) {
|
||||
HashMap whereJson = new HashMap();
|
||||
JSONArray tableMater = io_dis.query("iostorinv_id = '" + iostorinv_id + "' AND storagevehicle_code = '" + vehicle.get("storagevehicle_code") + "'").getResultJSONArray(0);
|
||||
ArrayList<HashMap<String, String>> list = new ArrayList<>();
|
||||
for (int i = 0; i < tableMater.size(); i++) {
|
||||
JSONObject jo = tableMater.getJSONObject(i);
|
||||
HashMap<String, String> row = new HashMap<>();
|
||||
row.put("point_code", jo.getString("point_code"));
|
||||
row.put("storagevehicle_id", jo.getString("storagevehicle_id"));
|
||||
row.put("storagevehicle_code", jo.getString("storagevehicle_code"));
|
||||
row.put("storagevehicle_type", jo.getString("storagevehicle_type"));
|
||||
row.put("material_id", jo.getString("material_id"));
|
||||
row.put("iostorinv_id", jo.getString("iostorinv_id"));
|
||||
JSONObject mater_jo = WQLObject.getWQLObject("md_me_materialbase").query("material_id = '" + jo.getString("material_id") + "'").uniqueResult(0);
|
||||
row.put("material_code", mater_jo.getString("material_code"));
|
||||
list.add(row);
|
||||
}
|
||||
whereJson.put("tableMater", list);
|
||||
whereJson.put("checked", true);
|
||||
whereJson.put("auto_issue", true);
|
||||
rawAssistIStorService.divStruct(whereJson);
|
||||
}
|
||||
|
||||
JSONObject returnjo = new JSONObject();
|
||||
returnjo.put("code", "1");
|
||||
returnjo.put("desc", "组盘成功!");
|
||||
return returnjo;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Map<String, Object> getBillDtl(Map<String, String> jsonObject, HttpContext ctx) {
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("flag", "2");
|
||||
map.put("pcsn", jsonObject.get("pcsn"));
|
||||
map.put("receive_type", "81");
|
||||
JSONObject jo = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParamMap(map).pageQuery(ctx, "input_time desc");
|
||||
JSONObject returnjo = new JSONObject();
|
||||
returnjo.put("code", "1");
|
||||
returnjo.put("desc", "查询成功!");
|
||||
returnjo.put("rows", jo.getJSONArray("content"));
|
||||
returnjo.put("size", jo.getJSONArray("content").size());
|
||||
return returnjo;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Map<String, Object> getBillDtl2(Map<String, String> jsonObject, HttpContext ctx) {
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("flag", "2");
|
||||
map.put("pcsn", jsonObject.get("pcsn"));
|
||||
map.put("receive_type", "82");
|
||||
JSONObject jo = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParamMap(map).pageQuery(ctx, "input_time desc");
|
||||
JSONObject returnjo = new JSONObject();
|
||||
returnjo.put("code", "1");
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
|
||||
package org.nl.wms.pcs.rest;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.annotation.Log;
|
||||
import org.nl.wms.pcs.Enum.ProcStatusEnum;
|
||||
import org.nl.wms.pcs.service.PcsIfOtherIosInProcService;
|
||||
import org.nl.wms.pcs.service.dto.PcsIfOtherIosInProcDto;
|
||||
import org.nl.wms.pcs.service.dto.PcsIfPurchaseorderprocDto;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author Liuxy
|
||||
* @date 2021-12-15
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "其他采购订单导入管理")
|
||||
@RequestMapping("/api/otherIosInProc")
|
||||
@Slf4j
|
||||
public class PcsIfOtherIosInProcController {
|
||||
|
||||
private final PcsIfOtherIosInProcService pcsIfOtherIosInProcService;
|
||||
|
||||
@GetMapping
|
||||
@Log("查询采购订单导入")
|
||||
@ApiOperation("查询采购订单导入")
|
||||
//@PreAuthorize("@el.check('pcsIfPurchaseorderproc:list')")
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) {
|
||||
return new ResponseEntity<>(pcsIfOtherIosInProcService.queryAll(whereJson, page), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增采购订单导入")
|
||||
@ApiOperation("新增采购订单导入")
|
||||
//@PreAuthorize("@el.check('pcsIfPurchaseorderproc:add')")
|
||||
public ResponseEntity<Object> create(@Validated @RequestBody PcsIfPurchaseorderprocDto dto) {
|
||||
pcsIfOtherIosInProcService.create(dto);
|
||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改采购订单导入")
|
||||
@ApiOperation("修改采购订单导入")
|
||||
//@PreAuthorize("@el.check('pcsIfPurchaseorderproc:edit')")
|
||||
public ResponseEntity<Object> update(@Validated @RequestBody PcsIfPurchaseorderprocDto dto) {
|
||||
pcsIfOtherIosInProcService.update(dto);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@Log("删除采购订单导入")
|
||||
@ApiOperation("删除采购订单导入")
|
||||
//@PreAuthorize("@el.check('pcsIfPurchaseorderproc:del')")
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Object> delete(@RequestBody Long[] ids) {
|
||||
pcsIfOtherIosInProcService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@Log("获取处理状态")
|
||||
@ApiOperation("获取处理状态")
|
||||
//@PreAuthorize("@el.check('pcsIfPurchaseorderproc:del')")
|
||||
@GetMapping("/getProcStatus")
|
||||
public ResponseEntity<Object> getProcStatus() {
|
||||
JSONArray jsonArr = new JSONArray();
|
||||
ProcStatusEnum[] values = ProcStatusEnum.values();
|
||||
for (ProcStatusEnum value : values) {
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("code", value.getCode());
|
||||
json.put("name", value.getName());
|
||||
jsonArr.add(json);
|
||||
}
|
||||
return new ResponseEntity<>(jsonArr, HttpStatus.OK);
|
||||
}
|
||||
|
||||
@Log("导入视图数据")
|
||||
@ApiOperation("导入视图数据")
|
||||
//@PreAuthorize("@el.check('pcsIfPurchaseorderproc:del')")
|
||||
@PutMapping("/importData")
|
||||
public ResponseEntity<Object> importData(@RequestBody Map whereJson) {
|
||||
pcsIfOtherIosInProcService.importData(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@Log("强制完成")
|
||||
@ApiOperation("强制完成")
|
||||
//@PreAuthorize("@el.check('pcsIfPurchaseorderproc:del')")
|
||||
@PutMapping("/finish")
|
||||
public ResponseEntity<Object> finish(@RequestBody PcsIfOtherIosInProcDto dto) {
|
||||
pcsIfOtherIosInProcService.finish(dto);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
|
||||
package org.nl.wms.pcs.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.nl.wms.pcs.service.dto.PcsIfOtherIosInProcDto;
|
||||
import org.nl.wms.pcs.service.dto.PcsIfPurchaseorderprocDto;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author Liuxy
|
||||
* @description 服务接口
|
||||
* @date 2021-12-15
|
||||
**/
|
||||
public interface PcsIfOtherIosInProcService {
|
||||
|
||||
/**
|
||||
* 查询数据分页
|
||||
*
|
||||
* @param whereJson 条件
|
||||
* @param page 分页参数
|
||||
* @return Map<String, Object>
|
||||
*/
|
||||
Map<String, Object> queryAll(Map whereJson, Pageable page);
|
||||
|
||||
/**
|
||||
* 查询所有数据不分页
|
||||
*
|
||||
* @param whereJson 条件参数
|
||||
* @return List<PcsIfPurchaseorderprocDto>
|
||||
*/
|
||||
List<PcsIfPurchaseorderprocDto> queryAll(Map whereJson);
|
||||
|
||||
/**
|
||||
* 根据ID查询
|
||||
*
|
||||
* @param id ID
|
||||
* @return PcsIfPurchaseorderproc
|
||||
*/
|
||||
PcsIfPurchaseorderprocDto findById(Long id);
|
||||
|
||||
/**
|
||||
* 根据编码查询
|
||||
*
|
||||
* @param code code
|
||||
* @return PcsIfPurchaseorderproc
|
||||
*/
|
||||
PcsIfPurchaseorderprocDto findByCode(String code);
|
||||
|
||||
/**
|
||||
* 创建
|
||||
*
|
||||
* @param dto /
|
||||
*/
|
||||
void create(PcsIfPurchaseorderprocDto dto);
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param dto /
|
||||
*/
|
||||
void update(PcsIfPurchaseorderprocDto dto);
|
||||
|
||||
/**
|
||||
* 多选删除
|
||||
*
|
||||
* @param ids /
|
||||
*/
|
||||
void deleteAll(Long[] ids);
|
||||
|
||||
/**
|
||||
* 导入视图数据
|
||||
*
|
||||
* @param whereJson
|
||||
*/
|
||||
void importData(Map whereJson);
|
||||
|
||||
/**
|
||||
* 强制完成
|
||||
*
|
||||
* @param dto /
|
||||
*/
|
||||
void finish(PcsIfOtherIosInProcDto dto);
|
||||
|
||||
/**
|
||||
* 合同台账
|
||||
*
|
||||
* @param ledgerQueryDownloadQuery 、
|
||||
* @param response 、
|
||||
*/
|
||||
void download(List<JSONObject> ledgerQueryDownloadQuery, HttpServletResponse response) throws IOException;
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
package org.nl.wms.pcs.service.dto;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author Liuxy
|
||||
* @description /
|
||||
* @date 2021-12-15
|
||||
**/
|
||||
@Data
|
||||
public class PcsIfOtherIosInProcDto implements Serializable {
|
||||
|
||||
/** id */
|
||||
/**
|
||||
* 防止精度丢失
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private String vbillcode;
|
||||
|
||||
/**
|
||||
* 订单日期
|
||||
*/
|
||||
private String dbilldate;
|
||||
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
private String dr;
|
||||
|
||||
/**
|
||||
* 标题备注
|
||||
*/
|
||||
private String vnote;
|
||||
|
||||
/**
|
||||
* 物料id
|
||||
*/
|
||||
private String cmaterialoid;
|
||||
|
||||
/**
|
||||
* 批次
|
||||
*/
|
||||
private String vbatchcode;
|
||||
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
private String item_no;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private BigDecimal nnum;
|
||||
|
||||
/**
|
||||
* 行号
|
||||
*/
|
||||
private String crowno;
|
||||
|
||||
/**
|
||||
* 行备注
|
||||
*/
|
||||
private String vnotebody;
|
||||
|
||||
/**
|
||||
* 委外供应商
|
||||
*/
|
||||
private String vdef2;
|
||||
|
||||
/**
|
||||
* 组织
|
||||
*/
|
||||
private String pk_org;
|
||||
|
||||
/**
|
||||
* 住址版本
|
||||
*/
|
||||
private String pk_org_v;
|
||||
|
||||
/**
|
||||
* 库房id
|
||||
*/
|
||||
private String cwarehouseid;
|
||||
|
||||
/**
|
||||
* 处理状态
|
||||
*/
|
||||
private String proc_status;
|
||||
|
||||
private Long input_optid;
|
||||
|
||||
private String input_optname;
|
||||
|
||||
private String input_time;
|
||||
|
||||
private Long update_optid;
|
||||
|
||||
private String update_optname;
|
||||
|
||||
private String update_time;
|
||||
|
||||
|
||||
}
|
||||
@@ -8,6 +8,7 @@ public class ReceivemstQueryDto {
|
||||
private String end_time;
|
||||
private String vbillcode;
|
||||
private String receive_code;
|
||||
private String receive_type;
|
||||
private String material_code;
|
||||
private String supp_code;
|
||||
private String pcsn;
|
||||
|
||||
@@ -0,0 +1,238 @@
|
||||
|
||||
package org.nl.wms.pcs.service.impl;
|
||||
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.exception.BadRequestException;
|
||||
import org.nl.ext.erp.service.WmsToErpService;
|
||||
import org.nl.utils.FileUtil;
|
||||
import org.nl.utils.SecurityUtils;
|
||||
import org.nl.wms.basedata.master.constant.MaterOptTypeEnum;
|
||||
import org.nl.wms.basedata.master.service.ClassstandardService;
|
||||
import org.nl.wms.pcs.Enum.ProcStatusEnum;
|
||||
import org.nl.wms.pcs.service.PcsIfOtherIosInProcService;
|
||||
import org.nl.wms.pcs.service.dto.PcsIfOtherIosInProcDto;
|
||||
import org.nl.wms.pcs.service.dto.PcsIfPurchaseorderprocDto;
|
||||
import org.nl.wql.WQL;
|
||||
import org.nl.wql.core.bean.WQLObject;
|
||||
import org.nl.wql.util.WqlUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author Liuxy
|
||||
* @description 服务实现
|
||||
* @date 2021-12-15
|
||||
**/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class PcsIfOtherIosInProcServiceImpl implements PcsIfOtherIosInProcService {
|
||||
@Autowired
|
||||
private ClassstandardService classstandardService;
|
||||
@Autowired
|
||||
private WmsToErpService wmsToErpService;
|
||||
|
||||
final ReentrantLock lock = new ReentrantLock();
|
||||
|
||||
@Override
|
||||
public Map<String, Object> queryAll(Map whereJson, Pageable page) {
|
||||
HashMap<String, String> map = new HashMap<>(whereJson);
|
||||
map.put("flag", "1");
|
||||
String material_type_id = (String) whereJson.get("material_type_id");
|
||||
if (StrUtil.isNotEmpty(material_type_id)) {
|
||||
String classIds = classstandardService.getChildIdStr(material_type_id);
|
||||
map.put("classIds", classIds);
|
||||
}
|
||||
String type_id = MaterOptTypeEnum.RF.getClass_idStr();
|
||||
map.put("type_id", type_id);
|
||||
JSONObject json = WQL.getWO("QPCS_IF_OTHERIOSINPROC01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "order_code_1 DESC,order_code_2 ASC");
|
||||
return json;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PcsIfPurchaseorderprocDto> queryAll(Map whereJson) {
|
||||
WQLObject wo = WQLObject.getWQLObject("pcs_if_purchaseorderproc");
|
||||
JSONArray arr = wo.query().getResultJSONArray(0);
|
||||
List<PcsIfPurchaseorderprocDto> list = arr.toJavaList(PcsIfPurchaseorderprocDto.class);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PcsIfPurchaseorderprocDto findById(Long id) {
|
||||
WQLObject wo = WQLObject.getWQLObject("pcs_if_purchaseorderproc");
|
||||
JSONObject json = wo.query("id =" + id + "").uniqueResult(0);
|
||||
final PcsIfPurchaseorderprocDto obj = json.toJavaObject(PcsIfPurchaseorderprocDto.class);
|
||||
return obj;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PcsIfPurchaseorderprocDto findByCode(String code) {
|
||||
WQLObject wo = WQLObject.getWQLObject("pcs_if_purchaseorderproc");
|
||||
JSONObject json = wo.query("code ='" + code + "'").uniqueResult(0);
|
||||
final PcsIfPurchaseorderprocDto obj = json.toJavaObject(PcsIfPurchaseorderprocDto.class);
|
||||
return obj;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void create(PcsIfPurchaseorderprocDto dto) {
|
||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getNickName();
|
||||
String now = DateUtil.now();
|
||||
|
||||
dto.setId(IdUtil.getSnowflake(1, 1).nextId());
|
||||
dto.setUpdate_optid(currentUserId);
|
||||
dto.setUpdate_optname(nickName);
|
||||
dto.setUpdate_time(now);
|
||||
|
||||
WQLObject wo = WQLObject.getWQLObject("pcs_if_purchaseorderproc");
|
||||
JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
|
||||
wo.insert(json);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(PcsIfPurchaseorderprocDto dto) {
|
||||
PcsIfPurchaseorderprocDto entity = this.findById(dto.getId());
|
||||
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
|
||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getNickName();
|
||||
|
||||
String now = DateUtil.now();
|
||||
dto.setUpdate_time(now);
|
||||
dto.setUpdate_optid(currentUserId);
|
||||
dto.setUpdate_optname(nickName);
|
||||
|
||||
WQLObject wo = WQLObject.getWQLObject("pcs_if_purchaseorderproc");
|
||||
JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
|
||||
wo.update(json);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deleteAll(Long[] ids) {
|
||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getNickName();
|
||||
String now = DateUtil.now();
|
||||
|
||||
WQLObject wo = WQLObject.getWQLObject("pcs_if_purchaseorderproc");
|
||||
for (Long id : ids) {
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("id", String.valueOf(id));
|
||||
param.put("is_delete", "1");
|
||||
param.put("update_optid", currentUserId);
|
||||
param.put("update_optname", nickName);
|
||||
param.put("update_time", now);
|
||||
wo.update(param);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void importData(Map whereJson) {
|
||||
boolean b = lock.tryLock();
|
||||
try {
|
||||
if (b) {
|
||||
ArrayList<String> arr = (ArrayList<String>) whereJson.get("createTime");
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
if (arr != null && arr.size() != 0) {
|
||||
if (StrUtil.isNotEmpty(arr.get(0))) {
|
||||
map.put("begin_time", arr.get(0));
|
||||
}
|
||||
if (StrUtil.isNotEmpty(arr.get(1))) {
|
||||
map.put("end_time", arr.get(1));
|
||||
}
|
||||
}
|
||||
wmsToErpService.getOtherIosInfo(map);
|
||||
} else {
|
||||
throw new BadRequestException("正在执行导入数据任务,请稍后再试");
|
||||
}
|
||||
} finally {
|
||||
if (b) {
|
||||
lock.unlock();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void finish(PcsIfOtherIosInProcDto dto) {
|
||||
WQLObject orderTab = WQLObject.getWQLObject("pcs_if_otheriosinproc");
|
||||
JSONObject json = orderTab.query("id = '" + dto.getId() + "' and proc_status in (01,02) and dr = '0'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(json)) {
|
||||
throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
}
|
||||
json.put("proc_status", ProcStatusEnum.FULFILL.getCode());
|
||||
json.put("update_optid", SecurityUtils.getCurrentUserId());
|
||||
json.put("update_optname", SecurityUtils.getNickName());
|
||||
json.put("update_time", DateUtil.now());
|
||||
orderTab.update(json);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void download(List<JSONObject> ledgerQueryDownloadQuery, HttpServletResponse response) throws IOException {
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for (int i = 0; i < ledgerQueryDownloadQuery.size(); i++) {
|
||||
JSONObject jo = ledgerQueryDownloadQuery.get(i);
|
||||
Map<String, Object> dtl_map = new LinkedHashMap<>();
|
||||
dtl_map.put("签订时间", jo.getString("subscribedate"));
|
||||
dtl_map.put("合同编码", jo.getString("contract_no"));
|
||||
dtl_map.put("处理状态", jo.getString("proc_status"));
|
||||
dtl_map.put("供应商", jo.getString("supp_name"));
|
||||
dtl_map.put("物料编码", jo.getString("material_code"));
|
||||
dtl_map.put("物料名称", jo.getString("material_name"));
|
||||
dtl_map.put("单价含税", NumberUtil.round(jo.getDoubleValue("price_tax"), 3));
|
||||
dtl_map.put("合同重量", NumberUtil.round(jo.getDoubleValue("qty_ht"), 3));
|
||||
dtl_map.put("合同金额", NumberUtil.round(jo.getDoubleValue("norigtaxmny"), 3));
|
||||
dtl_map.put("合同未到货重量", NumberUtil.round(jo.getDoubleValue("qty_zt"), 3));
|
||||
dtl_map.put("账龄", jo.getString("honour_days"));
|
||||
dtl_map.put("合计重量", NumberUtil.round(jo.getDoubleValue("allqty"), 3));
|
||||
dtl_map.put("合计金额", NumberUtil.round(jo.getDoubleValue("all_valmoney"), 3));
|
||||
dtl_map.put("内容", jo.getString("remark"));
|
||||
list.add(dtl_map);
|
||||
}
|
||||
FileUtil.downloadExcel(list, response);
|
||||
|
||||
}
|
||||
|
||||
public static long getDaySize(String start_datetime, String end_datetime) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
Date date = new Date();
|
||||
Date date2 = new Date();
|
||||
long beforeTime = 0;
|
||||
try {
|
||||
date2 = sdf.parse(end_datetime + " 00:00:00");
|
||||
date = sdf.parse(start_datetime + " 00:00:00");
|
||||
long num = date2.getTime() - date.getTime();
|
||||
beforeTime = (num / 1000) / 60 / 60 / 24;
|
||||
if (beforeTime < 0) {
|
||||
beforeTime = 0;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return beforeTime;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -67,6 +67,7 @@ public class ReceivemstServiceImpl implements ReceivemstService {
|
||||
String vbillcode = dto.getVbillcode();
|
||||
String receive_code = dto.getReceive_code();
|
||||
String material_code = dto.getMaterial_code();
|
||||
String receive_type = dto.getReceive_type();
|
||||
String supp_code = dto.getSupp_code();
|
||||
String pcsn = dto.getPcsn();
|
||||
String[] statusArr = dto.getStatus();
|
||||
@@ -96,11 +97,12 @@ public class ReceivemstServiceImpl implements ReceivemstService {
|
||||
map.put("supp_code", supp_code);
|
||||
map.put("purchase_organize", purchase_organize);
|
||||
map.put("use_dept_id", use_dept_id);
|
||||
map.put("receive_type", receive_type);
|
||||
if (ObjectUtil.isNotEmpty(statusArr)) map.put("status", status);
|
||||
if (ObjectUtil.isNotEmpty(pcsn)) map.put("pcsn", "%"+pcsn+"%");
|
||||
if (ObjectUtil.isNotEmpty(material_code)) map.put("material_code", "%"+material_code+"%");
|
||||
// map.put("dept_id", jsonUser.getString("dept_id")); // 因开发需要 暂时取消
|
||||
JSONObject json = WQL.getWO("QPCS_RC_RECEIVEMST01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "order_code_1 DESC,order_code_2 ASC,mst.receive_code ASC");
|
||||
JSONObject json = WQL.getWO("QPCS_RC_RECEIVEMST01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "order_code_1 DESC,order_code_2 ASC,receive_code ASC");
|
||||
return json;
|
||||
}
|
||||
|
||||
@@ -143,6 +145,7 @@ public class ReceivemstServiceImpl implements ReceivemstService {
|
||||
WQLObject mstTab = WQLObject.getWQLObject("pcs_rc_receivemst");
|
||||
WQLObject dtlTab = WQLObject.getWQLObject("pcs_rc_receivedtl");
|
||||
WQLObject orderTab = WQLObject.getWQLObject("PCS_IF_PurchaseOrderProc");
|
||||
WQLObject otherOrderTab = WQLObject.getWQLObject("pcs_if_otheriosinproc");
|
||||
//主表
|
||||
JSONObject jsonMst = new JSONObject();
|
||||
jsonMst.put("receive_id", IdUtil.getSnowflake(1, 1).nextId());
|
||||
@@ -181,21 +184,33 @@ public class ReceivemstServiceImpl implements ReceivemstService {
|
||||
json.put("receive_id", jsonMst.getString("receive_id"));
|
||||
json.put("receive_code", jsonMst.getString("receive_code"));
|
||||
json.put("seq_no", i + 1);
|
||||
json.put("source_bill_table", "pcs_if_purchaseorderproc");
|
||||
//回显采购订单/其他到货处理表的状态
|
||||
if ("82".equals(whereJson.get("receive_type"))) {
|
||||
// 其他到货
|
||||
json.put("source_bill_table", "pcs_if_otheriosinproc");
|
||||
JSONObject jsonOrder = otherOrderTab.query("id = '" + json.getString("source_billdtl_id") + "'").uniqueResult(0);
|
||||
jsonOrder.put("proc_status", ProcStatusEnum.BUYING_CENTER.getCode());
|
||||
jsonOrder.put("update_optid", SecurityUtils.getCurrentUserId());
|
||||
jsonOrder.put("update_optname", SecurityUtils.getNickName());
|
||||
jsonOrder.put("update_time", DateUtil.now());
|
||||
otherOrderTab.update(jsonOrder);
|
||||
} else {
|
||||
json.put("source_bill_table", "pcs_if_purchaseorderproc");
|
||||
JSONObject jsonOrder = orderTab.query("id = '" + json.getString("source_billdtl_id") + "'").uniqueResult(0);
|
||||
jsonOrder.put("proc_status", ProcStatusEnum.BUYING_CENTER.getCode());
|
||||
jsonOrder.put("update_optid", SecurityUtils.getCurrentUserId());
|
||||
jsonOrder.put("update_optname", SecurityUtils.getNickName());
|
||||
jsonOrder.put("update_time", DateUtil.now());
|
||||
orderTab.update(jsonOrder);
|
||||
}
|
||||
dtlTab.insert(json);
|
||||
//回显采购订单处理表的状态
|
||||
JSONObject jsonOrder = orderTab.query("id = '" + json.getString("source_billdtl_id") + "'").uniqueResult(0);
|
||||
jsonOrder.put("proc_status", ProcStatusEnum.BUYING_CENTER.getCode());
|
||||
jsonOrder.put("update_optid", SecurityUtils.getCurrentUserId());
|
||||
jsonOrder.put("update_optname", SecurityUtils.getNickName());
|
||||
jsonOrder.put("update_time", DateUtil.now());
|
||||
orderTab.update(jsonOrder);
|
||||
|
||||
jsonMst.put("source_id", json.getString("supp_id"));
|
||||
jsonMst.put("source_name", json.getString("supp_name"));
|
||||
}
|
||||
if (StrUtil.isEmpty(jsonMst.getString("source_id"))) {
|
||||
throw new BadRequestException("此到货单源单据 供应商ID关联不到供应商记录,请联系相关人员维护!");
|
||||
if ("81".equals(whereJson.get("receive_type"))) {
|
||||
if (StrUtil.isEmpty(jsonMst.getString("source_id"))) {
|
||||
throw new BadRequestException("此到货单源单据 供应商ID关联不到供应商记录,请联系相关人员维护!");
|
||||
}
|
||||
}
|
||||
mstTab.insert(jsonMst);
|
||||
}
|
||||
@@ -331,8 +346,12 @@ public class ReceivemstServiceImpl implements ReceivemstService {
|
||||
if (material_code.contains("\\")) material_code = material_code.replace("\\", "\\\\\\");
|
||||
map.put("material_code", material_code);
|
||||
}
|
||||
JSONObject json = WQL.getWO("QPCS_RC_RECEIVEMST02").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "input_time DESC");
|
||||
|
||||
// 判断类型是否为:其他到货
|
||||
if ("82".equals(MapUtil.getStr(whereJson, "receive_type"))) {
|
||||
map.put("flag","11");
|
||||
}
|
||||
JSONObject json = WQL.getWO("QPCS_RC_RECEIVEMST02").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "input_time DESC");
|
||||
return json;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
[交易说明]
|
||||
交易名: 其他采购导入分页查询
|
||||
所属模块:
|
||||
功能简述:
|
||||
版权所有:
|
||||
表引用:
|
||||
版本经历:
|
||||
|
||||
[数据库]
|
||||
--指定数据库,为空采用默认值,默认为db.properties中列出的第一个库
|
||||
|
||||
[IO定义]
|
||||
#################################################
|
||||
## 表字段对应输入参数
|
||||
#################################################
|
||||
输入.flag TYPEAS s_string
|
||||
输入.begin_time TYPEAS s_string
|
||||
输入.end_time TYPEAS s_string
|
||||
输入.vbillcode TYPEAS s_string
|
||||
输入.proc_status TYPEAS s_string
|
||||
输入.material_type_id TYPEAS s_string
|
||||
输入.material_code TYPEAS s_string
|
||||
输入.supp_code TYPEAS s_string
|
||||
输入.vbatchcode TYPEAS s_string
|
||||
输入.classIds TYPEAS f_string
|
||||
输入.type_id TYPEAS f_string
|
||||
|
||||
|
||||
[临时表]
|
||||
--这边列出来的临时表就会在运行期动态创建
|
||||
|
||||
[临时变量]
|
||||
--所有中间过程变量均可在此处定义
|
||||
|
||||
[业务过程]
|
||||
|
||||
##########################################
|
||||
# 1、输入输出检查 #
|
||||
##########################################
|
||||
|
||||
|
||||
##########################################
|
||||
# 2、主过程前处理 #
|
||||
##########################################
|
||||
|
||||
|
||||
##########################################
|
||||
# 3、业务主过程 #
|
||||
##########################################
|
||||
|
||||
IF 输入.flag = "1"
|
||||
PAGEQUERY
|
||||
SELECT
|
||||
oder.*,
|
||||
supp.supp_name,
|
||||
supp.supp_code,
|
||||
mater.material_code,
|
||||
mater.material_name,
|
||||
dtl.receive_qty,
|
||||
dtl.instor_qty,
|
||||
SUBSTR(oder.vbillcode,1,6) AS order_code_1,
|
||||
SUBSTR(oder.vbillcode,8,10) AS order_code_2,
|
||||
( oder.nnum - dtl.receive_qty ) AS surplus_qty
|
||||
FROM
|
||||
pcs_if_otheriosinproc oder
|
||||
LEFT JOIN MD_CS_SUPPLIERBASE supp ON oder.vdef2 = supp.ext_id
|
||||
LEFT JOIN MD_ME_MaterialBase mater ON oder.cmaterialoid = mater.ext_id
|
||||
LEFT JOIN
|
||||
(
|
||||
SELECT
|
||||
sum(a.receive_qty) AS receive_qty,
|
||||
sum(a.instor_qty) AS instor_qty,
|
||||
max(a.source_billdtl_id) AS source_billdtl_id,
|
||||
max(a.receive_id) AS receive_id
|
||||
FROM
|
||||
PCS_RC_ReceiveDtl a
|
||||
LEFT JOIN
|
||||
pcs_if_otheriosinproc p ON a.source_billdtl_id = p.id AND a.source_bill_code = p.vbillcode
|
||||
GROUP BY
|
||||
a.source_billdtl_id
|
||||
) AS dtl ON dtl.source_billdtl_id = oder.id
|
||||
LEFT JOIN PCS_RC_ReceiveMst mst ON mst.receive_id = dtl.receive_id AND mst.is_delete = '0'
|
||||
WHERE
|
||||
oder.dr = '0'
|
||||
OPTION 输入.begin_time <> ""
|
||||
oder.input_time >= 输入.begin_time
|
||||
ENDOPTION
|
||||
OPTION 输入.end_time <> ""
|
||||
oder.input_time <= 输入.end_time
|
||||
ENDOPTION
|
||||
OPTION 输入.type_id <> ""
|
||||
mater.material_type_id not in 输入.type_id
|
||||
ENDOPTION
|
||||
OPTION 输入.vbillcode <> ""
|
||||
oder.vbillcode = 输入.vbillcode
|
||||
ENDOPTION
|
||||
OPTION 输入.proc_status <> ""
|
||||
oder.proc_status = 输入.proc_status
|
||||
ENDOPTION
|
||||
OPTION 输入.material_code <> ""
|
||||
(mater.material_code like "%" 输入.material_code "%" or
|
||||
mater.material_name like "%" 输入.material_code "%")
|
||||
ENDOPTION
|
||||
OPTION 输入.vbatchcode <> ""
|
||||
oder.vbatchcode like "%" 输入.vbatchcode "%"
|
||||
ENDOPTION
|
||||
OPTION 输入.classIds <> ""
|
||||
mater.material_type_id in 输入.classIds
|
||||
ENDOPTION
|
||||
OPTION 输入.supp_code <> ""
|
||||
(supp.supp_code like "%" 输入.supp_code "%" or
|
||||
supp.supp_name like "%" 输入.supp_code "%")
|
||||
ENDOPTION
|
||||
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
@@ -14,6 +14,7 @@
|
||||
## 表字段对应输入参数
|
||||
#################################################
|
||||
输入.flag TYPEAS s_string
|
||||
输入.receive_type TYPEAS s_string
|
||||
输入.begin_time TYPEAS s_string
|
||||
输入.end_time TYPEAS s_string
|
||||
输入.vbillcode TYPEAS s_string
|
||||
@@ -52,31 +53,45 @@
|
||||
IF 输入.flag = "1"
|
||||
PAGEQUERY
|
||||
SELECT
|
||||
dtl.*,
|
||||
supp.supp_name,
|
||||
mater.material_code,
|
||||
mater.material_name,
|
||||
mst.receive_date,
|
||||
mst.input_optname,
|
||||
mst.source_type,
|
||||
mst.create_mode,
|
||||
mst.receive_type,
|
||||
mst.stor_id,
|
||||
mst.stor_name,
|
||||
mst.remark,
|
||||
mst.dtl_num,
|
||||
mst.total_qty,
|
||||
proc.vbillcode,
|
||||
ext.standard_weight,
|
||||
(dtl.receive_qty - dtl.instor_qty) AS surplus_qty,
|
||||
SUBSTR(proc.vbillcode,1,6) AS order_code_1,
|
||||
SUBSTR(proc.vbillcode,8,10) AS order_code_2,
|
||||
sheetMst.inspection_id AS is_no
|
||||
MAX( dtl.receivedtl_id ) AS receivedtl_id,
|
||||
MAX( dtl.receive_id ) AS receive_id,
|
||||
MAX( dtl.receive_code ) AS receive_code,
|
||||
MAX( dtl.seq_no ) AS seq_no,
|
||||
MAX( dtl.source_billdtl_id ) AS source_billdtl_id,
|
||||
MAX( dtl.source_bill_type ) AS source_bill_type,
|
||||
MAX( dtl.source_bill_code ) AS source_bill_code,
|
||||
MAX( dtl.source_bill_table ) AS source_bill_table,
|
||||
MAX( dtl.material_id ) AS material_id,
|
||||
MAX( dtl.pcsn ) AS pcsn,
|
||||
MAX( dtl.qty_unit_id ) AS qty_unit_id,
|
||||
MAX( dtl.qty_unit_name ) AS qty_unit_name,
|
||||
MAX( dtl.receive_qty ) AS receive_qty,
|
||||
MAX( dtl.instor_qty ) AS instor_qty,
|
||||
MAX( dtl.STATUS ) AS STATUS,
|
||||
MAX( supp.supp_name ) AS supp_name,
|
||||
MAX( mater.material_code ) AS material_code,
|
||||
MAX( mater.material_name ) AS material_name,
|
||||
MAX( mst.receive_date ) AS receive_date,
|
||||
MAX( mst.input_optname ) AS input_optname,
|
||||
MAX( mst.source_type ) AS source_type,
|
||||
MAX( mst.create_mode ) AS create_mode,
|
||||
MAX( mst.receive_type ) AS receive_type,
|
||||
MAX( mst.stor_id ) AS stor_id,
|
||||
MAX( mst.stor_name ) AS stor_name,
|
||||
MAX( mst.remark ) AS remark,
|
||||
MAX( mst.dtl_num ) AS dtl_num,
|
||||
MAX( mst.total_qty ) AS total_qty,
|
||||
MAX( proc.vbillcode ) AS vbillcode,
|
||||
MAX( ext.standard_weight ) AS standard_weight,
|
||||
MAX( sheetMst.inspection_id ) AS is_no,
|
||||
MAX(dtl.receive_qty) - MAX(dtl.instor_qty) AS surplus_qty,
|
||||
SUBSTR(MAX(proc.vbillcode), 1, 6) AS order_code_1,
|
||||
SUBSTR(MAX(proc.vbillcode), 8, 10) AS order_code_2
|
||||
FROM
|
||||
PCS_RC_ReceiveDtl dtl
|
||||
LEFT JOIN pcs_rc_receivemst mst ON mst.receive_id = dtl.receive_id
|
||||
LEFT JOIN MD_ME_MaterialBase mater ON mater.material_id = dtl.material_id
|
||||
LEFT JOIN PCS_IF_PurchaseOrderProc proc ON proc.id = dtl.source_billdtl_id
|
||||
INNER JOIN PCS_IF_PurchaseOrderProc proc ON proc.id = dtl.source_billdtl_id
|
||||
LEFT JOIN MD_CS_SUPPLIERBASE supp ON proc.vend_id = supp.ext_id
|
||||
LEFT JOIN MD_ME_StockMaterialExt ext ON mater.material_id = ext.material_id
|
||||
LEFT JOIN QL_TEST_InspectionSheetDtl sheetDtl ON dtl.material_id = sheetDtl.material_id AND dtl.pcsn = sheetDtl.pcsn
|
||||
@@ -84,6 +99,10 @@
|
||||
WHERE
|
||||
mst.is_delete = '0'
|
||||
|
||||
OPTION 输入.receive_type <> ""
|
||||
mst.receive_type = 输入.receive_type
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.dept_id <> ""
|
||||
mst.sysdeptid = 输入.dept_id
|
||||
ENDOPTION
|
||||
@@ -129,6 +148,105 @@
|
||||
OPTION 输入.use_dept_id <> ""
|
||||
proc.use_dept_id = 输入.use_dept_id
|
||||
ENDOPTION
|
||||
group by dtl.receive_code
|
||||
UNION
|
||||
SELECT
|
||||
MAX( dtl.receivedtl_id ) AS receivedtl_id,
|
||||
MAX( dtl.receive_id ) AS receive_id,
|
||||
MAX( dtl.receive_code ) AS receive_code,
|
||||
MAX( dtl.seq_no ) AS seq_no,
|
||||
MAX( dtl.source_billdtl_id ) AS source_billdtl_id,
|
||||
MAX( dtl.source_bill_type ) AS source_bill_type,
|
||||
MAX( dtl.source_bill_code ) AS source_bill_code,
|
||||
MAX( dtl.source_bill_table ) AS source_bill_table,
|
||||
MAX( dtl.material_id ) AS material_id,
|
||||
MAX( dtl.pcsn ) AS pcsn,
|
||||
MAX( dtl.qty_unit_id ) AS qty_unit_id,
|
||||
MAX( dtl.qty_unit_name ) AS qty_unit_name,
|
||||
MAX( dtl.receive_qty ) AS receive_qty,
|
||||
MAX( dtl.instor_qty ) AS instor_qty,
|
||||
MAX( dtl.STATUS ) AS STATUS,
|
||||
MAX( supp.supp_name ) AS supp_name,
|
||||
MAX( mater.material_code ) AS material_code,
|
||||
MAX( mater.material_name ) AS material_name,
|
||||
MAX( mst.receive_date ) AS receive_date,
|
||||
MAX( mst.input_optname ) AS input_optname,
|
||||
MAX( mst.source_type ) AS source_type,
|
||||
MAX( mst.create_mode ) AS create_mode,
|
||||
MAX( mst.receive_type ) AS receive_type,
|
||||
MAX( mst.stor_id ) AS stor_id,
|
||||
MAX( mst.stor_name ) AS stor_name,
|
||||
MAX( mst.remark ) AS remark,
|
||||
MAX( mst.dtl_num ) AS dtl_num,
|
||||
MAX( mst.total_qty ) AS total_qty,
|
||||
MAX( proc.vbillcode ) AS vbillcode,
|
||||
MAX( ext.standard_weight ) AS standard_weight,
|
||||
MAX( sheetMst.inspection_id ) AS is_no,
|
||||
MAX(dtl.receive_qty) - MAX(dtl.instor_qty) AS surplus_qty,
|
||||
SUBSTR(MAX(proc.vbillcode), 1, 6) AS order_code_1,
|
||||
SUBSTR(MAX(proc.vbillcode), 8, 10) AS order_code_2
|
||||
FROM
|
||||
PCS_RC_ReceiveDtl dtl
|
||||
LEFT JOIN pcs_rc_receivemst mst ON mst.receive_id = dtl.receive_id
|
||||
LEFT JOIN MD_ME_MaterialBase mater ON mater.material_id = dtl.material_id
|
||||
INNER JOIN pcs_if_otheriosinproc proc ON proc.id = dtl.source_billdtl_id
|
||||
LEFT JOIN MD_CS_SUPPLIERBASE supp ON proc.vdef2 = supp.ext_id
|
||||
LEFT JOIN MD_ME_StockMaterialExt ext ON mater.material_id = ext.material_id
|
||||
LEFT JOIN QL_TEST_InspectionSheetDtl sheetDtl ON dtl.material_id = sheetDtl.material_id AND dtl.pcsn = sheetDtl.pcsn
|
||||
LEFT JOIN QL_TEST_InspectionSheetMst sheetMst ON sheetMst.inspection_id = sheetDtl.inspection_id and sheetMst.is_delete = '0'
|
||||
WHERE
|
||||
mst.is_delete = '0'
|
||||
|
||||
OPTION 输入.receive_type <> ""
|
||||
mst.receive_type = 输入.receive_type
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.dept_id <> ""
|
||||
mst.sysdeptid = 输入.dept_id
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.begin_time <> ""
|
||||
mst.receive_date >= 输入.begin_time
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.end_time <> ""
|
||||
mst.receive_date <= 输入.end_time
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.vbillcode <> ""
|
||||
proc.vbillcode = 输入.vbillcode
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.receive_code <> ""
|
||||
dtl.receive_code = 输入.receive_code
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.material_code <> ""
|
||||
( mater.material_code like "%" 输入.material_code "%" or
|
||||
mater.material_name like "%" 输入.material_code "%")
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.pcsn <> ""
|
||||
dtl.pcsn like 输入.pcsn
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.supp_code <> ""
|
||||
( supp.supp_code like "%" 输入.supp_code "%" or
|
||||
supp.supp_name like "%" 输入.supp_code "%")
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.status <> ""
|
||||
dtl.status in 输入.status
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.purchase_organize <> ""
|
||||
proc.pk_org = 输入.purchase_organize
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.use_dept_id <> ""
|
||||
proc.pk_org_v = 输入.use_dept_id
|
||||
ENDOPTION
|
||||
|
||||
group by dtl.receive_code
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
|
||||
@@ -116,6 +116,76 @@
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "11"
|
||||
PAGEQUERY
|
||||
SELECT
|
||||
oder.id,
|
||||
oder.id AS source_billdtl_id,
|
||||
oder.vbillcode,
|
||||
mater.material_id,
|
||||
'1' AS qty_unit_id,
|
||||
oder.input_time,
|
||||
oder.crowno,
|
||||
oder.nnum AS qty,
|
||||
oder.proc_status,
|
||||
oder.input_optname,
|
||||
oder.update_optname,
|
||||
oder.update_time,
|
||||
'' AS contract_no,
|
||||
'' AS price,
|
||||
'' AS price_tax,
|
||||
supp.supp_id,
|
||||
supp.supp_name,
|
||||
supp.supp_code,
|
||||
oder.vbatchcode AS old_pcsn,
|
||||
oder.vbatchcode AS pcsn,
|
||||
mater.material_code,
|
||||
mater.material_name,
|
||||
dtl.receive_qty AS sum_qty,
|
||||
dtl.instor_qty,
|
||||
'千克\公斤' AS qty_unit_name
|
||||
FROM
|
||||
pcs_if_otheriosinproc oder
|
||||
LEFT JOIN MD_CS_SUPPLIERBASE supp ON oder.vdef2 = supp.ext_id
|
||||
LEFT JOIN MD_ME_MaterialBase mater ON oder.cmaterialoid = mater.ext_id
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
sum(a.receive_qty) AS receive_qty,
|
||||
sum(a.instor_qty) AS instor_qty,
|
||||
max(a.source_billdtl_id) AS source_billdtl_id,
|
||||
max(a.receive_id) AS receive_id
|
||||
FROM
|
||||
PCS_RC_ReceiveDtl a
|
||||
LEFT JOIN pcs_if_otheriosinproc p ON a.source_billdtl_id = p.id
|
||||
AND a.source_bill_code = p.vbillcode
|
||||
GROUP BY
|
||||
a.source_billdtl_id
|
||||
) AS dtl ON dtl.source_billdtl_id = oder.id
|
||||
LEFT JOIN PCS_RC_ReceiveMst mst ON mst.receive_id = dtl.receive_id
|
||||
WHERE
|
||||
oder.proc_status <> '09'
|
||||
AND oder.dr = '0'
|
||||
OPTION 输入.begin_time <> ""
|
||||
oder.input_time >= 输入.begin_time
|
||||
ENDOPTION
|
||||
OPTION 输入.end_time <> ""
|
||||
oder.input_time <= 输入.end_time
|
||||
ENDOPTION
|
||||
OPTION 输入.classIds <> ""
|
||||
mater.material_type_id in 输入.classIds
|
||||
ENDOPTION
|
||||
OPTION 输入.receive_code <> ""
|
||||
oder.vbillcode = 输入.receive_code
|
||||
ENDOPTION
|
||||
OPTION 输入.material_code <> ""
|
||||
(mater.material_code like "%" 输入.material_code "%" or
|
||||
mater.material_name like "%" 输入.material_code "%")
|
||||
ENDOPTION
|
||||
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "2"
|
||||
PAGEQUERY
|
||||
SELECT
|
||||
@@ -131,10 +201,32 @@
|
||||
FROM
|
||||
PCS_RC_ReceiveDtl dtl
|
||||
LEFT JOIN PCS_RC_ReceiveMst mst ON mst.receive_id = dtl.receive_id
|
||||
LEFT JOIN PCS_IF_PurchaseOrderProc der ON dtl.source_billdtl_id = der.id
|
||||
INNER JOIN PCS_IF_PurchaseOrderProc der ON dtl.source_billdtl_id = der.id
|
||||
LEFT JOIN MD_CS_SUPPLIERBASE supp ON der.VEND_ID = supp.ext_id
|
||||
LEFT JOIN md_me_materialbase mater ON dtl.material_id = mater.material_id
|
||||
LEFT JOIN md_pb_measureunit unit ON mater.base_unit_id = unit.measure_unit_id
|
||||
WHERE
|
||||
dtl.receive_code = 输入.receive_code
|
||||
AND dtl.receive_id = 输入.receive_id
|
||||
AND der.dr = '0'
|
||||
UNION
|
||||
SELECT
|
||||
dtl.*,
|
||||
supp.supp_id,
|
||||
supp.supp_name,
|
||||
der.vbillcode AS VBILLCODE,
|
||||
der.nnum AS QTY,
|
||||
der.id,
|
||||
mater.material_code,
|
||||
mater.material_name,
|
||||
unit.unit_name AS qty_unit_name
|
||||
FROM
|
||||
PCS_RC_ReceiveDtl dtl
|
||||
LEFT JOIN PCS_RC_ReceiveMst mst ON mst.receive_id = dtl.receive_id
|
||||
INNER JOIN pcs_if_otheriosinproc der ON dtl.source_billdtl_id = der.id
|
||||
LEFT JOIN MD_CS_SUPPLIERBASE supp ON der.vdef2 = supp.ext_id
|
||||
LEFT JOIN md_me_materialbase mater ON dtl.material_id = mater.material_id
|
||||
LEFT JOIN md_pb_measureunit unit ON mater.base_unit_id = unit.measure_unit_id
|
||||
WHERE
|
||||
dtl.receive_code = 输入.receive_code
|
||||
AND dtl.receive_id = 输入.receive_id
|
||||
|
||||
Binary file not shown.
@@ -478,6 +478,7 @@ public class InspectionsheetmstServiceImpl implements InspectionsheetmstService
|
||||
WQLObject reMstTab = WQLObject.getWQLObject("PCS_RC_ReceiveMst"); //到货通知单主表
|
||||
WQLObject reDtlTab = WQLObject.getWQLObject("PCS_RC_ReceiveDtl"); //到货通知单明细表
|
||||
WQLObject procTab = WQLObject.getWQLObject("PCS_IF_PurchaseOrderProc"); //采购订单接口处理表
|
||||
WQLObject otherInTab = WQLObject.getWQLObject("pcs_if_otheriosinproc");
|
||||
WQLObject lostTab = WQLObject.getWQLObject("QL_TEST_InspectionWeightLost"); //重损计算表
|
||||
WQLObject phyMstTab = WQLObject.getWQLObject("QL_TEST_PhysicalMst"); // 理化报告主表
|
||||
WQLObject workTab = WQLObject.getWQLObject("QL_TEST_WorkProcedureMst"); // 工序质检单主表
|
||||
@@ -686,15 +687,27 @@ public class InspectionsheetmstServiceImpl implements InspectionsheetmstService
|
||||
* 如果到货单主表状态为确认,则需要更新采购订单接口处理表
|
||||
*/
|
||||
if (StrUtil.equals(jsonReMst.getString("status"), ReceiveStatusEnum.AFFIRM.getCode())) {
|
||||
JSONObject jsonProc = procTab.query("id = '" + jsonReDtl.getString("source_billdtl_id") + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonProc)) throw new BadRequestException("订单不存在");
|
||||
// 到货数量 = 订单数量,为完成,否则为采购中
|
||||
if ((jsonReDtl.getDoubleValue("instor_qty") >= jsonProc.getDoubleValue("qty")) && (StrUtil.equals(jsonReDtl.getString("status"), "99"))) {
|
||||
jsonProc.put("proc_status", ProcStatusEnum.FULFILL.getCode());
|
||||
if ("82".equals(jsonReMst.getString("receive_type"))) {
|
||||
JSONObject jsonProc = otherInTab.query("id = '" + jsonReDtl.getString("source_billdtl_id") + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonProc)) throw new BadRequestException("订单不存在");
|
||||
// 到货数量 = 订单数量,为完成,否则为采购中
|
||||
if ((jsonReDtl.getDoubleValue("instor_qty") >= jsonProc.getDoubleValue("nnum")) && (StrUtil.equals(jsonReDtl.getString("status"), "99"))) {
|
||||
jsonProc.put("proc_status", ProcStatusEnum.FULFILL.getCode());
|
||||
} else {
|
||||
jsonProc.put("proc_status", ProcStatusEnum.BUYING_CENTER.getCode());
|
||||
}
|
||||
otherInTab.update(jsonProc);
|
||||
} else {
|
||||
jsonProc.put("proc_status", ProcStatusEnum.BUYING_CENTER.getCode());
|
||||
JSONObject jsonProc = procTab.query("id = '" + jsonReDtl.getString("source_billdtl_id") + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonProc)) throw new BadRequestException("订单不存在");
|
||||
// 到货数量 = 订单数量,为完成,否则为采购中
|
||||
if ((jsonReDtl.getDoubleValue("instor_qty") >= jsonProc.getDoubleValue("qty")) && (StrUtil.equals(jsonReDtl.getString("status"), "99"))) {
|
||||
jsonProc.put("proc_status", ProcStatusEnum.FULFILL.getCode());
|
||||
} else {
|
||||
jsonProc.put("proc_status", ProcStatusEnum.BUYING_CENTER.getCode());
|
||||
}
|
||||
procTab.update(jsonProc);
|
||||
}
|
||||
procTab.update(jsonProc);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -805,6 +818,7 @@ public class InspectionsheetmstServiceImpl implements InspectionsheetmstService
|
||||
WQLObject reMstTab = WQLObject.getWQLObject("PCS_RC_ReceiveMst"); //到货通知单主表
|
||||
WQLObject reDtlTab = WQLObject.getWQLObject("PCS_RC_ReceiveDtl"); //到货通知单明细表
|
||||
WQLObject procTab = WQLObject.getWQLObject("PCS_IF_PurchaseOrderProc"); //采购订单接口处理表
|
||||
WQLObject otherInTab = WQLObject.getWQLObject("pcs_if_otheriosinproc");
|
||||
WQLObject daTab = WQLObject.getWQLObject("ST_IVT_IOStorDaily"); //仓库物料日表
|
||||
|
||||
/*
|
||||
@@ -869,14 +883,25 @@ public class InspectionsheetmstServiceImpl implements InspectionsheetmstService
|
||||
* 如果到货单主表状态为确认,则需要更新采购订单接口处理表
|
||||
*/
|
||||
if (StrUtil.equals(jsonReMst.getString("status"), ReceiveStatusEnum.AFFIRM.getCode())) {
|
||||
JSONObject jsonProc = procTab.query("id = '" + jsonReDtl.getString("source_billdtl_id") + "'").uniqueResult(0);
|
||||
// 到货数量 = 订单数量,为完成,否则为采购中
|
||||
if ((jsonReDtl.getDoubleValue("instor_qty") >= jsonProc.getDoubleValue("qty")) && (StrUtil.equals(jsonReDtl.getString("status"), "99"))) {
|
||||
jsonProc.put("proc_status", ProcStatusEnum.FULFILL.getCode());
|
||||
if ("82".equals(jsonReMst.getString("receive_type"))) {
|
||||
JSONObject jsonProc = otherInTab.query("id = '" + jsonReDtl.getString("source_billdtl_id") + "'").uniqueResult(0);
|
||||
// 到货数量 = 订单数量,为完成,否则为采购中
|
||||
if ((jsonReDtl.getDoubleValue("instor_qty") >= jsonProc.getDoubleValue("nnum")) && (StrUtil.equals(jsonReDtl.getString("status"), "99"))) {
|
||||
jsonProc.put("proc_status", ProcStatusEnum.FULFILL.getCode());
|
||||
} else {
|
||||
jsonProc.put("proc_status", ProcStatusEnum.BUYING_CENTER.getCode());
|
||||
}
|
||||
otherInTab.update(jsonProc);
|
||||
} else {
|
||||
jsonProc.put("proc_status", ProcStatusEnum.BUYING_CENTER.getCode());
|
||||
JSONObject jsonProc = procTab.query("id = '" + jsonReDtl.getString("source_billdtl_id") + "'").uniqueResult(0);
|
||||
// 到货数量 = 订单数量,为完成,否则为采购中
|
||||
if ((jsonReDtl.getDoubleValue("instor_qty") >= jsonProc.getDoubleValue("qty")) && (StrUtil.equals(jsonReDtl.getString("status"), "99"))) {
|
||||
jsonProc.put("proc_status", ProcStatusEnum.FULFILL.getCode());
|
||||
} else {
|
||||
jsonProc.put("proc_status", ProcStatusEnum.BUYING_CENTER.getCode());
|
||||
}
|
||||
procTab.update(jsonProc);
|
||||
}
|
||||
procTab.update(jsonProc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
AND dtl.quality_scode in ('00','01')
|
||||
AND dtl.material_id = 输入.material_id
|
||||
AND dtl.pcsn = 输入.pcsn
|
||||
AND dtl.source_bill_type = '81'
|
||||
AND dtl.source_bill_type in ('81','82')
|
||||
AND dtl.bill_status = '99'
|
||||
|
||||
group by dtl.source_billdtl_id
|
||||
|
||||
@@ -17,6 +17,11 @@
|
||||
"code": "000102",
|
||||
"name": "产成品入库",
|
||||
"materType":"09"
|
||||
},
|
||||
{
|
||||
"code": "000103",
|
||||
"name": "原材料其他入库",
|
||||
"materType":"04"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -234,6 +234,7 @@ public class InbillServiceImpl {
|
||||
WQLObject reMstTab = WQLObject.getWQLObject("PCS_RC_ReceiveMst"); //到货通知单主表
|
||||
WQLObject reDtlTab = WQLObject.getWQLObject("PCS_RC_ReceiveDtl"); //到货通知单明细表
|
||||
WQLObject procTab = WQLObject.getWQLObject("PCS_IF_PurchaseOrderProc"); //采购订单接口处理表
|
||||
WQLObject otherInTab = WQLObject.getWQLObject("pcs_if_otheriosinproc"); //其他采购入库接口处理表
|
||||
WQLObject dtlTab = WQLObject.getWQLObject("QL_TEST_InspectionSheetDtl"); //质检单明细表
|
||||
WQLObject ivtTab = WQLObject.getWQLObject("ST_IVT_StructIvt"); //库存表
|
||||
WQLObject redTab = WQLObject.getWQLObject("MD_PB_BucketRecord"); //桶记录表
|
||||
@@ -312,7 +313,7 @@ public class InbillServiceImpl {
|
||||
mst_jo.put("confirm_optid", currentUserId);
|
||||
mst_jo.put("confirm_optname", nickName);
|
||||
mst_jo.put("confirm_time", now);
|
||||
if("000101".equals(bill_type)){
|
||||
if("000101".equals(bill_type) || "000103".equals(bill_type)){
|
||||
//查询
|
||||
dtl_rows = dtl_table.query("iostorinv_id = '" + iostorinv_id + "' AND bill_status = '99'").getResultJSONArray(0);
|
||||
|
||||
@@ -411,6 +412,7 @@ public class InbillServiceImpl {
|
||||
.addParam("flag", "2")
|
||||
.addParam("material_id", jo.getString("material_id"))
|
||||
.addParam("pcsn", jo.getString("pcsn"))
|
||||
.addParam("pcsn", jo.getString("pcsn"))
|
||||
.process().getResultJSONArray(0);
|
||||
if (ObjectUtil.isNotEmpty(ivtDtlArr)) {
|
||||
for (int j = 0; j < ivtDtlArr.size(); j++) {
|
||||
@@ -457,17 +459,32 @@ public class InbillServiceImpl {
|
||||
* 如果到货单主表状态为确认,则需要更新采购订单接口处理表
|
||||
*/
|
||||
if (StrUtil.equals(jsonReMst.getString("status"), ReceiveStatusEnum.AFFIRM.getCode())) {
|
||||
JSONObject jsonProc = procTab.query("id = '" + jsonReDtl.getString("source_billdtl_id") + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonProc)) {
|
||||
throw new BadRequestException("订单不存在");
|
||||
}
|
||||
// 到货数量 = 订单数量,为完成,否则为采购中
|
||||
if ((jsonReDtl.getDoubleValue("instor_qty") >= jsonProc.getDoubleValue("qty")) && (StrUtil.equals(jsonReDtl.getString("status"), "99"))) {
|
||||
jsonProc.put("proc_status", ProcStatusEnum.FULFILL.getCode());
|
||||
if ("82".equals(jsonReMst.getString("receive_type"))) {
|
||||
// 其他入库
|
||||
JSONObject jsonProc = otherInTab.query("id = '" + jsonReDtl.getString("source_billdtl_id") + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonProc)) {
|
||||
throw new BadRequestException("订单不存在");
|
||||
}
|
||||
// 到货数量 = 订单数量,为完成,否则为采购中
|
||||
if ((jsonReDtl.getDoubleValue("instor_qty") >= jsonProc.getDoubleValue("nnum")) && (StrUtil.equals(jsonReDtl.getString("status"), "99"))) {
|
||||
jsonProc.put("proc_status", ProcStatusEnum.FULFILL.getCode());
|
||||
} else {
|
||||
jsonProc.put("proc_status", ProcStatusEnum.BUYING_CENTER.getCode());
|
||||
}
|
||||
otherInTab.update(jsonProc);
|
||||
} else {
|
||||
jsonProc.put("proc_status", ProcStatusEnum.BUYING_CENTER.getCode());
|
||||
JSONObject jsonProc = procTab.query("id = '" + jsonReDtl.getString("source_billdtl_id") + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonProc)) {
|
||||
throw new BadRequestException("订单不存在");
|
||||
}
|
||||
// 到货数量 = 订单数量,为完成,否则为采购中
|
||||
if ((jsonReDtl.getDoubleValue("instor_qty") >= jsonProc.getDoubleValue("qty")) && (StrUtil.equals(jsonReDtl.getString("status"), "99"))) {
|
||||
jsonProc.put("proc_status", ProcStatusEnum.FULFILL.getCode());
|
||||
} else {
|
||||
jsonProc.put("proc_status", ProcStatusEnum.BUYING_CENTER.getCode());
|
||||
}
|
||||
procTab.update(jsonProc);
|
||||
}
|
||||
procTab.update(jsonProc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
输入.stor_id TYPEAS s_string
|
||||
输入.sect_id TYPEAS s_string
|
||||
输入.buss_type TYPEAS s_string
|
||||
输入.receive_type TYPEAS s_string
|
||||
输入.bill_code TYPEAS s_string
|
||||
输入.iostorinvdis_id TYPEAS s_string
|
||||
输入.iostorinvdtl_id TYPEAS s_string
|
||||
@@ -151,6 +152,9 @@
|
||||
OPTION 输入.bill_code <> ""
|
||||
rm.receive_code like 输入.bill_code
|
||||
ENDOPTION
|
||||
OPTION 输入.receive_type <> ""
|
||||
rm.receive_type = 输入.receive_type
|
||||
ENDOPTION
|
||||
OPTION 输入.begin_time <> ""
|
||||
rm.receive_date >= 输入.begin_time
|
||||
ENDOPTION
|
||||
|
||||
58
mes/qd/src/api/wms/pcs/otherorderproc.js
Normal file
58
mes/qd/src/api/wms/pcs/otherorderproc.js
Normal file
@@ -0,0 +1,58 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/otherIosInProc',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/otherIosInProc/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/otherIosInProc',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getProcStatus() {
|
||||
return request({
|
||||
url: 'api/otherIosInProc/getProcStatus',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function importData(data) {
|
||||
return request({
|
||||
url: 'api/otherIosInProc/importData',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function finish(data) {
|
||||
return request({
|
||||
url: 'api/otherIosInProc/finish',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function saveRemark(data) {
|
||||
return request({
|
||||
url: 'api/otherIosInProc/saveRemark',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getProcStatus, importData, finish, saveRemark }
|
||||
82
mes/qd/src/views/wms/pcs/otherorderproc/importOrder.vue
Normal file
82
mes/qd/src/views/wms/pcs/otherorderproc/importOrder.vue
Normal file
@@ -0,0 +1,82 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="采购订单接口导入"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
:show-close="true"
|
||||
width="500px"
|
||||
v-loading.fullscreen.lock="fullscreenLoading"
|
||||
@close="close"
|
||||
>
|
||||
<div class="head-container">
|
||||
<div>
|
||||
<!-- 搜索 -->
|
||||
<el-date-picker
|
||||
v-model="form.createTime"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
/>
|
||||
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="queryStruct">确认</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import CRUD, { header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import DateRangePicker from '@/components/DateRangePicker/index'
|
||||
import crudOrderproc from "@/api/wms/pcs/orderproc";
|
||||
|
||||
export default {
|
||||
name: 'importOrder',
|
||||
components: { rrOperation, pagination, DateRangePicker },
|
||||
cruds() {
|
||||
},
|
||||
mixins: [presenter(), header()],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
fullscreenLoading: false,
|
||||
dialogVisible: false,
|
||||
form :{}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
close() {
|
||||
this.form = {}
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('tableChanged', this.rows)
|
||||
},
|
||||
queryStruct() {
|
||||
debugger
|
||||
this.fullscreenLoading = true
|
||||
crudOrderproc.importData(this.form).then(res => {
|
||||
this.fullscreenLoading = false
|
||||
this.crud.notify('导入成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
269
mes/qd/src/views/wms/pcs/otherorderproc/index.vue
Normal file
269
mes/qd/src/views/wms/pcs/otherorderproc/index.vue
Normal file
@@ -0,0 +1,269 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="订单编号">
|
||||
<el-input
|
||||
v-model="query.vbillcode"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="订单编号"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态">
|
||||
<el-select
|
||||
v-model="query.proc_status"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="单据状态"
|
||||
class="filter-item"
|
||||
@change="hand"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in procStatusList"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单日期">
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
@change="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料名称">
|
||||
<el-input
|
||||
v-model="query.material_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="物料名称、编码"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="供应商">
|
||||
<label slot="label">供 应 商:</label>
|
||||
<el-input
|
||||
v-model="query.supp_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="供应商名称、编码"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料类别">
|
||||
<treeselect
|
||||
v-model="query.material_type_id"
|
||||
:load-options="loadClass"
|
||||
:options="classes"
|
||||
style="width: 230px;"
|
||||
placeholder="请选择物料类别"
|
||||
size="mini"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-arrow-down"
|
||||
size="mini"
|
||||
@click="Import"
|
||||
>
|
||||
导入
|
||||
</el-button>
|
||||
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
@click="finish"
|
||||
:disabled="crud.selections.length !== 1"
|
||||
>
|
||||
强制完成
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表格渲染-->
|
||||
<el-table ref="table" :max-height="590" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<el-table-column fixed type="selection" width="55" />
|
||||
<el-table-column v-if="false" prop="id" label="id" />
|
||||
<el-table-column prop="dbilldate" label="订单日期" width="100" :formatter="planend_timeFormat" />
|
||||
<el-table-column prop="vbillcode" label="订单编号" min-width="100px" />
|
||||
<el-table-column prop="crowno" label="明细行号" />
|
||||
<el-table-column prop="material_code" label="物料编码" width="160" />
|
||||
<el-table-column prop="material_name" label="物料名称" min-width="120" />
|
||||
<el-table-column prop="vbatchcode" label="批次" min-width="120" />
|
||||
<el-table-column prop="nnum" label="采购重量" width="120px" :formatter="crud.formatNum3"/>
|
||||
<el-table-column prop="receive_qty" label="到货重量" width="100px" :formatter="crud.formatNum3"/>
|
||||
<el-table-column prop="instor_qty" label="入库重量" width="100px" :formatter="crud.formatNum3"/>
|
||||
<el-table-column prop="surplus_qty" label="剩余重量" width="100px" :formatter="crud.formatNum3"/>
|
||||
<el-table-column prop="vnote" label="备注" min-width="120" />
|
||||
<el-table-column prop="proc_status" label="处理状态" :formatter="formaterStatus" />
|
||||
<el-table-column prop="input_optname" label="导入人" />
|
||||
<el-table-column prop="input_time" label="导入时间" width="150px" />
|
||||
<el-table-column prop="update_optname" label="更新人" />
|
||||
<el-table-column prop="update_time" label="更新时间" width="150px" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<importOrder :dialog-show.sync="viewShow" @tableChanged="querytable" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudOrderproc from '@/api/wms/pcs/otherorderproc'
|
||||
import CRUD, { presenter, header, crud } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import importOrder from '@/views/wms/pcs/orderproc/importOrder'
|
||||
import DateRangePicker from '@/components/DateRangePicker'
|
||||
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import crudClassstandard from '@/api/wms/basedata/master/classstandard'
|
||||
import crudMaterialbase from '@/api/wms/basedata/master/materialbase'
|
||||
|
||||
export default {
|
||||
name: 'Otherorderproc',
|
||||
components: { importOrder, pagination, crudOperation, rrOperation, udOperation, DateRangePicker, Treeselect },
|
||||
mixins: [presenter(), header(),crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '其他采购订单导入',
|
||||
url: 'api/otherIosInProc',
|
||||
idField: 'id',
|
||||
sort: 'id,desc',
|
||||
props: {
|
||||
// 每页数据条数
|
||||
size: 20
|
||||
},
|
||||
crudMethod: { ...crudOrderproc },
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: true
|
||||
}
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
classes: [],
|
||||
viewShow : false,
|
||||
class_idStr: null,
|
||||
procStatusList: [],
|
||||
permission: {
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const param = {
|
||||
'materOpt_code': '00'
|
||||
}
|
||||
crudMaterialbase.getMaterOptType(param).then(res => {
|
||||
this.class_idStr = res.class_idStr
|
||||
this.crud.query.class_idStr = res.class_idStr
|
||||
this.crud.toQuery()
|
||||
this.queryClassId()
|
||||
})
|
||||
crudOrderproc.getProcStatus().then(res => {
|
||||
this.procStatusList = res
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
hand(value) {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
queryClassId() {
|
||||
const param = {
|
||||
'class_idStr': this.class_idStr
|
||||
}
|
||||
crudClassstandard.queryClassById(param).then(res => {
|
||||
this.classes = res.content.map(obj => {
|
||||
if (obj.hasChildren) {
|
||||
obj.children = null
|
||||
}
|
||||
return obj
|
||||
})
|
||||
})
|
||||
},
|
||||
// 获取弹窗内部门数据
|
||||
loadClass({ action, parentNode, callback }) {
|
||||
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||
crudClassstandard.getClass({ pid: parentNode.id }).then(res => {
|
||||
parentNode.children = res.content.map(function(obj) {
|
||||
if (obj.hasChildren) {
|
||||
obj.children = null
|
||||
}
|
||||
return obj
|
||||
})
|
||||
setTimeout(() => {
|
||||
callback()
|
||||
}, 100)
|
||||
})
|
||||
}
|
||||
},
|
||||
querytable() {
|
||||
this.crud.toQuery()
|
||||
} ,
|
||||
Import() {
|
||||
this.viewShow = true
|
||||
},
|
||||
finish() {
|
||||
const _selectData = this.$refs.table.selection
|
||||
if (!_selectData || _selectData.length !== 1) {
|
||||
this.crud.notify('请选择一条记录', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
const row = _selectData[0]
|
||||
if (row.proc_status === '09') {
|
||||
this.crud.notify('此订单已完成', CRUD.NOTIFICATION_TYPE.ERROR)
|
||||
return false
|
||||
}
|
||||
crudOrderproc.finish(_selectData[0]).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
planend_timeFormat(row) {
|
||||
return row.dbilldate.substring(0, 10)
|
||||
},
|
||||
formaterStatus(row, column) {
|
||||
for (const item of this.procStatusList) {
|
||||
if (item.code === row.proc_status) {
|
||||
return item.name
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -200,7 +200,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<DtlShowDialog :dialog-show.sync="dtlShowDialog" @tableChanged="tableChanged" />
|
||||
<DtlShowDialog :dialog-show.sync="dtlShowDialog" :receive-type="receive_type_param" @tableChanged="tableChanged" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
@@ -243,6 +243,7 @@ export default {
|
||||
statusList: [],
|
||||
storList: [],
|
||||
flagnow: false,
|
||||
receive_type_param: null,
|
||||
rules: {
|
||||
receive_date: [
|
||||
{ required: true, message: '到货单日期不能为空', trigger: 'blur' }
|
||||
@@ -320,6 +321,7 @@ export default {
|
||||
this.$emit('update:dialogShow', false)
|
||||
},
|
||||
insertEvent() {
|
||||
this.receive_type_param = this.form.receive_type
|
||||
this.dtlShowDialog = true
|
||||
},
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
:show-close="false"
|
||||
width="70%"
|
||||
@close="close"
|
||||
@open="open"
|
||||
>
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
@@ -115,6 +116,10 @@ export default {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
receiveType: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -134,8 +139,14 @@ export default {
|
||||
crudOrderproc.getProcStatus().then(res => {
|
||||
this.procStatusList = res
|
||||
})
|
||||
this.crud.query.receive_type = this.receiveType
|
||||
this.crud.toQuery()
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
this.crud.query.receive_type = this.receiveType
|
||||
this.crud.toQuery()
|
||||
},
|
||||
handleClose(done) {
|
||||
this.$confirm('确认关闭?')
|
||||
.then(_ => {
|
||||
|
||||
@@ -106,6 +106,23 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="业务类型" prop="receive_type">
|
||||
<el-select
|
||||
v-model="query.receive_type"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请选择业务类型"
|
||||
class="filter-item"
|
||||
style="width: 210px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.ST_INV_TYPE_RC"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料批次">
|
||||
<label slot="label">批 次:</label>
|
||||
|
||||
@@ -238,6 +255,7 @@
|
||||
<el-table-column v-if="false" prop="receive_id" label="到货单标识" />
|
||||
<el-table-column prop="status" label="状态" :formatter="formatStatusName" />
|
||||
<el-table-column prop="vbillcode" label="订单编号" min-width="100" />
|
||||
<el-table-column prop="receive_type" label="业务类型" min-width="100" :formatter="formatIosType" />
|
||||
<el-table-column prop="receive_code" label="到货单号" width="160px">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="crud.toView(scope.row)">{{ scope.row.receive_code }}</el-link>
|
||||
@@ -277,7 +295,7 @@ import { downloadFile } from '@/utils'
|
||||
|
||||
export default {
|
||||
name: 'Receivemst',
|
||||
dicts: ['purchase_organize', 'use_dept'],
|
||||
dicts: ['purchase_organize', 'use_dept', 'ST_INV_TYPE_RC'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, DateRangePicker, AddShowDialog },
|
||||
mixins: [presenter(), header(), crud(), form()],
|
||||
cruds() {
|
||||
@@ -452,6 +470,9 @@ export default {
|
||||
},
|
||||
handStatus(val) {
|
||||
this.query.status = val
|
||||
},
|
||||
formatIosType(row) {
|
||||
return this.dict.label.ST_INV_TYPE_RC[row.receive_type]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user