Merge remote-tracking branch 'origin/master'

master
chengqf 2 years ago
commit 7dbf8a73ca

@ -162,6 +162,7 @@ public class DeptController extends BaseController {
List<DeptEntity> invWarehouseEntities; List<DeptEntity> invWarehouseEntities;
AuthAdmin authAdmin = customerService.getUserBean(); AuthAdmin authAdmin = customerService.getUserBean();
if (authAdmin.getCustomerId().equals("110")) { if (authAdmin.getCustomerId().equals("110")) {
filterInvWarehouseRequest.setCustomerId("110");
filterInvWarehouseRequest.setUserId(authAdmin.getId()); filterInvWarehouseRequest.setUserId(authAdmin.getId());
} else { } else {
filterInvWarehouseRequest.setUserId(null); filterInvWarehouseRequest.setUserId(null);
@ -249,12 +250,12 @@ public class DeptController extends BaseController {
} }
//判断状态 //判断状态
String msg=isCheckStatus(deptEntity.getStatus(),deptEntity); String msg = isCheckStatus(deptEntity.getStatus(), deptEntity);
if(msg!=""){ if (msg != "") {
return ResultVOUtils.error(999,msg); return ResultVOUtils.error(999, msg);
} }
//判断供应商状态 //判断供应商状态
if(deptEntity.isSpUse()==false){ if (deptEntity.getSpUse() == false) {
FilterDeptUserReqeust filterDeptUserReqeust = new FilterDeptUserReqeust(); FilterDeptUserReqeust filterDeptUserReqeust = new FilterDeptUserReqeust();
filterDeptUserReqeust.setDeptId(deptEntity.getId().longValue()); filterDeptUserReqeust.setDeptId(deptEntity.getId().longValue());
List<DeptUserEntity> deptUserEntities = deptUserService.selectDeptUser(filterDeptUserReqeust); List<DeptUserEntity> deptUserEntities = deptUserService.selectDeptUser(filterDeptUserReqeust);
@ -294,8 +295,8 @@ public class DeptController extends BaseController {
} }
DeptEntity deptEntity = deptService.selectById(deleteRequest.getId()); DeptEntity deptEntity = deptService.selectById(deleteRequest.getId());
if(deptEntity.getLevel()!=null && deptEntity.getLevel() == 1){ if (deptEntity.getLevel() != null && deptEntity.getLevel() == 1) {
return ResultVOUtils.error(500,"删除失败,一级部门不允许删除!"); return ResultVOUtils.error(500, "删除失败,一级部门不允许删除!");
} }
List<InvWarehouseEntity> invSubWarehouseEntities = invWarehouseService.findByParentId(deptEntity.getCode()); List<InvWarehouseEntity> invSubWarehouseEntities = invWarehouseService.findByParentId(deptEntity.getCode());
@ -309,7 +310,7 @@ public class DeptController extends BaseController {
return ResultVOUtils.error(500, "删除失败,请先移除该部门关联用户信息!"); return ResultVOUtils.error(500, "删除失败,请先移除该部门关联用户信息!");
} }
List<DeptEntity> deptEntities = deptService.selectByPcode(deptEntity.getCode()); List<DeptEntity> deptEntities = deptService.selectByPcode(deptEntity.getCode());
if(deptEntities.size()>0){ if (deptEntities.size() > 0) {
return ResultVOUtils.error(500, "删除失败,请先移除该部门下的子部门!"); return ResultVOUtils.error(500, "删除失败,请先移除该部门下的子部门!");
} }
@ -365,20 +366,20 @@ public class DeptController extends BaseController {
return ResultVOUtils.success(list); return ResultVOUtils.success(list);
} }
public String isCheckStatus(Integer status,DeptEntity deptEntity){ public String isCheckStatus(Integer status, DeptEntity deptEntity) {
//启用的时候需要判断上级是不是被禁用 //启用的时候需要判断上级是不是被禁用
if(status==1){ if (status == 1) {
//查询所有的上级 //查询所有的上级
List<DeptEntity> deptEntityList= deptService.selectupDeptAll(deptEntity.getPcode()); List<DeptEntity> deptEntityList = deptService.selectupDeptAll(deptEntity.getPcode());
for(DeptEntity obj:deptEntityList){ for (DeptEntity obj : deptEntityList) {
if(obj.getStatus()==0){ if (obj.getStatus() == 0) {
return "上级存在禁用的部门修改失败!"; return "上级存在禁用的部门修改失败!";
} }
} }
}else{ } else {
List<DeptEntity> deptEntityList= deptService.selectLowDeptAll(deptEntity.getCode()); List<DeptEntity> deptEntityList = deptService.selectLowDeptAll(deptEntity.getCode());
for(DeptEntity obj:deptEntityList){ for (DeptEntity obj : deptEntityList) {
if(obj.getStatus()==1){ if (obj.getStatus() == 1) {
return "下级存在启用的部门修改失败!"; return "下级存在启用的部门修改失败!";
} }
} }

@ -84,6 +84,9 @@ public class InvWarehouseController extends BaseController {
if (authAdmin.getCustomerId().equals("110")) { if (authAdmin.getCustomerId().equals("110")) {
filterInvWarehouseRequest.setUserId(authAdmin.getId()); filterInvWarehouseRequest.setUserId(authAdmin.getId());
} else { } else {
if(filterInvWarehouseRequest.getType()==1){
filterInvWarehouseRequest.setSpUse(true);
}
filterInvWarehouseRequest.setUserId(null); filterInvWarehouseRequest.setUserId(null);
} }

@ -647,6 +647,7 @@ public class IoCodeTempController extends BaseController {
boolean isBillExit = orderDetailBizService.isExit(orderEntity.getBillNo()); boolean isBillExit = orderDetailBizService.isExit(orderEntity.getBillNo());
if (!isBillExit) { if (!isBillExit) {
orderService.deleteByBillNo(orderEntity.getBillNo());
return ResultVOUtils.error(500, "请先录入业务详情"); return ResultVOUtils.error(500, "请先录入业务详情");
} }
} }
@ -960,6 +961,13 @@ public class IoCodeTempController extends BaseController {
} }
} }
boolean r1 = orderDetailBizService.isExit(orderDetailCodeEntity.getOrderIdFk());
boolean r2 = ioOrderDetailCodeService.isExit(orderDetailCodeEntity.getOrderIdFk());
if (!r1 && !r2) {
orderService.deleteByBillNo(orderDetailCodeEntity.getOrderIdFk());
}
orderEntity.setUpdateUser(getUserId() + ""); orderEntity.setUpdateUser(getUserId() + "");
orderEntity.setUpdateTime(new Date()); orderEntity.setUpdateTime(new Date());
orderService.update(orderEntity); orderService.update(orderEntity);

@ -121,7 +121,8 @@ public class IoOrderDetailBizController extends BaseController {
if (addBizProductReqeust.getOrderEntity() == null) if (addBizProductReqeust.getOrderEntity() == null)
return ResultVOUtils.error(500, "未指定订单"); return ResultVOUtils.error(500, "未指定订单");
IoOrderEntity orderEntity = addBizProductReqeust.getOrderEntity(); IoOrderEntity orderEntity = addBizProductReqeust.getOrderEntity();
if (StrUtil.isEmpty(orderEntity.getBillNo())) { IoOrderEntity isExit = orderService.findByBillNo(orderEntity.getBillNo());
if (StrUtil.isEmpty(orderEntity.getBillNo()) || isExit == null) {
BasicBussinessTypeEntity bussinessTypeEntity = basicBussinessTypeService.findByAction(orderEntity.getAction()); BasicBussinessTypeEntity bussinessTypeEntity = basicBussinessTypeService.findByAction(orderEntity.getAction());
InvWarehouseEntity invWarehouseEntity = invWarehouseService.findByInvSubByCode(orderEntity.getInvCode()); InvWarehouseEntity invWarehouseEntity = invWarehouseService.findByInvSubByCode(orderEntity.getInvCode());
String orderNo = gennerOrderUtils.createScOrderNo(new OrderNoTypeBean(Constant.SCAN_ORDER + StrUtil.trimToEmpty(bussinessTypeEntity.getPrefix()), "yyyyMMdd")); String orderNo = gennerOrderUtils.createScOrderNo(new OrderNoTypeBean(Constant.SCAN_ORDER + StrUtil.trimToEmpty(bussinessTypeEntity.getPrefix()), "yyyyMMdd"));
@ -472,7 +473,19 @@ public class IoOrderDetailBizController extends BaseController {
@PostMapping("/udiwms/inout/order/delBizProduct") @PostMapping("/udiwms/inout/order/delBizProduct")
@Log(title = "单据管理", businessType = BusinessType.DELETE) @Log(title = "单据管理", businessType = BusinessType.DELETE)
public BaseResponse delBizProduct(@RequestBody DeleteRequest deleteRequest) { public BaseResponse delBizProduct(@RequestBody DeleteRequest deleteRequest) {
return orderDetailBizService.deleteById(Integer.parseInt(deleteRequest.getId())) > 0 ? ResultVOUtils.success("删除成功!") : ResultVOUtils.error(500, "删除失败"); IoOrderDetailBizEntity orderDetailBizEntity = orderDetailBizService.selectById(Integer.parseInt(deleteRequest.getId()));
int result = orderDetailBizService.deleteById(Integer.parseInt(deleteRequest.getId()));
if (result > 0) {
boolean r1 = orderDetailBizService.isExit(orderDetailBizEntity.getOrderIdFk());
boolean r2 = orderDetailCodeService.isExit(orderDetailBizEntity.getOrderIdFk());
if (!r1 && !r2) {
orderService.deleteByBillNo(orderDetailBizEntity.getOrderIdFk());
}
return ResultVOUtils.success("删除成功!");
}
return ResultVOUtils.error(500, "删除失败");
} }

@ -20,14 +20,18 @@ import com.glxp.api.entity.inout.*;
import com.glxp.api.entity.system.SystemParamConfigEntity; import com.glxp.api.entity.system.SystemParamConfigEntity;
import com.glxp.api.req.inout.FilterOrderDetailResultRequest; import com.glxp.api.req.inout.FilterOrderDetailResultRequest;
import com.glxp.api.req.inout.ReviewFinishRequest; import com.glxp.api.req.inout.ReviewFinishRequest;
import com.glxp.api.req.inout.ReviewSpmsRequest;
import com.glxp.api.req.inout.UpdateExportStatusRequest; import com.glxp.api.req.inout.UpdateExportStatusRequest;
import com.glxp.api.req.sync.SpsSyncDataRequest;
import com.glxp.api.res.PageSimpleResponse; import com.glxp.api.res.PageSimpleResponse;
import com.glxp.api.res.inout.AcceptOrderResponse; import com.glxp.api.res.inout.AcceptOrderResponse;
import com.glxp.api.res.inout.IoOrderDetailResultResponse; import com.glxp.api.res.inout.IoOrderDetailResultResponse;
import com.glxp.api.res.sync.SpsSyncOrderResponse;
import com.glxp.api.service.auth.AuthAdminService; import com.glxp.api.service.auth.AuthAdminService;
import com.glxp.api.service.basic.EntrustReceService; import com.glxp.api.service.basic.EntrustReceService;
import com.glxp.api.service.basic.IBasicBussinessTypeService; import com.glxp.api.service.basic.IBasicBussinessTypeService;
import com.glxp.api.service.inout.*; import com.glxp.api.service.inout.*;
import com.glxp.api.service.sync.SpsSyncDownloadService;
import com.glxp.api.service.system.SystemParamConfigService; import com.glxp.api.service.system.SystemParamConfigService;
import com.glxp.api.util.CustomUtil; import com.glxp.api.util.CustomUtil;
import com.glxp.api.util.GennerOrderUtils; import com.glxp.api.util.GennerOrderUtils;
@ -414,4 +418,30 @@ public class IoOrderReviewController extends BaseController {
return ResultVOUtils.success("更新成功"); return ResultVOUtils.success("更新成功");
} }
@Resource
SpsSyncDownloadService spsSyncDownloadService;
// UDI管理系统获取验收单据信息
@AuthRuleAnnotation("")
@PostMapping("/udiwms/order/getReviews")
public BaseResponse getReviewOrderSpms(@RequestBody ReviewSpmsRequest reviewSpmsRequest) {
String billNo = reviewSpmsRequest.getBillNo();
if (StrUtil.isEmpty(reviewSpmsRequest.getBillNo())) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
}
IoOrderEntity orderEntity = orderService.findByBillNo(reviewSpmsRequest.getBillNo());
if (orderEntity.getStatus() == ConstantStatus.ORDER_STATUS_AUDITED) {
return ResultVOUtils.error(500, "单据已审核!");
} else if (orderEntity.getStatus() != ConstantStatus.ORDER_STATUS_CHECK_REW) {
return ResultVOUtils.error(500, "当前单据不处于待审核状态,无法审核!");
}
SpsSyncDataRequest spsSyncDataRequest = new SpsSyncDataRequest();
spsSyncDataRequest.setBillNo(reviewSpmsRequest.getBillNo());
return spsSyncDownloadService.findOrder(spsSyncDataRequest);
}
} }

@ -244,7 +244,6 @@ public class SpsSyncDownloadController {
orderEntity.setId(null); orderEntity.setId(null);
purOrderService.insert(orderEntity); purOrderService.insert(orderEntity);
if (CollUtil.isNotEmpty(spsSyncBusOrderResponse.getPurOrderDetailEntities())) { if (CollUtil.isNotEmpty(spsSyncBusOrderResponse.getPurOrderDetailEntities())) {
List<PurOrderDetailEntity> purOrderDetailEntities = spsSyncBusOrderResponse.getPurOrderDetailEntities(); List<PurOrderDetailEntity> purOrderDetailEntities = spsSyncBusOrderResponse.getPurOrderDetailEntities();
for (PurOrderDetailEntity purOrderDetailEntity : purOrderDetailEntities) { for (PurOrderDetailEntity purOrderDetailEntity : purOrderDetailEntities) {
PurOrderDetailEntity codeTempEntity = new PurOrderDetailEntity(); PurOrderDetailEntity codeTempEntity = new PurOrderDetailEntity();
@ -278,5 +277,11 @@ public class SpsSyncDownloadController {
} }
//接收中继服务、UDI管理系统上传单据类型
//接收中继服务、UDI管理系统上传基础信息
} }

@ -172,18 +172,17 @@ public class ThrProductsAddDiController {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
} }
String remark=thrProductsAddDiEntity.getRemark();
Integer status=thrProductsAddDiEntity.getStatus();
thrProductsAddDiEntity.setAuditTime(new Date()); thrProductsAddDiEntity.setAuditTime(new Date());
thrProductsAddDiEntity.setAuditUser(customerService.getUserId() + ""); thrProductsAddDiEntity.setAuditUser(customerService.getUserId() + "");
thrProductsAddDiService.updateDiProduct(thrProductsAddDiEntity);
thrProductsAddDiEntity = thrProductsAddDiService.selecById(thrProductsAddDiEntity.getId()); thrProductsAddDiEntity = thrProductsAddDiService.selecById(thrProductsAddDiEntity.getId());
//自增的数据就再到第三方产品里面 //自增的数据就再到第三方产品里面
ThrProductsAddDiResponse thrProductsAddDiResponse = thrProductsAddDiService.selecById(thrProductsAddDiEntity.getId()); ThrProductsAddDiResponse thrProductsAddDiResponse = thrProductsAddDiService.selecById(thrProductsAddDiEntity.getId());
if (thrProductsAddDiEntity.getStatus() == 2) { //审核通过 if (status == 2) { //审核通过
//第三方产品审核通过 //第三方产品审核通过
if (thrProductsAddDiEntity.getType() == 2) { if (thrProductsAddDiEntity.getType() == 2) {
ThrProductsEntity thrProductsEntity = new ThrProductsEntity(); ThrProductsEntity thrProductsEntity = new ThrProductsEntity();
@ -255,8 +254,13 @@ public class ThrProductsAddDiController {
} }
} }
} }
thrProductsAddDiEntity.setRemark(remark);
thrProductsAddDiEntity.setStatus(status);
thrProductsAddDiService.updateDiProduct(thrProductsAddDiEntity);
}else {
thrProductsAddDiEntity.setRemark(remark);
thrProductsAddDiEntity.setStatus(status);
thrProductsAddDiService.updateDiProduct(thrProductsAddDiEntity);
} }
return ResultVOUtils.success("更新成功"); return ResultVOUtils.success("更新成功");
} }

