opt:富佳项目优化
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -4,3 +4,6 @@ nladmin-ui/node_modules/
|
||||
nladmin-ui/.idea/misc.xml
|
||||
nladmin-ui/.idea/
|
||||
nladmin-system/nlsso-server/target/
|
||||
nladmin-ui/dist/
|
||||
.idea/
|
||||
nladmin-ui/dist.zip
|
||||
|
||||
@@ -0,0 +1,178 @@
|
||||
package org.nl.wms.basedata_manage.service.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 author
|
||||
* @since 2025-05-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class MdMeMaterialbaseDto implements Serializable {
|
||||
|
||||
|
||||
|
||||
private String material_id;
|
||||
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
private String material_code;
|
||||
|
||||
/**
|
||||
* 物料名称
|
||||
*/
|
||||
private String material_name;
|
||||
|
||||
/**
|
||||
* 规格
|
||||
*/
|
||||
private String material_spec;
|
||||
|
||||
/**
|
||||
* 型号
|
||||
*/
|
||||
private String material_model;
|
||||
|
||||
/**
|
||||
* 外文名称
|
||||
*/
|
||||
private String english_name;
|
||||
|
||||
/**
|
||||
* 基本计量单位
|
||||
*/
|
||||
private String base_unit_id;
|
||||
|
||||
/**
|
||||
* 基本计量单位
|
||||
*/
|
||||
private String base_unit_name;
|
||||
|
||||
/**
|
||||
* 辅助计量单位
|
||||
*/
|
||||
private String ass_unit_id;
|
||||
|
||||
/**
|
||||
* 批准文号
|
||||
*/
|
||||
private String approve_fileno;
|
||||
|
||||
/**
|
||||
* 工程图号
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 物料分类标识
|
||||
*/
|
||||
private String material_type_id;
|
||||
|
||||
/**
|
||||
* 长度单位
|
||||
*/
|
||||
private String len_unit_id;
|
||||
|
||||
/**
|
||||
* 物料长度
|
||||
*/
|
||||
private BigDecimal length;
|
||||
|
||||
/**
|
||||
* 物料宽度
|
||||
*/
|
||||
private BigDecimal width;
|
||||
|
||||
/**
|
||||
* 物料高度
|
||||
*/
|
||||
private BigDecimal height;
|
||||
|
||||
/**
|
||||
* 重量单位
|
||||
*/
|
||||
private String weight_unit_id;
|
||||
|
||||
/**
|
||||
* 物料毛重
|
||||
*/
|
||||
private BigDecimal gross_weight;
|
||||
|
||||
/**
|
||||
* 物料净重
|
||||
*/
|
||||
private BigDecimal net_weight;
|
||||
|
||||
/**
|
||||
* 体积单位
|
||||
*/
|
||||
private String cubage_unit_id;
|
||||
|
||||
/**
|
||||
* 物料体积
|
||||
*/
|
||||
private BigDecimal cubage;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String create_id;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
private String create_name;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String create_time;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private String update_optid;
|
||||
|
||||
/**
|
||||
* 修改人姓名
|
||||
*/
|
||||
private String update_optname;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private String update_time;
|
||||
|
||||
/**
|
||||
* 启用时间
|
||||
*/
|
||||
private String is_used_time;
|
||||
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
private String is_used;
|
||||
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
private String is_delete;
|
||||
|
||||
/**
|
||||
* 外部标识
|
||||
*/
|
||||
private String ext_id;
|
||||
|
||||
|
||||
}
|
||||
@@ -35,5 +35,6 @@ public class EXTConstant {
|
||||
/**
|
||||
* ERP获取物料详情请求地址
|
||||
*/
|
||||
public final static String GET_MATERIAL_INFO_ERP_API = "api/lms/materialinfo";
|
||||
public final static String GET_MATERIAL_INFO_ERP_API = "/api/toerp/requestmaterialinfo";
|
||||
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.base.TableDataInfo;
|
||||
import org.nl.common.logging.annotation.Log;
|
||||
import org.nl.wms.basedata_manage.service.dao.MdMeMaterialbase;
|
||||
import org.nl.wms.basedata_manage.service.dao.MdMeMaterialbaseDto;
|
||||
import org.nl.wms.pda_manage.ios_manage.service.PdaIosInService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
@@ -84,7 +85,7 @@ public class PdaIosInController {
|
||||
*/
|
||||
@PostMapping("/getMaterialList")
|
||||
@Log("获取物料列表")
|
||||
public ResponseEntity<TableDataInfo<MdMeMaterialbase>> getMaterialList(@RequestBody JSONObject whereJson) {
|
||||
public ResponseEntity<TableDataInfo<MdMeMaterialbaseDto>> getMaterialList(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(pdaIosInService.getMaterialList(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import org.nl.common.base.TableDataInfo;
|
||||
import org.nl.common.domain.vo.SelectItemVo;
|
||||
import org.nl.wms.basedata_manage.service.dao.MdMeMaterialbase;
|
||||
import org.nl.wms.basedata_manage.service.dao.MdMeMaterialbaseDto;
|
||||
import org.nl.wms.pda_manage.util.PdaResponse;
|
||||
import org.nl.wms.warehouse_manage.service.dao.GroupPlate;
|
||||
|
||||
@@ -66,7 +67,7 @@ public interface PdaIosInService {
|
||||
*
|
||||
* @return PdaResponse
|
||||
*/
|
||||
TableDataInfo<MdMeMaterialbase> getMaterialList(JSONObject whereJson);
|
||||
TableDataInfo<MdMeMaterialbaseDto> getMaterialList(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 查询物料列表
|
||||
|
||||
@@ -23,6 +23,7 @@ import org.nl.wms.basedata_manage.enums.BaseDataEnum;
|
||||
import org.nl.wms.basedata_manage.service.*;
|
||||
import org.nl.wms.basedata_manage.service.dao.*;
|
||||
import org.nl.wms.basedata_manage.service.dto.MaterialQuery;
|
||||
import org.nl.wms.ext_manage.dto.ErpGroupplateDto;
|
||||
import org.nl.wms.pda_manage.ios_manage.service.PdaIosInService;
|
||||
import org.nl.wms.pda_manage.util.PdaResponse;
|
||||
import org.nl.wms.sch_manage.enums.StatusEnum;
|
||||
@@ -54,6 +55,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static org.nl.wms.warehouse_manage.enums.IOSEnum.GROUP_PLATE_STATUS;
|
||||
|
||||
@@ -232,7 +234,7 @@ public class PdaIosInServiceImpl implements PdaIosInService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo<MdMeMaterialbase> getMaterialList(JSONObject whereJson) {
|
||||
public TableDataInfo<MdMeMaterialbaseDto> getMaterialList(JSONObject whereJson) {
|
||||
PageQuery pageQuery = new PageQuery();
|
||||
pageQuery.setPage(whereJson.getInteger("page") - 1);
|
||||
pageQuery.setSize(whereJson.getInteger("size"));
|
||||
@@ -240,8 +242,34 @@ public class PdaIosInServiceImpl implements PdaIosInService {
|
||||
if (StringUtils.isNotBlank(whereJson.getString("search"))) {
|
||||
materialQuery.setSearch(whereJson.getString("search").trim().toUpperCase());
|
||||
}
|
||||
Page mapPage = iMdMeMaterialbaseService.pageMaps(pageQuery.build(), materialQuery.build());
|
||||
return PdaResponse.build(mapPage);
|
||||
// 修正:使用page方法而不是pageMaps方法,以获取MdMeMaterialbase实体对象列表
|
||||
Page<MdMeMaterialbase> page = iMdMeMaterialbaseService.page(pageQuery.build(), materialQuery.build());
|
||||
|
||||
List<MdMeMaterialbase> mdMeMaterialbases = page.getRecords();
|
||||
|
||||
List<String> unitIdList = mdMeMaterialbases.stream()
|
||||
.map(MdMeMaterialbase::getBase_unit_id)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
//查询单位
|
||||
List<MdPbMeasureunit> mdPbMeasureunits = iMdPbMeasureunitService.list(new QueryWrapper<MdPbMeasureunit>().lambda()
|
||||
.in(MdPbMeasureunit::getMeasure_unit_id,unitIdList ));
|
||||
|
||||
Map<String,String> unitMap = mdPbMeasureunits.stream().collect(Collectors.toMap(MdPbMeasureunit::getMeasure_unit_id, MdPbMeasureunit::getUnit_name));
|
||||
//stream()
|
||||
//collect(Collectors.toMap(MdPbMeasureunit::getMeasure_unit_id, MdPbMeasureunit::getUnit_name));
|
||||
|
||||
List<MdMeMaterialbaseDto> mdMeMaterialbaseDtos = new ArrayList<>();
|
||||
for (MdMeMaterialbase mdMeMaterialbase : mdMeMaterialbases) {
|
||||
MdMeMaterialbaseDto mdMeMaterialbaseDto = new MdMeMaterialbaseDto();
|
||||
BeanUtils.copyProperties(mdMeMaterialbase, mdMeMaterialbaseDto);
|
||||
mdMeMaterialbaseDto.setBase_unit_name(unitMap.get(mdMeMaterialbase.getBase_unit_id()));
|
||||
mdMeMaterialbaseDtos.add(mdMeMaterialbaseDto);
|
||||
}
|
||||
Page<MdMeMaterialbaseDto> pageDto = new Page<>();
|
||||
BeanUtils.copyProperties(page, pageDto);
|
||||
pageDto.setRecords(mdMeMaterialbaseDtos);
|
||||
return PdaResponse.build(pageDto);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -3,6 +3,7 @@ package org.nl.wms.pda_manage.ios_manage.service.impl;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.http.HttpStatus;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
@@ -142,57 +143,60 @@ public class PdaIosOutServiceImpl implements PdaIosOutService {
|
||||
throw new BadRequestException("点位不存在:"+outPoint);
|
||||
}
|
||||
//载具信息
|
||||
JSONObject obj = param.getJSONObject("obj");
|
||||
JSONArray objRows = param.getJSONArray("obj");
|
||||
//创建出库单/明细/分配
|
||||
GroupPlate plateDao = mdPbGroupplateMapper.selectOne(
|
||||
new LambdaQueryWrapper<GroupPlate>()
|
||||
.eq(GroupPlate::getGroup_id, obj.getString("group_id")));
|
||||
for (int i = 0; i < objRows.size(); i++) {
|
||||
JSONObject obj = objRows.getJSONObject(i);
|
||||
GroupPlate plateDao = mdPbGroupplateMapper.selectOne(
|
||||
new LambdaQueryWrapper<GroupPlate>()
|
||||
.eq(GroupPlate::getGroup_id, obj.getString("group_id")));
|
||||
|
||||
Structattr struct = iStructattrService.getOne(new LambdaQueryWrapper<Structattr>()
|
||||
.eq(Structattr::getStruct_code, obj.getString("struct_code")));
|
||||
MdMeMaterialbase materDao = iMdMeMaterialbaseService.getById(plateDao.getMaterial_id());
|
||||
obj.put("material_id", materDao.getMaterial_id());
|
||||
obj.put("material_code", materDao.getMaterial_code());
|
||||
obj.put("store_id", struct.getStor_id());
|
||||
obj.put("store_code", struct.getStor_code());
|
||||
obj.put("store_name", struct.getStor_name());
|
||||
obj.put("sect_id", struct.getSect_id());
|
||||
obj.put("sect_code", struct.getSect_code());
|
||||
obj.put("sect_name", struct.getSect_name());
|
||||
obj.put("struct_id", struct.getStruct_id());
|
||||
obj.put("struct_code", struct.getStruct_code());
|
||||
obj.put("struct_name", struct.getStruct_name());
|
||||
obj.put("qty", plateDao.getQty());
|
||||
obj.put("unit_id", plateDao.getQty_unit_id());
|
||||
obj.put("unit_name", plateDao.getQty_unit_name());
|
||||
//创建出库单据
|
||||
String disId = createOutBills(obj);
|
||||
//锁定货位
|
||||
JSONObject lock_map = new JSONObject();
|
||||
lock_map.put("struct_code", obj.getString("struct_code"));
|
||||
lock_map.put("lock_type", IOSEnum.LOCK_TYPE.code("出库锁"));
|
||||
iStructattrService.updateStatusByCode("0", lock_map);
|
||||
//创建任务
|
||||
JSONObject taskForm = new JSONObject();
|
||||
taskForm.put("task_type", "STOutTask");
|
||||
taskForm.put("TaskCode", CodeUtil.getNewCode("TASK_CODE"));
|
||||
taskForm.put("PickingLocation", obj.getString("struct_code"));
|
||||
taskForm.put("PlacedLocation",outPoint);
|
||||
taskForm.put("vehicle_code", obj.getString("storagevehicle_code"));
|
||||
StOutTask stOutTask = SpringContextHolder.getBean("STOutTask");
|
||||
String taskId = stOutTask.create(taskForm);
|
||||
//更新任务id
|
||||
ioStorInvDisMapper.update(new IOStorInvDis(), new LambdaUpdateWrapper<IOStorInvDis>()
|
||||
.set(IOStorInvDis::getTask_id, taskId)
|
||||
.set(IOStorInvDis::getPoint_code,outPoint)
|
||||
.set(IOStorInvDis::getFloor_code,floor_code)
|
||||
.eq(IOStorInvDis::getIostorinvdis_id, disId)
|
||||
);
|
||||
//更新组盘记录表
|
||||
mdPbGroupplateMapper.update(new GroupPlate(), new LambdaUpdateWrapper<>(GroupPlate.class)
|
||||
.set(GroupPlate::getFrozen_qty, plateDao.getQty())
|
||||
.eq(GroupPlate::getGroup_id, obj.getString("group_id"))
|
||||
);
|
||||
Structattr struct = iStructattrService.getOne(new LambdaQueryWrapper<Structattr>()
|
||||
.eq(Structattr::getStruct_code, obj.getString("struct_code")));
|
||||
MdMeMaterialbase materDao = iMdMeMaterialbaseService.getById(plateDao.getMaterial_id());
|
||||
obj.put("material_id", materDao.getMaterial_id());
|
||||
obj.put("material_code", materDao.getMaterial_code());
|
||||
obj.put("store_id", struct.getStor_id());
|
||||
obj.put("store_code", struct.getStor_code());
|
||||
obj.put("store_name", struct.getStor_name());
|
||||
obj.put("sect_id", struct.getSect_id());
|
||||
obj.put("sect_code", struct.getSect_code());
|
||||
obj.put("sect_name", struct.getSect_name());
|
||||
obj.put("struct_id", struct.getStruct_id());
|
||||
obj.put("struct_code", struct.getStruct_code());
|
||||
obj.put("struct_name", struct.getStruct_name());
|
||||
obj.put("qty", plateDao.getQty());
|
||||
obj.put("unit_id", plateDao.getQty_unit_id());
|
||||
obj.put("unit_name", plateDao.getQty_unit_name());
|
||||
//创建出库单据
|
||||
String disId = createOutBills(obj);
|
||||
//锁定货位
|
||||
JSONObject lock_map = new JSONObject();
|
||||
lock_map.put("struct_code", obj.getString("struct_code"));
|
||||
lock_map.put("lock_type", IOSEnum.LOCK_TYPE.code("出库锁"));
|
||||
iStructattrService.updateStatusByCode("0", lock_map);
|
||||
//创建任务
|
||||
JSONObject taskForm = new JSONObject();
|
||||
taskForm.put("task_type", "STOutTask");
|
||||
taskForm.put("TaskCode", CodeUtil.getNewCode("TASK_CODE"));
|
||||
taskForm.put("PickingLocation", obj.getString("struct_code"));
|
||||
taskForm.put("PlacedLocation", outPoint);
|
||||
taskForm.put("vehicle_code", obj.getString("storagevehicle_code"));
|
||||
StOutTask stOutTask = SpringContextHolder.getBean("STOutTask");
|
||||
String taskId = stOutTask.create(taskForm);
|
||||
//更新任务id
|
||||
ioStorInvDisMapper.update(new IOStorInvDis(), new LambdaUpdateWrapper<IOStorInvDis>()
|
||||
.set(IOStorInvDis::getTask_id, taskId)
|
||||
.set(IOStorInvDis::getPoint_code, outPoint)
|
||||
.set(IOStorInvDis::getFloor_code, floor_code)
|
||||
.eq(IOStorInvDis::getIostorinvdis_id, disId)
|
||||
);
|
||||
//更新组盘记录表
|
||||
mdPbGroupplateMapper.update(new GroupPlate(), new LambdaUpdateWrapper<>(GroupPlate.class)
|
||||
.set(GroupPlate::getFrozen_qty, plateDao.getQty())
|
||||
.eq(GroupPlate::getGroup_id, obj.getString("group_id"))
|
||||
);
|
||||
}
|
||||
JSONObject ret = new JSONObject();
|
||||
ret.put("status", String.valueOf(HttpStatus.HTTP_OK));
|
||||
ret.put("message","操作成功");
|
||||
|
||||
@@ -31,9 +31,9 @@ public class GetMaterialInfoTask {
|
||||
//定时任务
|
||||
@SneakyThrows
|
||||
public void run(String params) {
|
||||
log.info("定时器正在执行下发任务调度...");
|
||||
log.info("定时器正在执行【获取物料信息】调度...");
|
||||
requestErp(params);
|
||||
log.info("定时器执行下发任务调度结束...");
|
||||
log.info("定时器执行【获取物料信息】调度结束...");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
package org.nl.wms.sch_manage.service.util;
|
||||
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
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;
|
||||
import org.nl.wms.warehouse_manage.service.ReturnService;
|
||||
import org.nl.wms.warehouse_manage.service.dao.IOStorInv;
|
||||
import org.nl.wms.warehouse_manage.service.dao.IOStorInvDis;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static org.nl.wms.ext_manage.enums.EXTConstant.GET_MATERIAL_INFO_ERP_API;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class UploadErpTask {
|
||||
@Autowired
|
||||
private ISysParamService paramService;
|
||||
|
||||
@Autowired
|
||||
private ReturnService returnService;
|
||||
|
||||
//定时任务
|
||||
@SneakyThrows
|
||||
public void run() {
|
||||
log.info("定时器正在执行【回传ERP】调度...");
|
||||
uploadErpErp();
|
||||
log.info("定时器执行【回传ERP】调度结束...");
|
||||
}
|
||||
|
||||
/**
|
||||
* 定时下发任务
|
||||
*/
|
||||
@Transactional
|
||||
void uploadErpErp() {
|
||||
try {
|
||||
Map whereJson = new HashMap<>();
|
||||
whereJson.put("bill_status", "99");
|
||||
whereJson.put("is_upload", "1");
|
||||
whereJson.put("is_delete", "0");
|
||||
List<IOStorInv> ioStorInvs = returnService.queryAll(whereJson);
|
||||
JSONObject uploadvWhereJson = new JSONObject();
|
||||
uploadvWhereJson.put("rows", ioStorInvs);
|
||||
returnService.upload(uploadvWhereJson);
|
||||
} catch (Exception e) {
|
||||
//网络不通
|
||||
String msg = e.getMessage();
|
||||
log.error("连接失败:{}", msg);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.warehouse_manage.service.dao.IOStorInv;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@@ -27,6 +28,15 @@ public interface ReturnService extends IService<IOStorInv> {
|
||||
*/
|
||||
IPage<IOStorInv> queryAll(Map whereJson, PageQuery page);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param whereJson : {查询参数}
|
||||
* @return 返回结果
|
||||
*/
|
||||
List<IOStorInv> queryAll(Map whereJson);
|
||||
|
||||
/**
|
||||
* 回传
|
||||
* @param whereJson {
|
||||
|
||||
@@ -1129,8 +1129,16 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void taskFinish(SchBaseTask task) {
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
String currentUserId = "";
|
||||
String nickName = "";
|
||||
try {
|
||||
currentUserId = SecurityUtils.getCurrentUserId();
|
||||
nickName = SecurityUtils.getCurrentNickName();
|
||||
}
|
||||
catch (Exception e){
|
||||
currentUserId = "OtherSys";
|
||||
nickName= "OtherSys";
|
||||
}
|
||||
String now = DateUtil.now();
|
||||
IOStorInvDis ioStorInvDis = ioStorInvDisMapper.selectOne(new LambdaQueryWrapper<>(IOStorInvDis.class)
|
||||
.eq(IOStorInvDis::getTask_id, task.getTask_id())
|
||||
|
||||
@@ -678,8 +678,17 @@ public class RawAssistIStorServiceImpl extends ServiceImpl<IOStorInvMapper, IOSt
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void taskFinish(SchBaseTask task) {
|
||||
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
String currentUserId = "";
|
||||
String nickName = "";
|
||||
try {
|
||||
currentUserId = SecurityUtils.getCurrentUserId();
|
||||
nickName = SecurityUtils.getCurrentNickName();
|
||||
}
|
||||
catch (Exception e){
|
||||
currentUserId = "OtherSys";
|
||||
nickName= "OtherSys";
|
||||
}
|
||||
|
||||
String now = DateUtil.now();
|
||||
|
||||
IOStorInvDis ioStorInvDis = ioStorInvDisMapper.selectOne(new LambdaQueryWrapper<>(IOStorInvDis.class)
|
||||
|
||||
@@ -94,6 +94,31 @@ public class RetrunServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv> i
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IOStorInv> queryAll(Map whereJson) {
|
||||
String stor_id = MapUtil.getStr(whereJson, "stor_id");
|
||||
String io_type = MapUtil.getStr(whereJson, "io_type");
|
||||
String bill_type = MapUtil.getStr(whereJson, "bill_type");
|
||||
String bill_code = MapUtil.getStr(whereJson, "bill_code");
|
||||
String is_upload = MapUtil.getStr(whereJson, "is_upload");
|
||||
String begin_time = MapUtil.getStr(whereJson, "begin_time");
|
||||
String end_time = MapUtil.getStr(whereJson, "end_time");
|
||||
|
||||
LambdaQueryWrapper<IOStorInv> lambda = new QueryWrapper<IOStorInv>().lambda();
|
||||
lambda.eq(ObjectUtil.isNotEmpty(stor_id), IOStorInv::getStor_id, stor_id);
|
||||
lambda.eq(ObjectUtil.isNotEmpty(io_type), IOStorInv::getIo_type, io_type);
|
||||
lambda.eq(ObjectUtil.isNotEmpty(bill_type), IOStorInv::getBill_type, bill_type);
|
||||
lambda.like(ObjectUtil.isNotEmpty(bill_code), IOStorInv::getBill_code, bill_code);
|
||||
lambda.eq(ObjectUtil.isNotEmpty(is_upload), IOStorInv::getIs_upload, is_upload);
|
||||
lambda.ge(ObjectUtil.isNotEmpty(begin_time), IOStorInv::getInput_time, begin_time);
|
||||
lambda.lt(ObjectUtil.isNotEmpty(end_time), IOStorInv::getInput_time, end_time);
|
||||
lambda.eq(IOStorInv::getIs_delete, BaseDataEnum.IS_YES_NOT.code("否"));
|
||||
lambda.eq(IOStorInv::getBill_status, IOSEnum.BILL_STATUS.code("完成"));
|
||||
lambda.orderByDesc(IOStorInv::getInput_time);
|
||||
return this.baseMapper.selectList(lambda);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void upload(JSONObject whereJson) {
|
||||
List<JSONObject> rows = whereJson.getJSONArray("rows").toJavaList(JSONObject.class);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
server:
|
||||
port: 8011
|
||||
port: 8012
|
||||
#配置数据源
|
||||
spring:
|
||||
main:
|
||||
@@ -9,7 +9,7 @@ spring:
|
||||
druid:
|
||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:2306}/${DB_NAME:fujia}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
||||
url: jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:fujia}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
||||
# url: jdbc:mysql://${DB_HOST:localhost}:${DB_PORT:3306}/${DB_NAME:wms_oulun}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
||||
username: ${DB_USER:root}
|
||||
password: ${DB_PWD:123456}
|
||||
|
||||
@@ -0,0 +1,139 @@
|
||||
server:
|
||||
port: 8011
|
||||
#配置数据源
|
||||
spring:
|
||||
main:
|
||||
allow-bean-definition-overriding: true
|
||||
allow-circular-references: true
|
||||
datasource:
|
||||
druid:
|
||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:2306}/${DB_NAME:fujia_lms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
||||
# url: jdbc:mysql://${DB_HOST:localhost}:${DB_PORT:3306}/${DB_NAME:wms_oulun}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
||||
username: ${DB_USER:root}
|
||||
password: ${DB_PWD:P@ssw0rd}
|
||||
# 初始连接数
|
||||
initial-size: 15
|
||||
# 最小连接数
|
||||
min-idle: 25
|
||||
# 最大连接数
|
||||
max-active: 40
|
||||
# 是否自动回收超时连接
|
||||
remove-abandoned: true
|
||||
# 超时时间(以秒数为单位)
|
||||
remove-abandoned-timeout: 180
|
||||
# 获取连接超时时间
|
||||
max-wait: 9000
|
||||
# 连接有效性检测时间
|
||||
time-between-eviction-runs-millis: 20000
|
||||
# 连接在池中最小生存的时间
|
||||
min-evictable-idle-time-millis: 300000
|
||||
# 连接在池中最大生存的时间
|
||||
max-evictable-idle-time-millis: 900000
|
||||
# 指明连接是否被空闲连接回收器(如果有)进行检验.如果检测失败,则连接将被从池中去除
|
||||
test-while-idle: true
|
||||
# 指明是否在从池中取出连接前进行检验,如果检验失败, 则从池中去除连接并尝试取出另一个
|
||||
test-on-borrow: false
|
||||
# 是否在归还到池中前进行检验
|
||||
test-on-return: false
|
||||
# 检测连接是否有效
|
||||
validation-query: select 1 from dual
|
||||
# 配置监控统计
|
||||
webStatFilter:
|
||||
enabled: true
|
||||
stat-view-servlet:
|
||||
enabled: true
|
||||
url-pattern: /druid/*
|
||||
reset-enable: false
|
||||
allow: 127.0.0.1
|
||||
filters:
|
||||
DruidFilter,stat
|
||||
log-abandoned: false
|
||||
keep-alive: true
|
||||
keep-alive-between-time-millis: 20000
|
||||
|
||||
redis:
|
||||
#数据库索引
|
||||
database: ${REDIS_DB:1}
|
||||
#host: ${REDIS_HOST:127.0.0.1}
|
||||
host: ${REDIS_HOST:localhost}
|
||||
port: ${REDIS_PORT:6380}
|
||||
password: ${REDIS_PWD:}
|
||||
#连接超时时间
|
||||
timeout: 5000
|
||||
redisson:
|
||||
config: |
|
||||
threads: 4
|
||||
nettyThreads: 4
|
||||
singleServerConfig:
|
||||
connectionMinimumIdleSize: 8
|
||||
connectionPoolSize: 8
|
||||
address: redis://127.0.0.1:6379
|
||||
idleConnectionTimeout: 10000
|
||||
timeout: 3000
|
||||
|
||||
# 登录相关配置
|
||||
login:
|
||||
# 登录缓存
|
||||
cache-enable: true
|
||||
# 是否限制单用户登录
|
||||
single-login: false
|
||||
# 验证码
|
||||
login-code:
|
||||
# 验证码类型配置 查看 LoginProperties 类
|
||||
code-type: arithmetic
|
||||
# 登录图形验证码有效时间/分钟
|
||||
expiration: 2
|
||||
# 验证码高度
|
||||
width: 111
|
||||
# 验证码宽度
|
||||
heigth: 36
|
||||
# 内容长度
|
||||
length: 2
|
||||
# 字体名称,为空则使用默认字体
|
||||
font-name:
|
||||
# 字体大小
|
||||
font-size: 25
|
||||
|
||||
#jwt
|
||||
jwt:
|
||||
header: Authorization
|
||||
# 令牌前缀
|
||||
token-start-with: Bearer
|
||||
# 必须使用最少88位的Base64对该令牌进行编码
|
||||
base64-secret: ZmQ0ZGI5NjQ0MDQwY2I4MjMxY2Y3ZmI3MjdhN2ZmMjNhODViOTg1ZGE0NTBjMGM4NDA5NzYxMjdjOWMwYWRmZTBlZjlhNGY3ZTg4Y2U3YTE1ODVkZDU5Y2Y3OGYwZWE1NzUzNWQ2YjFjZDc0NGMxZWU2MmQ3MjY1NzJmNTE0MzI=
|
||||
# 令牌过期时间 此处单位/毫秒 ,默认4小时,可在此网站生成 https://www.convertworld.com/zh-hans/time/milliseconds.html
|
||||
token-validity-in-seconds: 14400000
|
||||
# 在线用户key
|
||||
online-key: online-token-
|
||||
# 验证码
|
||||
code-key: code-key-
|
||||
# token 续期检查时间范围(默认30分钟,单位毫秒),在token即将过期的一段时间内用户操作了,则给用户的token续期
|
||||
detect: 1800000
|
||||
# 续期时间范围,默认1小时,单位毫秒
|
||||
renew: 3600000
|
||||
|
||||
sa-token:
|
||||
# token 名称 (同时也是cookie名称)
|
||||
token-name: Authorization
|
||||
# token 有效期,单位s 默认30天, -1代表永不过期
|
||||
timeout: 2592000
|
||||
# token 临时有效期 (指定时间内无操作就视为token过期) 单位: 秒
|
||||
activity-timeout: -1
|
||||
# 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
|
||||
is-concurrent: true
|
||||
# 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
|
||||
is-share: false
|
||||
# token风格
|
||||
token-style: random-128
|
||||
# 是否输出操作日志
|
||||
is-log: false
|
||||
jwt-secret-key: opsjajisdnnca0sdkksdfaaasdfwwq
|
||||
# token 前缀
|
||||
token-prefix:
|
||||
is-read-cookie: false
|
||||
is-print: false
|
||||
lucene:
|
||||
index:
|
||||
path: D:\lms\lucene\index
|
||||
@@ -1,8 +1,8 @@
|
||||
ENV = 'development'
|
||||
|
||||
# 接口地址
|
||||
VUE_APP_BASE_API = 'http://localhost:8011'
|
||||
VUE_APP_WS_API = 'ws://localhost:8011'
|
||||
VUE_APP_BASE_API = 'http://localhost:8012'
|
||||
VUE_APP_WS_API = 'ws://localhost:8012'
|
||||
|
||||
# 是否启用 babel-plugin-dynamic-import-node插件
|
||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||
|
||||
@@ -2,6 +2,6 @@ ENV = 'production'
|
||||
|
||||
# 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇,Nginx 配置
|
||||
# 接口地址,注意协议,如果你没有配置 ssl,需要将 https 改为 http
|
||||
VUE_APP_BASE_API = 'http://192.168.229.10:8011'
|
||||
VUE_APP_BASE_API = 'http://172.19.10.72:8011'
|
||||
# 如果接口是 http 形式, wss 需要改为 ws
|
||||
VUE_APP_WS_API = 'ws://192.168.229.10:8011'
|
||||
VUE_APP_WS_API = 'ws://172.19.10.72:8011'
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
window.g = {
|
||||
dev: {
|
||||
VUE_APP_BASE_API: 'http://127.0.0.1:8011'
|
||||
VUE_APP_BASE_API: 'http://127.0.0.1:8012'
|
||||
},
|
||||
prod: {
|
||||
VUE_APP_BASE_API: 'http://127.0.0.1:8011'
|
||||
VUE_APP_BASE_API: 'http://172.19.10.72:8011'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -26,9 +26,9 @@
|
||||
<el-form-item label="物料名称" prop="material_name">
|
||||
<el-input v-model="form.material_name" disabled style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="批次" prop="pcsn">
|
||||
<!-- <el-form-item label="批次" prop="pcsn">
|
||||
<el-input v-model="form.pcsn" disabled style="width: 210px" />
|
||||
</el-form-item>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-input v-model="dict.label.GROUP_STATUS[form.status]" disabled style="width: 210px" />
|
||||
</el-form-item>
|
||||
|
||||
@@ -94,18 +94,16 @@
|
||||
<el-input v-model="form.storagevehicle_code" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="物料批号" prop="pcsn">
|
||||
<el-input v-model="form.pcsn" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col>-->
|
||||
<el-col :span="8">
|
||||
<el-form-item label="物料数量" prop="qty">
|
||||
<el-input v-model="form.qty" disabled style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="单位" prop="qty_unit_name">
|
||||
<el-select
|
||||
@@ -123,6 +121,8 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="源单号" prop="ext_code">
|
||||
<el-input v-model="form.ext_code" style="width: 200px;" />
|
||||
@@ -130,7 +130,21 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="源单类型" prop="ext_type">
|
||||
<el-input v-model="form.ext_type" style="width: 200px;" />
|
||||
<el-select
|
||||
v-model="form.ext_type"
|
||||
clearable
|
||||
filterable
|
||||
size="mini"
|
||||
placeholder="源单类型"
|
||||
class="filter-item"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.EXT_TYPE"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -189,7 +203,9 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="material_code" label="物料编码" :min-width="flexWidth('material_code',crud.data,'物料编码')" />
|
||||
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
|
||||
<!--
|
||||
<el-table-column prop="pcsn" label="批次" :min-width="flexWidth('pcsn',crud.data,'批次')" />
|
||||
-->
|
||||
<el-table-column prop="status" label="状态" :formatter="formattStatus" :min-width="flexWidth('status',crud.data,'状态')" />
|
||||
<el-table-column prop="qty" label="组盘数量" :formatter="crud.formatNum3" :min-width="100" />
|
||||
<el-table-column prop="remark" label="备注" :min-width="flexWidth('remark',crud.data,'备注')" />
|
||||
@@ -255,7 +271,7 @@ export default {
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
tableEnums: ['md_pb_measureunit#unit_name#measure_unit_id'],
|
||||
// 数据字典
|
||||
dicts: ['is_used', 'GROUP_STATUS'],
|
||||
dicts: ['is_used', 'GROUP_STATUS', 'EXT_TYPE'],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '组盘记录',
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
<el-table-column show-overflow-tooltip min-width="170" prop="plan_qty" label="数量" />
|
||||
<el-table-column show-overflow-tooltip min-width="170" prop="qty_unit_name" label="计量单位名称" />
|
||||
<el-table-column show-overflow-tooltip min-width="150" prop="source_bill_code" label="源单号" />
|
||||
<el-table-column show-overflow-tooltip min-width="150" prop="source_bill_type" label="源单类型" />
|
||||
<el-table-column prop="source_bill_type" label="源单类型" :formatter="source_bill_typeFormat" align="center" />
|
||||
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" min-width="120" fixed="right">
|
||||
<template scope="scope">
|
||||
<el-button
|
||||
@@ -179,7 +179,7 @@ export default {
|
||||
name: 'AddDialog',
|
||||
components: { AddDtl },
|
||||
mixins: [crud(), form(defaultForm)],
|
||||
dicts: ['io_bill_status', 'ST_QUALITY_SCODE', 'ST_INV_IN_TYPE'],
|
||||
dicts: ['io_bill_status', 'ST_QUALITY_SCODE', 'ST_INV_IN_TYPE','EXT_TYPE'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
@@ -313,6 +313,9 @@ export default {
|
||||
})
|
||||
this.form.detail_count = this.form.tableData.length
|
||||
},
|
||||
source_bill_typeFormat(row) {
|
||||
return this.dict.label.EXT_TYPE[row.source_bill_type]
|
||||
},
|
||||
async insertEvent(row) {
|
||||
if (this.form.bill_type === '') {
|
||||
this.crud.notify('请选择业务类型!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
/>
|
||||
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="单位" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="source_bill_code" label="源单号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="source_bill_type" label="源单类型" align="center" />
|
||||
<el-table-column prop="source_bill_type" label="源单类型" :formatter="source_bill_typeFormat" align="center" />
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-card class="box-card" shadow="never" :body-style="{padding:'20px 20px 0 20px'}">
|
||||
@@ -194,7 +194,7 @@ export default {
|
||||
name: 'DivDialog',
|
||||
components: { StructDiv },
|
||||
mixins: [crud()],
|
||||
dicts: ['io_bill_status'],
|
||||
dicts: ['io_bill_status','EXT_TYPE'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
@@ -304,6 +304,9 @@ export default {
|
||||
this.sect_code = val[1]
|
||||
}
|
||||
},
|
||||
source_bill_typeFormat(row) {
|
||||
return this.dict.label.EXT_TYPE[row.source_bill_type]
|
||||
},
|
||||
tableChanged(row) {
|
||||
// 新增一行物料时,给行进行赋值
|
||||
for (let i = 0; i < this.form.tableMater.length; i++) {
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
||||
<el-table-column prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
|
||||
<el-table-column prop="qty_unit_name" label="单位" align="center" />
|
||||
<el-table-column prop="source_bill_type" label="源单类型" align="center" width="130px" />
|
||||
<el-table-column prop="source_bill_type" label="源单类型" :formatter="source_bill_typeFormat" align="center" width="130px" />
|
||||
<el-table-column prop="source_bill_code" label="源单号" align="center" width="130px" />
|
||||
<el-table-column show-overflow-tooltip prop="remark" label="明细备注" align="center" />
|
||||
</el-table>
|
||||
@@ -156,7 +156,7 @@ export default {
|
||||
name: 'ViewDialog',
|
||||
components: { },
|
||||
mixins: [crud()],
|
||||
dicts: ['io_bill_status', 'work_status', 'task_status', 'SCH_TASK_TYPE_DTL', 'INANDOUT_BILL_TYPE'],
|
||||
dicts: ['io_bill_status', 'work_status', 'task_status', 'SCH_TASK_TYPE_DTL', 'INANDOUT_BILL_TYPE','EXT_TYPE'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
@@ -209,6 +209,9 @@ export default {
|
||||
bill_statusFormat(row) {
|
||||
return this.dict.label.io_bill_status[row.bill_status]
|
||||
},
|
||||
source_bill_typeFormat(row) {
|
||||
return this.dict.label.EXT_TYPE[row.source_bill_type]
|
||||
},
|
||||
taskdtl_typeFormat(row) {
|
||||
return this.dict.label.SCH_TASK_TYPE_DTL[row.taskdtl_type]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user