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

pro
郑明梁 2 years ago
commit 2d685b75d9

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

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

@ -16,9 +16,9 @@ public interface ThrDeptDao extends BaseMapperPlus<ThrDeptDao,ThrDeptEntity,ThrD
List<ThrDeptEntity> filterThrGroupInvWarehouse(FilterThrDeptRequest filterThrDeptRequest); 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); boolean updateThrInvWarehouse(ThrDeptEntity thrDeptEntity);

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

@ -20,9 +20,9 @@ public interface ThrDeptService extends IService<ThrDeptEntity> {
List<ThrDeptEntity> filterGroupInvWarehouse(FilterThrDeptRequest filterThrDeptRequest); 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); boolean updateInvWarehouse(ThrDeptEntity thrDeptEntity);

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

@ -1,5 +1,7 @@
package com.glxp.api.util; package com.glxp.api.util;
import cn.hutool.core.util.StrUtil;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.File; 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> </where>
</select> </select>
<insert id="insertThrInvWarehouse" keyProperty="id" <insert id="insertThrDept" keyProperty="id"
parameterType="com.glxp.api.entity.thrsys.ThrDeptEntity"> parameterType="com.glxp.api.entity.thrsys.ThrDeptEntity">
replace replace
INTO thr_dept INTO thr_dept
@ -99,20 +99,20 @@
) )
</insert> </insert>
<insert id="insertThrInvWarehouses" parameterType="java.util.List"> <!-- <insert id="insertThrDeptList" parameterType="java.util.List">-->
replace INTO thr_dept <!-- replace INTO thr_dept-->
(pid, code, name, advanceType, isDefault, <!-- (pid, code, name, advanceType, isDefault,-->
status, updateTime, remark, thirdSysFk) <!-- status, updateTime, remark, thirdSysFk)-->
VALUES <!-- VALUES-->
<foreach collection="thrDeptEntities" item="item" index="index" <!-- <foreach collection="thrDeptEntities" item="item" index="index"-->
separator=","> <!-- separator=",">-->
( <!-- (-->
#{item.pid}, #{item.code}, <!-- #{item.pid}, #{item.code},-->
#{item.name}, #{item.advanceType}, #{item.isDefault}, <!-- #{item.name}, #{item.advanceType}, #{item.isDefault},-->
#{item.status}, #{item.updateTime}, <!-- #{item.status}, #{item.updateTime},-->
#{item.remark}, #{item.thirdSysFk}) <!-- #{item.remark}, #{item.thirdSysFk})-->
</foreach> <!-- </foreach>-->
</insert> <!-- </insert>-->
<delete id="deleteById" parameterType="Map"> <delete id="deleteById" parameterType="Map">
DELETE DELETE
@ -174,13 +174,14 @@
</if> </if>
</where> </where>
</select> </select>
<insert id="insertInvWarehouses"> <insert id="insertThrDeptList">
replace into thr_dept (pid, code, `name`, advanceType, isDefault, status, updateTime, remark, `level`, replace into thr_dept (id,pid, code, `name`, advanceType, isDefault, status, updateTime, remark, `level`,
pcode, pcode,
thirdSysFk) thirdSysFk)
values values
<foreach collection="thrDeptEntities" index="index" item="item" separator=","> <foreach collection="thrDeptEntities" index="index" item="item" separator=",">
(#{item.pid}, (#{item.id},
#{item.pid},
#{item.code}, #{item.code},
#{item.name}, #{item.name},
#{item.advanceType}, #{item.advanceType},

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

Loading…
Cancel
Save