@ -28,6 +28,6 @@ public class DeptEntity {
private String thirdId3; private String thirdId3;
private String thirdId4; private String thirdId4;
private boolean spUse; private Boolean spUse;
} }

@ -203,7 +203,7 @@ public class IdcServiceImpl implements IdcService {
} }
} }
private void fetchFailFile(String host) { private void fetchFailFile(String host) {
Map<String,Object> map = new HashMap<String,Object>(); Map<String,Object> map = new HashMap<String,Object>();
map.put("sql", "select * from idc_file where createTime<date_sub(now(),interval 30 minute) order by createTime"); map.put("sql", "select * from idc_file where createTime<date_sub(now(),interval 30 minute) order by createTime");
@ -579,7 +579,7 @@ public class IdcServiceImpl implements IdcService {
Map<String, Object> whereParams = new HashMap<String, Object>(); Map<String, Object> whereParams = new HashMap<String, Object>();
whereParams.put("sqlWhere", params.get("sqlWhere")); whereParams.put("sqlWhere", params.get("sqlWhere"));
String dataWhere = params.get("dataWhere")!=null ? params.get("dataWhere").toString() : ""; String dataWhere = params.get("dataWhere")!=null ? params.get("dataWhere").toString() : "";
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
String where = DBAUtils.convertWhere(column, whereParams, dataWhere); String where = DBAUtils.convertWhere(column, whereParams, dataWhere);
@ -811,7 +811,7 @@ public class IdcServiceImpl implements IdcService {
private boolean analyToDB(String host, String tableName, String uniqueColumn, String private boolean analyToDB(String host, String tableName, String uniqueColumn, String
filePathColumn, List<Map<String, Object>> list, boolean isUpload) { filePathColumn, List<Map<String, Object>> list, boolean isUpload) {
String tName = DBAUtils.tableRealName(tableName); String tName = DBAUtils.tableRealName(tableName);
String sql = "replace " + tName + "("; String sql = "replace " + tName + "(";
String del = "delete from " + tName + " where "; String del = "delete from " + tName + " where ";
@ -1034,27 +1034,27 @@ public class IdcServiceImpl implements IdcService {
int total = 0; int total = 0;
if (result!=null&&result.isSuccessful()&&MediaType.parse("application/force-download").equals(result.body().contentType())) { if (result!=null&&result.isSuccessful()&&MediaType.parse("application/force-download").equals(result.body().contentType())) {
try (InputStream inputStream = result.body().byteStream()) { try (InputStream inputStream = result.body().byteStream()) {
FileOutputStream outputStream = new FileOutputStream(filePath + filePathSlash + imagePath+fileName); FileOutputStream outputStream = new FileOutputStream(filePath + filePathSlash + imagePath+fileName);
byte b[] = new byte[1024]; byte b[] = new byte[1024];
int len = 0; int len = 0;
while ((len = inputStream.read(b)) != -1) { while ((len = inputStream.read(b)) != -1) {
total += len; total += len;
outputStream.write(b, 0, len); outputStream.write(b, 0, len);
} }
outputStream.flush(); outputStream.flush();
outputStream.close(); outputStream.close();
if(!(total>0)) { if(!(total>0)) {
new File(filePath + filePathSlash + imagePath+fileName).delete(); new File(filePath + filePathSlash + imagePath+fileName).delete();
executeSql("delete from idc_file where filePath='"+fileName+"'"); executeSql("delete from idc_file where filePath='"+fileName+"'");
} }
} catch (Exception e) { } catch (Exception e) {
@ -1252,7 +1252,7 @@ public class IdcServiceImpl implements IdcService {
} }
private void executeSql(String sql) { private void executeSql(String sql) {
try { try {
jdbcTemplate.execute(sql); jdbcTemplate.execute(sql);
@ -1262,5 +1262,5 @@ public class IdcServiceImpl implements IdcService {
} }
} }
} }

@ -31,4 +31,6 @@ public class FilterInvWarehouseRequest extends ListPageRequest {
private String superiorCode;//上级 private String superiorCode;//上级
private String subordinateCode;//下级 private String subordinateCode;//下级
private String superiorPcode;//上级 private String superiorPcode;//上级
private String CustomerId;
private Integer type;
} }

@ -0,0 +1,10 @@
package com.glxp.api.req.inout;
import lombok.Data;
@Data
public class ReviewSpmsRequest {
private String billNo;
}

@ -59,4 +59,8 @@ public class FilterInvRemindMsgRequest extends ListPageRequest {
*/ */
private String supId; private String supId;
/**
*
*/
private String productName;
} }

@ -6,5 +6,6 @@ import lombok.Data;
@Data @Data
public class SpsSyncDataRequest extends ListPageRequest { public class SpsSyncDataRequest extends ListPageRequest {
private String billNo;
private String lastUpdateTime; private String lastUpdateTime;
} }

@ -0,0 +1,18 @@
package com.glxp.api.res.sync;
import com.glxp.api.entity.basic.BasicBusTypeChangeEntity;
import com.glxp.api.entity.basic.BasicBussinessTypeEntity;
import com.glxp.api.entity.thrsys.ThrBusTypeOriginEntity;
import lombok.Data;
import java.util.List;
@Data
public class SpsSyncBusResponse {
//同步任务ID
private String taskId;
private List<BasicBussinessTypeEntity> bussinessTypeEntities;
private List<BasicBusTypeChangeEntity> busTypeChangeEntities;
private List<ThrBusTypeOriginEntity> thrBusTypeOriginEntities;
}

@ -0,0 +1,33 @@
package com.glxp.api.res.sync;
import com.glxp.api.entity.auth.*;
import lombok.Data;
import java.util.List;
@Data
public class SpsSyncDataResponse {
//同步任务ID
private String taskId;
//用户信息
List<AuthAdmin> authAdminList;
List<InvBusUserEntity> invBusUserEntities;
//部门信息
List<DeptEntity> deptEntityList;
List<DeptUserEntity> deptUserEntities;
//仓库相关
List<InvWarehouseEntity> invWarehouseEntities;
List<WarehouseBussinessTypeEntity> warehouseBussinessTypeEntities;
List<WarehouseUserEntity> warehouseUserEntities;
//货位信息
List<InvSpace> invSpaces;
}

@ -412,7 +412,7 @@ public class IoOrderServiceImpl implements IoOrderService {
orderEntity.setDealStatus(ConstantStatus.ORDER_DEAL_POST); orderEntity.setDealStatus(ConstantStatus.ORDER_DEAL_POST);
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_CHECK_SUCCESS); orderEntity.setStatus(ConstantStatus.ORDER_STATUS_CHECK_REW);
orderEntity.setUpdateTime(new Date()); orderEntity.setUpdateTime(new Date());
update(orderEntity); update(orderEntity);
return true; return true;

@ -1,6 +1,7 @@
package com.glxp.api.service.sync; package com.glxp.api.service.sync;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.glxp.api.common.res.BaseResponse; import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.constant.BasicProcessStatus; import com.glxp.api.constant.BasicProcessStatus;
@ -76,19 +77,26 @@ public class SpsSyncDownloadService {
public BaseResponse findOrder(SpsSyncDataRequest spsSyncDataRequest) { public BaseResponse findOrder(SpsSyncDataRequest spsSyncDataRequest) {
SpsSyncOrderResponse syncOrderResponse = new SpsSyncOrderResponse(); SpsSyncOrderResponse syncOrderResponse = new SpsSyncOrderResponse();
//查询数据同步设置 //查询数据同步设置
SyncDataSetResponse syncDataSetEntity = syncDataSetService.selectSet();
List<IoOrderEntity> orderEntities = new ArrayList<>(); List<IoOrderEntity> orderEntities = new ArrayList<>();
FilterOrderRequest orderFilterRequest = new FilterOrderRequest(); if (StrUtil.isEmpty(spsSyncDataRequest.getBillNo())) {
BeanUtils.copyProperties(spsSyncDataRequest, orderFilterRequest); SyncDataSetResponse syncDataSetEntity = syncDataSetService.selectSet();
if (CollUtil.isNotEmpty(syncDataSetEntity.getBusTypes())) { FilterOrderRequest orderFilterRequest = new FilterOrderRequest();
for (SyncDataBustypeEntity syncDataBustypeEntity : syncDataSetEntity.getBusTypes()) { BeanUtils.copyProperties(spsSyncDataRequest, orderFilterRequest);
List<IoOrderEntity> temps = orderService.findByStatus(syncDataBustypeEntity.getAction(), syncDataBustypeEntity.getOrderStatus(), DateUtil.parseDate(spsSyncDataRequest.getLastUpdateTime())); if (CollUtil.isNotEmpty(syncDataSetEntity.getBusTypes())) {
if (CollUtil.isNotEmpty(temps)) { for (SyncDataBustypeEntity syncDataBustypeEntity : syncDataSetEntity.getBusTypes()) {
orderEntities.addAll(temps); List<IoOrderEntity> temps = orderService.findByStatus(syncDataBustypeEntity.getAction(), syncDataBustypeEntity.getOrderStatus(), DateUtil.parseDate(spsSyncDataRequest.getLastUpdateTime()));
if (CollUtil.isNotEmpty(temps)) {
orderEntities.addAll(temps);
}
} }
} }
} else {
IoOrderEntity orderEntity = orderService.findByBillNo(spsSyncDataRequest.getBillNo());
orderEntities.add(orderEntity);
} }
syncOrderResponse.setOrderEntities(orderEntities); syncOrderResponse.setOrderEntities(orderEntities);
List<IoCodeEntity> codeEntities = new ArrayList<>(); List<IoCodeEntity> codeEntities = new ArrayList<>();
List<IoOrderDetailBizEntity> orderDetailBizEntities = new ArrayList<>(); List<IoOrderDetailBizEntity> orderDetailBizEntities = new ArrayList<>();

@ -47,7 +47,9 @@
resultType="com.glxp.api.entity.auth.DeptEntity"> resultType="com.glxp.api.entity.auth.DeptEntity">
select auth_dept.* from auth_dept INNER JOIN auth_warehouse select auth_dept.* from auth_dept INNER JOIN auth_warehouse
on auth_dept.`code` =auth_warehouse.parentId on auth_dept.`code` =auth_warehouse.parentId
INNER JOIN auth_warehouse_user on auth_warehouse_user.`code` = auth_warehouse.code <if test="CustomerId != '' and CustomerId != null">
INNER JOIN auth_warehouse_user on auth_warehouse_user.`code` = auth_warehouse.code
</if>
<where> <where>
<if test="id != '' and id != null"> <if test="id != '' and id != null">
AND id = #{id} AND id = #{id}

@ -156,6 +156,11 @@
AND date_format(createTime, '%Y-%m-%d') between date_format(#{startTime}, '%Y-%m-%d') and AND date_format(createTime, '%Y-%m-%d') between date_format(#{startTime}, '%Y-%m-%d') and
date_format(#{endTime}, '%Y-%m-%d') date_format(#{endTime}, '%Y-%m-%d')
</if> </if>
<if test="lastUpdateTime != null and lastUpdateTime != ''">
<![CDATA[
and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S') >= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S')
]]>
</if>
</where> </where>
order by createTime desc order by createTime desc
</select> </select>

@ -28,8 +28,8 @@
(select `name` from auth_space where `code` = irm.invSpaceCode and invCode = irm.invCode) invSpaceName, (select `name` from auth_space where `code` = irm.invSpaceCode and invCode = irm.invCode) invSpaceName,
(select `name` from basic_corp where erpId = irm.supId) supName (select `name` from basic_corp where erpId = irm.supId) supName
from inv_remind_msg irm from inv_remind_msg irm
left join basic_udirel bu on bu.id = irm.relId left join basic_udirel bu on bu.id = irm.relId
left join basic_products bp on bp.uuid = bu.uuid left join basic_products bp on bp.uuid = bu.uuid
<where> <where>
<if test="relId != null and relId != ''"> <if test="relId != null and relId != ''">
AND irm.relId = #{relId} AND irm.relId = #{relId}
@ -50,7 +50,7 @@
AND irm.ignoreStatus = #{ignoreStatus} AND irm.ignoreStatus = #{ignoreStatus}
</if> </if>
<if test="ggxh != null and ggxh != ''"> <if test="ggxh != null and ggxh != ''">
AND bp.ggxh = #{ggxh} AND bp.ggxh like concat('%', #{ggxh}, '%')
</if> </if>
<if test="type != null and type != ''"> <if test="type != null and type != ''">
AND type = #{type} AND type = #{type}
@ -58,6 +58,9 @@
<if test="supId != null"> <if test="supId != null">
AND irm.supId = #{supId} AND irm.supId = #{supId}
</if> </if>
<if test="productName != null and productName != ''">
AND bp.cpmctymc like concat('%', #{productName}, '%')
</if>
</where> </where>
order by irm.updateTime desc order by irm.updateTime desc
</select> </select>

@ -252,9 +252,9 @@
ip.productionDate, ip.productionDate,
ip.expireDate, ip.expireDate,
ip.supId, ip.supId,
sum(ip.inCount) incount, ip.inCount,
sum(ip.outCount) outCount, ip.outCount,
sum(ip.reCount) reCount ip.reCount
from inv_product ip from inv_product ip
left join inv_product_detail ipd left join inv_product_detail ipd
on ip.relIdFk = ipd.relId and ifnull(ip.batchNo, 'empty') = ifnull(ipd.batchNo, 'empty') on ip.relIdFk = ipd.relId and ifnull(ip.batchNo, 'empty') = ifnull(ipd.batchNo, 'empty')

@ -22,6 +22,11 @@ CALL Pro_Temp_ColumnWork('io_order_detail_biz', 'bindRlIds', 'varchar(255) ', 1)
CALL Pro_Temp_ColumnWork('io_order_detail_biz', 'checkFileName', 'varchar(255) ', 1); CALL Pro_Temp_ColumnWork('io_order_detail_biz', 'checkFileName', 'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('io_order_invoice', 'bizIdFk', 'int ', 1); CALL Pro_Temp_ColumnWork('io_order_invoice', 'bizIdFk', 'int ', 1);
CALL Pro_Temp_ColumnWork('thr_products', 'updateUser', 'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('thr_products', 'createUser', 'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('thr_products', 'createTime', 'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('auth_warehouse', 'advanceType', 'tinyint', 1); CALL Pro_Temp_ColumnWork('auth_warehouse', 'advanceType', 'tinyint', 1);

Loading…
Cancel
Save