Merge remote-tracking branch 'origin/dev' into dev

pro
郑明梁 2 years ago
commit 2d685b75d9

@ -188,7 +188,7 @@ public class InvInnerOrderPrintController {
} else {
Map<String, Object> data = new HashMap<String, Object>();
data.put("data", printEntities);
JasperUtils.jasperReport(request, response, data, filePath + "/pdf/template/" + systemPDFTemplateEntity.getPath(), "pdf");
JasperUtils.jasperReport(request, response, data, filePath + "/pdf/template/" + FileUtils.getLastFileName(systemPDFTemplateEntity.getPath()), "pdf");
}
@ -231,7 +231,7 @@ public class InvInnerOrderPrintController {
@RequestBody InspectionPDFTemplateRequest inspectionPDFTemplateRequest) throws Exception {
//查询模板文件是否存在
SysPdfTemplateRelevanceStatemenEntity sysPdfTemplateRelevanceStatemenEntity = systemPDFModuleService.selectByStatemenId(inspectionPDFTemplateRequest.getLabelId()+"");
SysPdfTemplateRelevanceStatemenEntity sysPdfTemplateRelevanceStatemenEntity = systemPDFModuleService.selectByStatemenId(inspectionPDFTemplateRequest.getLabelId() + "");
if (null == sysPdfTemplateRelevanceStatemenEntity) {
return ResultVOUtils.error(ResultEnum.DATA_NOT, "所属模块错误");
}
@ -249,7 +249,7 @@ public class InvInnerOrderPrintController {
@RequestBody InnerOrderQRCodeTextPDFTemplateRequest stockQRCodeTextPDFTemplateRequest,
HttpServletRequest request, HttpServletResponse response) throws Exception {
SysPdfTemplateRelevanceStatemenEntity sysPdfTemplateRelevanceStatemenEntity = systemPDFModuleService.selectByStatemenId(stockQRCodeTextPDFTemplateRequest.getLabelId()+"");
SysPdfTemplateRelevanceStatemenEntity sysPdfTemplateRelevanceStatemenEntity = systemPDFModuleService.selectByStatemenId(stockQRCodeTextPDFTemplateRequest.getLabelId() + "");
if (sysPdfTemplateRelevanceStatemenEntity == null) return ResultVOUtils.error(500, "未找到单据模板模块设置,请检查");
SystemPDFTemplateEntity systemPDFTemplateEntity =
@ -281,10 +281,10 @@ public class InvInnerOrderPrintController {
}
}
Map<String,Object> map=new HashMap<>();
map.put("data",printEntities);
Map<String, Object> map = new HashMap<>();
map.put("data", printEntities);
String param = JSON.toJSONString(map);
JasperUtils.jasperReport(request, response, param, filePath + "/pdf/template/" + systemPDFTemplateEntity.getPath(), "pdf");
JasperUtils.jasperReport(request, response, param, filePath + "/pdf/template/" + FileUtils.getLastFileName(systemPDFTemplateEntity.getPath()), "pdf");
String orderId = "";
for (InnerOrderPrintResponse InnerOrderPrintResponse : mStockPrintEntities) {

@ -80,7 +80,7 @@ public class ThrDeptController {
}
thrDeptEntity.setUpdateTime(new Date());
thrDeptEntity.setId(IdUtil.getSnowflakeNextId());
boolean b = thrDeptService.insertInvWarehouse(thrDeptEntity);
boolean b = thrDeptService.insertThrDept(thrDeptEntity);
if (!b) {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
}

@ -16,9 +16,9 @@ public interface ThrDeptDao extends BaseMapperPlus<ThrDeptDao,ThrDeptEntity,ThrD
List<ThrDeptEntity> filterThrGroupInvWarehouse(FilterThrDeptRequest filterThrDeptRequest);
boolean insertThrInvWarehouse(ThrDeptEntity thrDeptEntity);
boolean insertThrDept(ThrDeptEntity thrDeptEntity);
boolean insertInvWarehouses(@Param("thrInvWarehouseEntitys") List<ThrDeptEntity> thrDeptEntities);
boolean insertThrDeptList(@Param("thrDeptEntities") List<ThrDeptEntity> thrDeptEntities);
boolean updateThrInvWarehouse(ThrDeptEntity thrDeptEntity);

@ -167,6 +167,7 @@ public class IoOrderServiceImpl implements IoOrderService {
orderEntity.setRelKey(UUID.fastUUID().toString(true));
}
orderEntity.setExportStatus(0); //上传状态:未上传
orderEntity.setInCodeStatus(0);
return orderDao.insert(orderEntity);
}

@ -20,9 +20,9 @@ public interface ThrDeptService extends IService<ThrDeptEntity> {
List<ThrDeptEntity> filterGroupInvWarehouse(FilterThrDeptRequest filterThrDeptRequest);
boolean insertInvWarehouse(ThrDeptEntity thrDeptEntity);
boolean insertThrDept(ThrDeptEntity thrDeptEntity);
boolean insertInvWarehouses(List<ThrDeptEntity> thrDeptEntities);
boolean insertThrDeptList(List<ThrDeptEntity> thrDeptEntities);
boolean updateInvWarehouse(ThrDeptEntity thrDeptEntity);

@ -1,6 +1,5 @@
package com.glxp.api.service.thrsys.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.IdUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@ -79,13 +78,13 @@ public class ThrDeptServiceImpl extends ServiceImpl<ThrDeptDao, ThrDeptEntity> i
}
@Override
public boolean insertInvWarehouse(ThrDeptEntity thrDeptEntity) {
return thrDeptDao.insertThrInvWarehouse(thrDeptEntity);
public boolean insertThrDept(ThrDeptEntity thrDeptEntity) {
return thrDeptDao.insertThrDept(thrDeptEntity);
}
@Override
public boolean insertInvWarehouses(List<ThrDeptEntity> thrDeptEntities) {
return thrDeptDao.insertInvWarehouses(thrDeptEntities);
public boolean insertThrDeptList(List<ThrDeptEntity> thrDeptEntities) {
return thrDeptDao.insertThrDeptList(thrDeptEntities);
}
@Override
@ -137,6 +136,7 @@ public class ThrDeptServiceImpl extends ServiceImpl<ThrDeptDao, ThrDeptEntity> i
if (baseResponse.getCode() == 20000) {
List<UdiwmsWarehouseDetail> responseList = baseResponse.getData().getList();
List<ThrDeptEntity> list = new ArrayList<>();
List<ThrInvWarehouseEntity> warehouseList = new ArrayList<>();
for (UdiwmsWarehouseDetail response : responseList) {
ThrDeptEntity thrDeptEntity = new ThrDeptEntity();
thrDeptEntity.setPid(0);
@ -146,27 +146,24 @@ public class ThrDeptServiceImpl extends ServiceImpl<ThrDeptDao, ThrDeptEntity> i
thrDeptEntity.setAdvanceType(false); //默认是仓库
thrDeptEntity.setStatus(1);//默认启用
thrDeptEntity.setUpdateTime(new Date());
thrDeptEntity.setId(IdUtil.getSnowflake(6, 1).nextId());
list.add(thrDeptEntity);
List<UdiwmsWarehouseDetail.SubWarehouse> subWarehouseList = response.getSubWarehouses();
if (CollUtil.isNotEmpty(subWarehouseList)) {
for (UdiwmsWarehouseDetail.SubWarehouse subWarehouse : subWarehouseList) {
ThrInvWarehouseEntity thrInvWarehouseEntity = new ThrInvWarehouseEntity();
thrInvWarehouseEntity.setCode(subWarehouse.getCode());
thrInvWarehouseEntity.setName(subWarehouse.getName());
thrInvWarehouseEntity.setRemark(subWarehouse.getRemark());
thrInvWarehouseEntity.setThirdSysFk(thirdSysFk);
thrInvWarehouseEntity.setParentId(response.getCode());
thrInvWarehouseEntity.setId(IdUtil.getSnowflake(6, 1).nextId() + "");
thrInvWarehouseEntity.setUpdateTime(new Date());
thrInvWarehouseDao.insertThrInvWarehouse(thrInvWarehouseEntity);
}
}
ThrInvWarehouseEntity thrInvWarehouseEntity = new ThrInvWarehouseEntity();
thrInvWarehouseEntity.setCode(response.getCode());
thrInvWarehouseEntity.setName(response.getName());
thrInvWarehouseEntity.setRemark(response.getRemark());
thrInvWarehouseEntity.setThirdSysFk(thirdSysFk);
thrInvWarehouseEntity.setParentId(response.getCode());
thrInvWarehouseEntity.setId(IdUtil.getSnowflake(6, 1).nextId() + "");
thrInvWarehouseEntity.setUpdateTime(new Date());
warehouseList.add(thrInvWarehouseEntity);
}
//插入数据
thrDeptDao.insertInvWarehouses(list);
thrDeptDao.insertThrDeptList(list);
thrInvWarehouseDao.insertThrInvWarehouses(warehouseList);
if (list.size() >= limit) {
page++;
} else {

@ -1,5 +1,7 @@
package com.glxp.api.util;
import cn.hutool.core.util.StrUtil;
import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
import java.io.File;
@ -529,6 +531,16 @@ public class FileUtils {
}
}
public static String getLastFileName(String fileName) {
String fileNameNow = fileName.substring(fileName.lastIndexOf("/") + 1);
if (StrUtil.isEmpty(fileNameNow))
return fileName;
else
return fileNameNow;
}
/**
*
*

@ -79,7 +79,7 @@
</where>
</select>
<insert id="insertThrInvWarehouse" keyProperty="id"
<insert id="insertThrDept" keyProperty="id"
parameterType="com.glxp.api.entity.thrsys.ThrDeptEntity">
replace
INTO thr_dept
@ -99,20 +99,20 @@
)
</insert>
<insert id="insertThrInvWarehouses" parameterType="java.util.List">
replace INTO thr_dept
(pid, code, name, advanceType, isDefault,
status, updateTime, remark, thirdSysFk)
VALUES
<foreach collection="thrDeptEntities" item="item" index="index"
separator=",">
(
#{item.pid}, #{item.code},
#{item.name}, #{item.advanceType}, #{item.isDefault},
#{item.status}, #{item.updateTime},
#{item.remark}, #{item.thirdSysFk})
</foreach>
</insert>
<!-- <insert id="insertThrDeptList" parameterType="java.util.List">-->
<!-- replace INTO thr_dept-->
<!-- (pid, code, name, advanceType, isDefault,-->
<!-- status, updateTime, remark, thirdSysFk)-->
<!-- VALUES-->
<!-- <foreach collection="thrDeptEntities" item="item" index="index"-->
<!-- separator=",">-->
<!-- (-->
<!-- #{item.pid}, #{item.code},-->
<!-- #{item.name}, #{item.advanceType}, #{item.isDefault},-->
<!-- #{item.status}, #{item.updateTime},-->
<!-- #{item.remark}, #{item.thirdSysFk})-->
<!-- </foreach>-->
<!-- </insert>-->
<delete id="deleteById" parameterType="Map">
DELETE
@ -174,13 +174,14 @@
</if>
</where>
</select>
<insert id="insertInvWarehouses">
replace into thr_dept (pid, code, `name`, advanceType, isDefault, status, updateTime, remark, `level`,
<insert id="insertThrDeptList">
replace into thr_dept (id,pid, code, `name`, advanceType, isDefault, status, updateTime, remark, `level`,
pcode,
thirdSysFk)
values
<foreach collection="thrDeptEntities" index="index" item="item" separator=",">
(#{item.pid},
(#{item.id},
#{item.pid},
#{item.code},
#{item.name},
#{item.advanceType},

@ -101,7 +101,7 @@
replace INTO thr_inv_warehouse
(id, code, `name`, parentId, remark, thirdSysFk,updateTime)
VALUES
<foreach collection="thrDeptEntities" item="item" index="index"
<foreach collection="thrInvWarehouseEntitys" item="item" index="index"
separator=",">
(
#{item.id}, #{item.code},

Loading…
Cancel
Save