opt:越南富佳优化
This commit is contained in:
@@ -102,7 +102,7 @@ public class PdaIosInController {
|
||||
@PostMapping("/confirmIn")
|
||||
@Log("组盘入库确认")
|
||||
public ResponseEntity<Object> confirmIn(@RequestBody JSONObject whereJson) {
|
||||
assertNotBlankJson(whereJson, "请求参数不能为空", "vehicle_code", "sect_id", "site_code");
|
||||
assertNotBlankJson(whereJson, "请求参数不能为空", "vehicle_code", "sect_id", "site_code","in_type");
|
||||
return new ResponseEntity<>(pdaIosInService.confirmIn(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
@@ -404,7 +404,8 @@ public class PdaIosInServiceImpl implements PdaIosInService {
|
||||
jsonMst.put("bill_status", IOSEnum.BILL_STATUS.code("生成"));
|
||||
jsonMst.put("total_qty", total_qty);
|
||||
jsonMst.put("detail_count", 1);
|
||||
jsonMst.put("bill_type", StatusEnum.IOBILL_TYPE_IN.code("生产入库"));
|
||||
jsonMst.put("bill_type",whereJson.getString("in_type"));
|
||||
jsonMst.put("barcode",whereJson.getString("barcode"));
|
||||
jsonMst.put("biz_date", DateUtil.now());
|
||||
// 组织明细数据
|
||||
ArrayList<HashMap> tableData = new ArrayList<>();
|
||||
@@ -423,6 +424,7 @@ public class PdaIosInServiceImpl implements PdaIosInService {
|
||||
// 调用新增
|
||||
tableData.add(dtl);
|
||||
jsonMst.put("tableData",tableData);
|
||||
jsonMst.put("vehicle_code",plateDao.getStoragevehicle_code());
|
||||
return jsonMst;
|
||||
}
|
||||
|
||||
|
||||
@@ -38,12 +38,6 @@ public class PdaSchPointServiceImpl implements PdaSchPointService {
|
||||
@Override
|
||||
public JSONObject getPoint(JSONObject whereJson) {
|
||||
// 载具号
|
||||
String vehicle_code = whereJson.getString("vehicle_code");
|
||||
|
||||
if (ObjectUtil.isEmpty(vehicle_code)) {
|
||||
throw new BadRequestException(LangBehavior.language("pda_manage.vehicle_code_empty"));
|
||||
}
|
||||
whereJson.remove("struct_code");
|
||||
List<JSONObject> list = stIvtMoveinvdtlMapper.querydtl(whereJson);
|
||||
|
||||
JSONObject ret = new JSONObject();
|
||||
|
||||
@@ -9,6 +9,7 @@ import lombok.RequiredArgsConstructor;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.wms.basedata_manage.enums.BaseDataEnum;
|
||||
import org.nl.wms.system_manage.enums.SysParamConstant;
|
||||
import org.nl.wms.system_manage.service.param.ISysParamService;
|
||||
import org.nl.wms.system_manage.service.param.dao.Param;
|
||||
@@ -53,6 +54,7 @@ public class UploadErpTask {
|
||||
Map whereJson = new HashMap<>();
|
||||
whereJson.put("bill_status", "99");
|
||||
whereJson.put("is_delete", "0");
|
||||
whereJson.put("is_upload", BaseDataEnum.IS_YES_NOT.code("否"));
|
||||
List<IOStorInv> ioStorInvs = returnService.queryAll(whereJson);
|
||||
JSONObject uploadvWhereJson = new JSONObject();
|
||||
uploadvWhereJson.put("rows", ioStorInvs);
|
||||
|
||||
@@ -3,7 +3,9 @@ package org.nl.wms.sch_manage.service.util.tasks;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.language.LangBehavior;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
@@ -16,7 +18,10 @@ import org.nl.wms.sch_manage.service.util.AbstractTask;
|
||||
import org.nl.wms.sch_manage.service.util.AcsTaskDto;
|
||||
import org.nl.wms.sch_manage.service.util.TaskType;
|
||||
import org.nl.wms.warehouse_manage.enums.IOSEnum;
|
||||
import org.nl.wms.warehouse_manage.service.IMdPbGroupplateService;
|
||||
import org.nl.wms.warehouse_manage.service.IOutBillService;
|
||||
import org.nl.wms.warehouse_manage.service.IRawAssistIStorService;
|
||||
import org.nl.wms.warehouse_manage.service.dao.GroupPlate;
|
||||
import org.nl.wms.warehouse_manage.service.dao.IOStorInvDis;
|
||||
import org.nl.wms.warehouse_manage.service.dao.mapper.IOStorInvDisMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -24,6 +29,7 @@ import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: Liuxy
|
||||
@@ -42,6 +48,12 @@ public class StInTask extends AbstractTask {
|
||||
@Resource
|
||||
private IOStorInvDisMapper ioStorInvDisMapper;
|
||||
|
||||
@Resource
|
||||
private IOutBillService outBillService;
|
||||
|
||||
@Autowired
|
||||
private IMdPbGroupplateService iMdPbGroupplateServi;
|
||||
|
||||
@Override
|
||||
public String create(JSONObject json) {
|
||||
SchBaseTask task = new SchBaseTask();
|
||||
@@ -165,6 +177,10 @@ public class StInTask extends AbstractTask {
|
||||
.set(SchBaseTask::getRemark,LangBehavior.language("task.cancelled"))
|
||||
.eq(SchBaseTask::getTask_id,taskObj.getTask_id())
|
||||
);
|
||||
|
||||
List<IOStorInvDis> ioStorInvDisList = ioStorInvDisMapper.selectList(new LambdaQueryWrapper<IOStorInvDis>()
|
||||
.eq(IOStorInvDis::getTask_id, taskObj.getTask_id()));
|
||||
|
||||
//分配表清除任务
|
||||
ioStorInvDisMapper.update(new IOStorInvDis(),new LambdaUpdateWrapper<>(IOStorInvDis.class)
|
||||
.set(IOStorInvDis::getTask_id,null)
|
||||
@@ -174,6 +190,18 @@ public class StInTask extends AbstractTask {
|
||||
.eq(IOStorInvDis::getTask_id,taskObj.getTask_id())
|
||||
);
|
||||
|
||||
if (CollectionUtils.isNotEmpty(ioStorInvDisList)) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("iostorinv_id", ioStorInvDisList.get(0).getIostorinv_id());
|
||||
outBillService.allCancel(jsonObject);
|
||||
}
|
||||
|
||||
//更新组盘表状态
|
||||
iMdPbGroupplateServi.update(new LambdaUpdateWrapper<GroupPlate>()
|
||||
.set(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("入库"))
|
||||
.set(GroupPlate::getUpdate_time, DateUtil.now())
|
||||
.eq(GroupPlate::getStoragevehicle_code, taskObj.getVehicle_code()));
|
||||
|
||||
// 更新任务状态
|
||||
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
||||
taskObj.setRemark(LangBehavior.language("task.cancelled"));
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.system_manage.service.dict.dao.Dict;
|
||||
import org.nl.wms.system_manage.service.dict.dao.DictDto;
|
||||
import org.nl.wms.system_manage.service.dict.dto.DictQuery;
|
||||
|
||||
import java.util.List;
|
||||
@@ -52,7 +53,7 @@ public interface ISysDictService extends IService<Dict> {
|
||||
* @param pageable
|
||||
* @return
|
||||
*/
|
||||
IPage<Dict> queryAllDetail(DictQuery criteria, PageQuery pageable);
|
||||
IPage<DictDto> queryAllDetail(DictQuery criteria, PageQuery pageable);
|
||||
|
||||
/**
|
||||
* 获取字典明细
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
package org.nl.wms.system_manage.service.dict.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 字典表
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2022-12-14
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class DictDto implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 字典标识
|
||||
*/
|
||||
private String dict_id;
|
||||
|
||||
private String text;
|
||||
|
||||
/**
|
||||
* 编码
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 字典标签
|
||||
*/
|
||||
private String label;
|
||||
|
||||
/**
|
||||
* 字典值
|
||||
*/
|
||||
private String value;
|
||||
|
||||
/**
|
||||
* 排序号
|
||||
*/
|
||||
private BigDecimal dict_sort;
|
||||
|
||||
/**
|
||||
* 字典类型
|
||||
*/
|
||||
private String dict_type;
|
||||
|
||||
/**
|
||||
* 参数1
|
||||
*/
|
||||
private String para1;
|
||||
|
||||
/**
|
||||
* 参数2
|
||||
*/
|
||||
private String para2;
|
||||
|
||||
/**
|
||||
* 参数3
|
||||
*/
|
||||
private String para3;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String create_id;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String create_name;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String create_time;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private String update_id;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private String update_name;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private String update_time;
|
||||
|
||||
}
|
||||
@@ -16,12 +16,15 @@ import org.nl.language.LangBehavior;
|
||||
import org.nl.config.language.LangProcess;
|
||||
import org.nl.wms.system_manage.service.dict.ISysDictService;
|
||||
import org.nl.wms.system_manage.service.dict.dao.Dict;
|
||||
import org.nl.wms.system_manage.service.dict.dao.DictDto;
|
||||
import org.nl.wms.system_manage.service.dict.dao.mapper.SysDictMapper;
|
||||
import org.nl.wms.system_manage.service.dict.dto.DictQuery;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
@@ -108,7 +111,7 @@ public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, Dict> impleme
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<Dict> queryAllDetail(DictQuery criteria, PageQuery page) {
|
||||
public IPage<DictDto> queryAllDetail(DictQuery criteria, PageQuery page) {
|
||||
LambdaQueryWrapper<Dict> lam = new LambdaQueryWrapper<>();
|
||||
lam.eq(Dict::getCode, criteria.getCode())
|
||||
.isNotNull(Dict::getLabel)
|
||||
@@ -116,7 +119,17 @@ public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, Dict> impleme
|
||||
.orderBy(true, true, Dict::getDict_sort);
|
||||
IPage<Dict> pages = new Page<>(page.getPage() + 1, page.getSize());
|
||||
sysDictMapper.selectPage(pages, lam);
|
||||
return pages;
|
||||
IPage<DictDto> dtoPages = new Page<>(page.getPage() + 1, page.getSize());
|
||||
List<DictDto> dictDtoList =new ArrayList<>();
|
||||
for(Dict dict :pages.getRecords()){
|
||||
DictDto dictDto = new DictDto();
|
||||
BeanUtils.copyProperties(dict,dictDto);
|
||||
dictDto.setText(dict.getLabel());
|
||||
dictDtoList.add(dictDto);
|
||||
}
|
||||
dtoPages.setRecords(dictDtoList);
|
||||
|
||||
return dtoPages;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -191,4 +191,10 @@ public class IOStorInv implements Serializable {
|
||||
* 回传时间
|
||||
*/
|
||||
private String upload_time;
|
||||
|
||||
private String barcode;
|
||||
|
||||
private String vehicle_code;
|
||||
|
||||
private String struct_code;
|
||||
}
|
||||
|
||||
@@ -168,6 +168,8 @@ public class RawAssistIStorServiceImpl extends ServiceImpl<IOStorInvMapper, IOSt
|
||||
io_mst.put("bill_code", bill_code);
|
||||
io_mst.put("io_type", IOSEnum.IO_TYPE.code("入库"));
|
||||
io_mst.put("bill_type", whereJson.get("bill_type"));
|
||||
io_mst.put("vehicle_code",whereJson.get("vehicle_code"));
|
||||
io_mst.put("barcode",whereJson.get("barcode"));
|
||||
io_mst.put("biz_date", whereJson.get("biz_date").toString().substring(0, 10));
|
||||
BsrealStorattr bsrealStorattr = iBsrealStorattrService.findById((String) whereJson.get("stor_id"));
|
||||
String stor_code = bsrealStorattr.getStor_code();
|
||||
@@ -432,6 +434,11 @@ public class RawAssistIStorServiceImpl extends ServiceImpl<IOStorInvMapper, IOSt
|
||||
dis_map.put("struct_name", struct_name);
|
||||
//锁定货位
|
||||
IOStorInv ioStorInv = ioStorInvMapper.selectById(map.get("iostorinv_id"));
|
||||
if(IOSEnum.IO_TYPE.code("入库").equals(ioStorInv.getIo_type())) {
|
||||
ioStorInv.setStruct_code(struct_code);
|
||||
ioStorInvMapper.updateById(ioStorInv);
|
||||
}
|
||||
|
||||
JSONObject lock_map = new JSONObject();
|
||||
lock_map.put("struct_code", struct_code);
|
||||
lock_map.put("inv_id", ioStorInv.getIostorinv_id());
|
||||
@@ -835,7 +842,7 @@ public class RawAssistIStorServiceImpl extends ServiceImpl<IOStorInvMapper, IOSt
|
||||
form.put("biz_date",DateUtil.now());
|
||||
form.put("currentUserId","3");
|
||||
form.put("nickName","ACS");
|
||||
|
||||
form.put("vehicle_code",vehicle_code);
|
||||
form.put("remark","");
|
||||
form.put("bill_status",IOSEnum.BILL_STATUS.code("生成"));
|
||||
form.put("tableData",tableData);
|
||||
|
||||
@@ -128,17 +128,20 @@ public class RetrunServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv> i
|
||||
JSONObject row = rows.get(i);
|
||||
IOStorInv mst = ioStorInvMapper.selectById(row.getString("iostorinv_id"));
|
||||
//入库
|
||||
if ("0".equals(mst.getIo_type()) && !StatusEnum.IOBILL_TYPE_IN.code("剩料回库").equals(mst.getBill_type())) {
|
||||
// 根据主表id查询所有分配明细
|
||||
List<IOStorInvDis> iosDisList = ioStorInvDisMapper.selectList(
|
||||
new QueryWrapper<IOStorInvDis>().lambda()
|
||||
.eq(IOStorInvDis::getIostorinv_id, row.getString("iostorinv_id")));
|
||||
for (IOStorInvDis disDao : iosDisList) {
|
||||
JSONObject param = new JSONObject();
|
||||
// 载具编码
|
||||
param.put("pallet_sn", disDao.getStoragevehicle_code());
|
||||
param.put("instor_time", mst.getConfirm_time());
|
||||
wmsToErpService.instorinfoToErp(param);
|
||||
if ("0".equals(mst.getIo_type())) {
|
||||
if(!StatusEnum.IOBILL_TYPE_IN.code("剩料回库").equals(mst.getBill_type())) {
|
||||
// 根据主表id查询所有分配明细
|
||||
List<IOStorInvDis> iosDisList = ioStorInvDisMapper.selectList(
|
||||
new QueryWrapper<IOStorInvDis>().lambda()
|
||||
.eq(IOStorInvDis::getIostorinv_id, row.getString("iostorinv_id")));
|
||||
for (IOStorInvDis disDao : iosDisList) {
|
||||
JSONObject param = new JSONObject();
|
||||
// 载具编码
|
||||
param.put("pallet_sn", disDao.getStoragevehicle_code());
|
||||
param.put("instor_time", mst.getConfirm_time());
|
||||
param.put("barcode", mst.getBarcode());
|
||||
wmsToErpService.instorinfoToErp(param);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//按明细回传
|
||||
|
||||
Reference in New Issue
Block a user