中继服务同步bug修改,预验收bug修改等

master
anthonyywj2 3 years ago
parent 86f75eb779
commit 5b16476457

@ -112,4 +112,9 @@ public class ConstantStatus {
public static final int ORDER_CHANGE_INNOR_NORMAL_IN = 5; //补调拨入库
public static final String SYNC_BASIC_DATA = "AutoDownloadAllData";
public static final String SYNC_BUS_TYPE = "AutoDownloadBusType";
public static final String SYNC_SCAN_ORDER = "AutoDownloadOrder";
public static final String SYNC_DI_PRODUCTS = "AutoDownloadDiProducts";
}

@ -139,6 +139,7 @@ public class BasicUnitMaintainController {
@AuthRuleAnnotation("")
@PostMapping("/udiwms/basic/unit/maintain/update")
public BaseResponse update(@RequestBody BasicUnitMaintainEntity basicUnitMaintainSaveRequest) {
basicUnitMaintainSaveRequest.setUpdateTime(new Date());
basicUnitMaintainService.updateById(basicUnitMaintainSaveRequest);
return ResultVOUtils.success("修改成功");
}

@ -192,12 +192,13 @@ public class BussinessLocalTypeController {
}
}
BussinessChangeTypeEntity bussinessChangeTypeEntity = bussinessChangeTypeService.findFirstByAction(bussinessLocalTypeEntity.getAction());
if (bussinessChangeTypeEntity != null && bussinessChangeTypeEntity.getScAction() != null) {
return ResultVOUtils.error(500, "该业务单据类型已绑定流转单据类型,无法删除!");
}
// BussinessChangeTypeEntity bussinessChangeTypeEntity = bussinessChangeTypeService.findFirstByAction(bussinessLocalTypeEntity.getAction());
// if (bussinessChangeTypeEntity != null && bussinessChangeTypeEntity.getScAction() != null) {
// return ResultVOUtils.error(500, "该业务单据类型已绑定流转单据类型,无法删除!");
// }
bussinessLocalTypeService.deleteById(id);
bussinessChangeTypeService.deleteByLocaAction(bussinessLocalTypeEntity.getAction());
return ResultVOUtils.success("删除成功");
}

@ -1,6 +1,15 @@
package com.glxp.sale.admin.controller.basic;
import cn.hutool.core.collection.CollUtil;
import com.glxp.sale.admin.constant.ConstantStatus;
import com.glxp.sale.admin.entity.basic.BasicExportStatusEntity;
import com.glxp.sale.admin.req.basic.SpsSyncDataRequest;
import com.glxp.sale.admin.res.basic.SpSyncUdiResponse;
import com.glxp.sale.admin.res.basic.SpsSyncBusResponse;
import com.glxp.sale.admin.res.basic.SpsSyncDataResponse;
import com.glxp.sale.admin.res.basic.SpsSyncOrderResponse;
import com.glxp.sale.admin.service.basic.BasicExportService;
import com.glxp.sale.admin.util.Constant;
import com.glxp.sale.common.res.BaseResponse;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@ -12,27 +21,90 @@ public class SpsSyncDownloadController {
@Resource
SpsSyncDownloadService spsSyncDownloadService;
@Resource
BasicExportService basicExportService;
@GetMapping("sps/sync/basic")
public BaseResponse findProductInfo(SpsSyncDataRequest spsSyncDataRequest) {
return spsSyncDownloadService.findProductInfo(spsSyncDataRequest);
BaseResponse<SpsSyncDataResponse> baseResponse = spsSyncDownloadService.findProductInfo(spsSyncDataRequest);
BasicExportStatusEntity basicExportStatusEntity = basicExportService.findByData(ConstantStatus.SYNC_BASIC_DATA, 0);
String logs = "";
if (basicExportStatusEntity != null) {
if (CollUtil.isNotEmpty(baseResponse.getData().getUdiRelevanceEntities()))
logs = logs + "耗材字典:" + baseResponse.getData().getUdiRelevanceEntities().size() + "条\n";
if (CollUtil.isNotEmpty(baseResponse.getData().getBasicUnitMaintainEntities()))
logs = logs + "往来单位:" + baseResponse.getData().getBasicUnitMaintainEntities().size() + "条\n";
if (CollUtil.isNotEmpty(baseResponse.getData().getCompanyProductRelevanceEntities()))
logs = logs + "供应商关联产品信息:" + baseResponse.getData().getCompanyProductRelevanceEntities().size() + "条\n";
if (CollUtil.isNotEmpty(baseResponse.getData().getInvWarehouseEntities()))
logs = logs + "仓库字典:" + baseResponse.getData().getInvWarehouseEntities().size() + "条\n";
if (CollUtil.isNotEmpty(baseResponse.getData().getThrInvWarehouseEntities()))
logs = logs + "第三方仓库字典:" + baseResponse.getData().getThrInvWarehouseEntities().size() + "条\n";
if (CollUtil.isNotEmpty(baseResponse.getData().getThrOrderEntities()))
logs = logs + "第三方业务单据:" + baseResponse.getData().getThrOrderEntities().size() + "条\n";
if (CollUtil.isNotEmpty(baseResponse.getData().getThrProductsEntities()))
logs = logs + "第三方产品信息:" + baseResponse.getData().getThrProductsEntities().size() + "条\n";
if (CollUtil.isNotEmpty(baseResponse.getData().getThrCorpEntities()))
logs = logs + "第三方往来单位:" + baseResponse.getData().getThrCorpEntities().size() + "条\n";
basicExportStatusEntity.setRemark(logs);
basicExportService.updateExportStatus(basicExportStatusEntity);
}
return baseResponse;
}
@GetMapping("sps/sync/busType")
public BaseResponse findBusType(SpsSyncDataRequest spsSyncDataRequest) {
return spsSyncDownloadService.findBusType(spsSyncDataRequest);
BaseResponse<SpsSyncBusResponse> baseResponse = spsSyncDownloadService.findBusType(spsSyncDataRequest);
BasicExportStatusEntity basicExportStatusEntity = basicExportService.findByData(ConstantStatus.SYNC_BUS_TYPE, 0);
String logs = "";
if (basicExportStatusEntity != null) {
if (CollUtil.isNotEmpty(baseResponse.getData().getBussinessTypeEntities()))
logs = logs + "扫码单据类型:" + baseResponse.getData().getBussinessTypeEntities().size() + "条\n";
if (CollUtil.isNotEmpty(baseResponse.getData().getBussinessLocalTypeEntities()))
logs = logs + "业务单据类型:" + baseResponse.getData().getBussinessLocalTypeEntities().size() + "条\n";
if (CollUtil.isNotEmpty(baseResponse.getData().getBussinessOriginTypeEntities()))
logs = logs + "第三方单据类型:" + baseResponse.getData().getBussinessOriginTypeEntities().size() + "条\n";
basicExportStatusEntity.setRemark(logs);
basicExportService.updateExportStatus(basicExportStatusEntity);
}
return baseResponse;
}
@GetMapping("sps/sync/order")
public BaseResponse findOrder(SpsSyncDataRequest spsSyncDataRequest) {
return spsSyncDownloadService.findOrder(spsSyncDataRequest);
BaseResponse<SpsSyncOrderResponse> baseResponse = spsSyncDownloadService.findOrder(spsSyncDataRequest);
BasicExportStatusEntity basicExportStatusEntity = basicExportService.findByData(ConstantStatus.SYNC_SCAN_ORDER, 0);
String logs = "";
if (basicExportStatusEntity != null) {
logs = logs + "单据:" + baseResponse.getData().getOrderEntities().size() + "条\n";
basicExportStatusEntity.setRemark(logs);
basicExportService.updateExportStatus(basicExportStatusEntity);
}
return baseResponse;
}
//udi同步数据
@GetMapping("sps/sync/syncUdis")
public BaseResponse syncUdi(SpsSyncDataRequest spsSyncDataRequest) {
return spsSyncDownloadService.syncUdi(spsSyncDataRequest);
BaseResponse<SpSyncUdiResponse> baseResponse = spsSyncDownloadService.syncUdi(spsSyncDataRequest);
BasicExportStatusEntity basicExportStatusEntity = basicExportService.findByData(ConstantStatus.SYNC_DI_PRODUCTS, 0);
String logs = "";
if (basicExportStatusEntity != null) {
if (CollUtil.isNotEmpty(baseResponse.getData().getProductInfoEntityList()))
logs = logs + "DI信息" + baseResponse.getData().getProductInfoEntityList().size() + "条\n";
if (CollUtil.isNotEmpty(baseResponse.getData().getUdiCompanyEntities()))
logs = logs + "医疗器械注册人:" + baseResponse.getData().getUdiCompanyEntities().size() + "条\n";
basicExportStatusEntity.setRemark(logs);
basicExportService.updateExportStatus(basicExportStatusEntity);
}
return baseResponse;
}
}

@ -7,6 +7,7 @@ import com.glxp.sale.admin.entity.basic.*;
import com.glxp.sale.admin.entity.info.CompanyProductRelevanceEntity;
import com.glxp.sale.admin.entity.inout.ErpOrderEntity;
import com.glxp.sale.admin.entity.inout.OrderEntity;
import com.glxp.sale.admin.entity.inout.WarehouseBussinessTypeEntity;
import com.glxp.sale.admin.entity.inout.WarehouseEntity;
import com.glxp.sale.admin.entity.inventory.InvWarehouseEntity;
import com.glxp.sale.admin.entity.receipt.ProductInfoEntity;
@ -182,7 +183,15 @@ public class SpsSyncDownloadService {
BussinessLocalTypeFilterRequest bussinessLocalTypeFilterRequest = new BussinessLocalTypeFilterRequest();
BeanUtils.copyProperties(spsSyncDataRequest, bussinessLocalTypeFilterRequest);
List<BussinessLocalTypeEntity> bussinessLocalTypeEntities = bussinessLocalTypeService.filterAllList(bussinessLocalTypeFilterRequest);
spsSyncBusResponse.setBussinessLocalTypeEntities(bussinessLocalTypeEntities);
List<SpsBusLoclTypeResponse> spsBusLoclTypeResponses = new ArrayList<>();
bussinessLocalTypeEntities.forEach(bussinessTypeEntity -> {
SpsBusLoclTypeResponse busLoclTypeResponse = new SpsBusLoclTypeResponse();
BeanUtils.copyProperties(bussinessTypeEntity, busLoclTypeResponse);
spsBusLoclTypeResponses.add(busLoclTypeResponse);
});
spsSyncBusResponse.setBussinessLocalTypeEntities(spsBusLoclTypeResponses);
}
if (syncDataSetEntity.isTypeThird()) {
BussinessOriginTypeFilterRequest bussinessOriginTypeFilterRequest = new BussinessOriginTypeFilterRequest();
@ -214,47 +223,59 @@ public class SpsSyncDownloadService {
OrderFilterRequest orderFilterRequest = new OrderFilterRequest();
BeanUtils.copyProperties(spsSyncDataRequest, orderFilterRequest);
orderFilterRequest.setFilterActions(syncDataSetEntity.getBusTypes());
orderFilterRequest.setStatus(ConstantStatus.ORDER_STATUS_SUCCESS);
orderFilterRequest.setReceiveStatus(ConstantStatus.RECEIVE_ED);
List<OrderEntity> temps = orderService.findAllByTime(orderFilterRequest);
if (CollUtil.isNotEmpty(temps)) {
orderEntities.addAll(temps);
if (CollUtil.isNotEmpty(orderFilterRequest.getFilterActions())) {
orderFilterRequest.setStatus(ConstantStatus.ORDER_STATUS_SUCCESS);
orderFilterRequest.setReceiveStatus(ConstantStatus.RECEIVE_ED);
List<OrderEntity> temps = orderService.findAllByTime(orderFilterRequest);
if (CollUtil.isNotEmpty(temps)) {
orderEntities.addAll(temps);
}
}
}
if (syncDataSetEntity.isOrderUnReceive()) {
OrderFilterRequest orderFilterRequest = new OrderFilterRequest();
BeanUtils.copyProperties(spsSyncDataRequest, orderFilterRequest);
orderFilterRequest.setFilterActions(syncDataSetEntity.getBusTypes());
orderFilterRequest.setStatus(ConstantStatus.ORDER_STATUS_SUCCESS);
orderFilterRequest.setReceiveStatus(ConstantStatus.RECEIVE_UN);
List<OrderEntity> temps = orderService.findAllByTime(orderFilterRequest);
if (CollUtil.isNotEmpty(temps)) {
orderEntities.addAll(temps);
if (CollUtil.isNotEmpty(orderFilterRequest.getFilterActions())) {
orderFilterRequest.setStatus(ConstantStatus.ORDER_STATUS_SUCCESS);
orderFilterRequest.setReceiveStatus(ConstantStatus.RECEIVE_UN);
List<OrderEntity> temps = orderService.findAllByTime(orderFilterRequest);
if (CollUtil.isNotEmpty(temps)) {
orderEntities.addAll(temps);
}
}
}
if (syncDataSetEntity.isOrderUnCheck()) {
OrderFilterRequest orderFilterRequest = new OrderFilterRequest();
BeanUtils.copyProperties(spsSyncDataRequest, orderFilterRequest);
orderFilterRequest.setFilterActions(syncDataSetEntity.getBusTypes());
orderFilterRequest.setStatus(ConstantStatus.ORDER_STATUS_CHECK);
List<OrderEntity> temps = orderService.findAllByTime(orderFilterRequest);
if (CollUtil.isNotEmpty(temps)) {
orderEntities.addAll(temps);
if (CollUtil.isNotEmpty(orderFilterRequest.getFilterActions())) {
orderFilterRequest.setStatus(ConstantStatus.ORDER_STATUS_CHECK);
List<OrderEntity> temps = orderService.findAllByTime(orderFilterRequest);
if (CollUtil.isNotEmpty(temps)) {
orderEntities.addAll(temps);
}
}
}
if (syncDataSetEntity.isOrderScanFinish()) {
OrderFilterRequest orderFilterRequest = new OrderFilterRequest();
BeanUtils.copyProperties(spsSyncDataRequest, orderFilterRequest);
orderFilterRequest.setFilterActions(syncDataSetEntity.getBusTypes());
orderFilterRequest.setStatus(ConstantStatus.ORDER_STATUS_SUCCESS);
orderFilterRequest.setReceiveStatus(ConstantStatus.RECEIVE_ED);
List<OrderEntity> temps = orderService.findAllByTime(orderFilterRequest);
if (CollUtil.isNotEmpty(temps)) {
orderEntities.addAll(temps);
if (CollUtil.isNotEmpty(orderFilterRequest.getFilterActions())) {
orderFilterRequest.setStatus(ConstantStatus.ORDER_STATUS_SUCCESS);
orderFilterRequest.setReceiveStatus(ConstantStatus.RECEIVE_ED);
List<OrderEntity> temps = orderService.findAllByTime(orderFilterRequest);
if (CollUtil.isNotEmpty(temps)) {
orderEntities.addAll(temps);
}
}
}

@ -5,16 +5,16 @@ import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference;
import com.github.pagehelper.PageInfo;
import com.glxp.sale.admin.constant.BasicProcessStatus;
import com.glxp.sale.admin.constant.ConstantStatus;
import com.glxp.sale.admin.entity.basic.BasicExportStatusEntity;
import com.glxp.sale.admin.entity.basic.BasicExportStatusTimeEntity;
import com.glxp.sale.admin.entity.inout.StockOrderEntity;
import com.glxp.sale.admin.req.basic.BasicExportStatusRequest;
import com.glxp.sale.admin.req.basic.BasicExportTimeRequest;
import com.glxp.sale.admin.req.basic.SpsSyncDataRequest;
import com.glxp.sale.admin.req.info.DeleteRequest;
import com.glxp.sale.admin.res.PageSimpleResponse;
import com.glxp.sale.admin.res.basic.BasicUnitMaintainExportResponse;
import com.glxp.sale.admin.res.basic.SpsSyncDataResponse;
import com.glxp.sale.admin.res.basic.UdiRelevanceExportJsonResponse;
import com.glxp.sale.admin.res.basic.*;
import com.glxp.sale.admin.res.inventory.InvWarehouseExportResponse;
import com.glxp.sale.admin.service.basic.BasicExportService;
import com.glxp.sale.admin.service.basic.BasicExportTimeService;
@ -41,7 +41,8 @@ public class SpsSyncExportStatusController {
BasicExportTimeService basicExportTimeService;
@Resource
RedisUtil redisUtil;
@Resource
SpsSyncDownloadService spsSyncDownloadService;
@GetMapping("/spssync/basic/udiinfo/getStatus")
public BaseResponse getStatus(BasicExportStatusRequest basicExportStatusRequest) {
@ -110,76 +111,121 @@ public class SpsSyncExportStatusController {
if (basicExportStatusRequest.getCreateType() == 1) {
//自动创建要求被下载已完成单据任务
BasicExportStatusEntity basicExportStatusEntity1 = basicExportService.findByData("AutoDownloadOrder", 0);
BasicExportStatusEntity basicExportStatusEntity1 = basicExportService.findByData(ConstantStatus.SYNC_SCAN_ORDER, 0);
if (basicExportStatusEntity1 == null) {
BasicExportStatusEntity orderStatusEntity = new BasicExportStatusEntity();
orderStatusEntity.setId(CustomUtil.getId());
orderStatusEntity.setIdDatas("AutoDownloadOrder");
orderStatusEntity.setType(BasicProcessStatus.NEW_ALL_ORDER);
orderStatusEntity.setUpdateTime(new Date());
orderStatusEntity.setStatus(0);
orderStatusEntity.setStartTime(new Date());
orderStatusEntity.setScheduleType(BasicProcessStatus.SCHEDULE_NORMAL);
basicExportService.insertExportStatus(orderStatusEntity);
}else {
return ResultVOUtils.error(501,"任务已存在!");
BaseResponse<SpsSyncOrderResponse> baseResponse = spsSyncDownloadService.findOrder(getRequest(ConstantStatus.SYNC_SCAN_ORDER));
SpsSyncOrderResponse syncOrderResponse = baseResponse.getData();
if (CollUtil.isNotEmpty(syncOrderResponse.getOrderEntities())) {
BasicExportStatusEntity orderStatusEntity = new BasicExportStatusEntity();
orderStatusEntity.setId(CustomUtil.getId());
orderStatusEntity.setIdDatas(ConstantStatus.SYNC_SCAN_ORDER);
orderStatusEntity.setType(BasicProcessStatus.NEW_ALL_ORDER);
orderStatusEntity.setUpdateTime(new Date());
orderStatusEntity.setStatus(0);
orderStatusEntity.setStartTime(new Date());
orderStatusEntity.setScheduleType(BasicProcessStatus.SCHEDULE_NORMAL);
basicExportService.insertExportStatus(orderStatusEntity);
} else {
return ResultVOUtils.error(501, "当前暂无更新数据需要同步!");
}
} else {
return ResultVOUtils.error(501, "当前任务已存在!");
}
} else if (basicExportStatusRequest.getCreateType() == 2) {
//自动创建要求被下载单据类型任务
BasicExportStatusEntity basicExportStatusEntity2 = basicExportService.findByData("AutoDownloadBusType", 0);
BasicExportStatusEntity basicExportStatusEntity2 = basicExportService.findByData(ConstantStatus.SYNC_BUS_TYPE, 0);
if (basicExportStatusEntity2 == null) {
BasicExportStatusEntity busTypetatusEntity = new BasicExportStatusEntity();
busTypetatusEntity.setId(CustomUtil.getId());
busTypetatusEntity.setIdDatas("AutoDownloadBusType");
busTypetatusEntity.setType(BasicProcessStatus.NEW_ALL_BUS);
busTypetatusEntity.setUpdateTime(new Date());
busTypetatusEntity.setStatus(0);
busTypetatusEntity.setStartTime(new Date());
busTypetatusEntity.setScheduleType(BasicProcessStatus.SCHEDULE_NORMAL);
basicExportService.insertExportStatus(busTypetatusEntity);
}else {
return ResultVOUtils.error(501,"任务已存在!");
BaseResponse<SpsSyncBusResponse> baseResponse = spsSyncDownloadService.findBusType(getRequest(ConstantStatus.SYNC_BUS_TYPE));
SpsSyncBusResponse spsSyncBusResponse = baseResponse.getData();
if (CollUtil.isNotEmpty(spsSyncBusResponse.getBussinessLocalTypeEntities())
|| CollUtil.isNotEmpty(spsSyncBusResponse.getBussinessOriginTypeEntities())
|| CollUtil.isNotEmpty(spsSyncBusResponse.getBussinessTypeEntities())) {
BasicExportStatusEntity busTypetatusEntity = new BasicExportStatusEntity();
busTypetatusEntity.setId(CustomUtil.getId());
busTypetatusEntity.setIdDatas(ConstantStatus.SYNC_BUS_TYPE);
busTypetatusEntity.setType(BasicProcessStatus.NEW_ALL_BUS);
busTypetatusEntity.setUpdateTime(new Date());
busTypetatusEntity.setStatus(0);
busTypetatusEntity.setStartTime(new Date());
busTypetatusEntity.setScheduleType(BasicProcessStatus.SCHEDULE_NORMAL);
basicExportService.insertExportStatus(busTypetatusEntity);
} else {
return ResultVOUtils.error(501, "当前暂无更新数据需要同步!");
}
} else {
return ResultVOUtils.error(501, "任务已存在!");
}
} else if (basicExportStatusRequest.getCreateType() == 3) {
//自动创建要求被下载基础信息任务
BasicExportStatusEntity basicExportStatusEntity3 = basicExportService.findByData("AutoDownloadAllData", 0);
BasicExportStatusEntity basicExportStatusEntity3 = basicExportService.findByData(ConstantStatus.SYNC_BASIC_DATA, 0);
if (basicExportStatusEntity3 == null) {
BasicExportStatusEntity basicExportStatusEntity = new BasicExportStatusEntity();
basicExportStatusEntity.setId(CustomUtil.getId());
basicExportStatusEntity.setIdDatas("AutoDownloadAllData");
basicExportStatusEntity.setType(BasicProcessStatus.NEW_ALL_DATA);
basicExportStatusEntity.setUpdateTime(new Date());
basicExportStatusEntity.setStatus(0);
basicExportStatusEntity.setStartTime(new Date());
basicExportStatusEntity.setScheduleType(BasicProcessStatus.SCHEDULE_NORMAL);
basicExportService.insertExportStatus(basicExportStatusEntity);
}else {
return ResultVOUtils.error(501,"任务已存在!");
BaseResponse<SpsSyncDataResponse> baseResponse = spsSyncDownloadService.findProductInfo(getRequest(ConstantStatus.SYNC_BASIC_DATA));
SpsSyncDataResponse spsSyncDataResponse = baseResponse.getData();
if (CollUtil.isNotEmpty(spsSyncDataResponse.getThrOrderDetailEntities())
|| CollUtil.isNotEmpty(spsSyncDataResponse.getThrOrderEntities())
|| CollUtil.isNotEmpty(spsSyncDataResponse.getInvWarehouseEntities())
|| CollUtil.isNotEmpty(spsSyncDataResponse.getBasicUnitMaintainEntities())
|| CollUtil.isNotEmpty(spsSyncDataResponse.getCompanyProductRelevanceEntities())
|| CollUtil.isNotEmpty(spsSyncDataResponse.getThrCorpEntities())
|| CollUtil.isNotEmpty(spsSyncDataResponse.getUdiInfoEntities())
|| CollUtil.isNotEmpty(spsSyncDataResponse.getUdiRelevanceEntities())
|| CollUtil.isNotEmpty(spsSyncDataResponse.getThrProductsEntities())
|| CollUtil.isNotEmpty(spsSyncDataResponse.getThrInvWarehouseEntities())
) {
BasicExportStatusEntity basicExportStatusEntity = new BasicExportStatusEntity();
basicExportStatusEntity.setId(CustomUtil.getId());
basicExportStatusEntity.setIdDatas(ConstantStatus.SYNC_BASIC_DATA);
basicExportStatusEntity.setType(BasicProcessStatus.NEW_ALL_DATA);
basicExportStatusEntity.setUpdateTime(new Date());
basicExportStatusEntity.setStatus(0);
basicExportStatusEntity.setStartTime(new Date());
basicExportStatusEntity.setScheduleType(BasicProcessStatus.SCHEDULE_NORMAL);
basicExportService.insertExportStatus(basicExportStatusEntity);
} else {
return ResultVOUtils.error(501, "当前暂无更新数据需要同步!");
}
} else {
return ResultVOUtils.error(501, "任务已存在!");
}
} else if (basicExportStatusRequest.getCreateType() == 4) {
//自动创建要求被下载同步库DI信息
BasicExportStatusEntity basicExportStatusEntity4 = basicExportService.findByData("AutoDownloadDiProducts", 0);
BasicExportStatusEntity basicExportStatusEntity4 = basicExportService.findByData(ConstantStatus.SYNC_DI_PRODUCTS, 0);
if (basicExportStatusEntity4 == null) {
BasicExportStatusEntity basicExportStatusEntity = new BasicExportStatusEntity();
basicExportStatusEntity.setId(CustomUtil.getId());
basicExportStatusEntity.setIdDatas("AutoDownloadDiProducts");
basicExportStatusEntity.setType(BasicProcessStatus.NEW_ALL_DI);
basicExportStatusEntity.setUpdateTime(new Date());
basicExportStatusEntity.setStatus(0);
basicExportStatusEntity.setStartTime(new Date());
basicExportStatusEntity.setScheduleType(BasicProcessStatus.SCHEDULE_NORMAL);
basicExportService.insertExportStatus(basicExportStatusEntity);
}else {
return ResultVOUtils.error(501,"任务已存在!");
BaseResponse<SpSyncUdiResponse> baseResponse = spsSyncDownloadService.syncUdi(getRequest(ConstantStatus.SYNC_DI_PRODUCTS));
SpSyncUdiResponse spSyncUdiResponse = baseResponse.getData();
if (CollUtil.isNotEmpty(spSyncUdiResponse.getProductInfoEntityList())
|| CollUtil.isNotEmpty(spSyncUdiResponse.getUdiCompanyEntities())) {
BasicExportStatusEntity basicExportStatusEntity = new BasicExportStatusEntity();
basicExportStatusEntity.setId(CustomUtil.getId());
basicExportStatusEntity.setIdDatas(ConstantStatus.SYNC_DI_PRODUCTS);
basicExportStatusEntity.setType(BasicProcessStatus.NEW_ALL_DI);
basicExportStatusEntity.setUpdateTime(new Date());
basicExportStatusEntity.setStatus(0);
basicExportStatusEntity.setStartTime(new Date());
basicExportStatusEntity.setScheduleType(BasicProcessStatus.SCHEDULE_NORMAL);
basicExportService.insertExportStatus(basicExportStatusEntity);
} else {
return ResultVOUtils.error(501, "当前暂无更新数据需要同步!");
}
} else {
return ResultVOUtils.error(501, "任务已存在!");
}
}
return ResultVOUtils.success("创建成功!");
}
public SpsSyncDataRequest getRequest(String type) {
SpsSyncDataRequest spsSyncDataRequest = new SpsSyncDataRequest();
spsSyncDataRequest.setPage(1);
spsSyncDataRequest.setLimit(1);
BasicExportStatusTimeEntity basicExportStatusTimeEntity = basicExportTimeService.findByType(type);
spsSyncDataRequest.setLastUpdateTime(basicExportStatusTimeEntity.getLastUpdateTime());
return spsSyncDataRequest;
}
}

@ -35,6 +35,7 @@ import com.glxp.sale.admin.service.inout.OrderService;
import com.glxp.sale.admin.service.inventory.InvWarehouseService;
import com.glxp.sale.admin.service.thrsys.*;
import com.glxp.sale.admin.thread.BasicBackUpdateProductService;
import com.glxp.sale.admin.util.BeanUtils;
import com.glxp.sale.common.res.BaseResponse;
import com.glxp.sale.common.util.ResultVOUtils;
import org.apache.ibatis.session.ExecutorType;
@ -47,6 +48,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
@RestController
@ -251,7 +253,14 @@ public class SpsSyncUploadController {
//业务单据
if (CollUtil.isNotEmpty(syncDataResponse.getBussinessLocalTypeEntities())) {
try {
List<BussinessLocalTypeEntity> bussinessLocalTypeEntities = syncDataResponse.getBussinessLocalTypeEntities();
List<SpsBusLoclTypeResponse> spsBusLoclTypeResponses = syncDataResponse.getBussinessLocalTypeEntities();
List<BussinessLocalTypeEntity> bussinessLocalTypeEntities = new ArrayList<>();
spsBusLoclTypeResponses.forEach(spsBusLoclTypeResponse ->
{
BussinessLocalTypeEntity bussinessLocalTypeEntity = new BussinessLocalTypeEntity();
BeanUtils.copyProperties(spsBusLoclTypeResponse, bussinessLocalTypeEntity);
bussinessLocalTypeEntities.add(bussinessLocalTypeEntity);
});
BussinessLocalTypeDao mapper = batchSession.getMapper(BussinessLocalTypeDao.class);
for (BussinessLocalTypeEntity bussinessTypeEntity : bussinessLocalTypeEntities) {
bussinessTypeEntity.setUpdateTime(null);

@ -164,6 +164,7 @@ public class UdiContrastController {
udiRelevanceEntity.setUpdateTime(DateUtil.getDateTime());
udiRelevanceEntity.setManufactory(combineRequest.getManufactory());
udiRelevanceEntity.setSupName(combineRequest.getSupName());
udiRelevanceEntity.setPrice(combineRequest.getPrice());
UdiRelevanceEntity temp = udiContrastService.findById(udiRelevanceEntity.getId());
if (udiContrastService.isExit(temp.getOriginUuid(), udiRelevanceEntity.getMainId())) {
return ResultVOUtils.error(500, "已存在相同的对照关系,对照失败!");
@ -217,6 +218,8 @@ public class UdiContrastController {
try {
CombineRequest combineRequest = new CombineRequest();
combineRequest.setRelId(removeRelRequest.getRelId());
udiRelevanceEntity.setSupName("");
udiRelevanceEntity.setPrice("");
udiRelevanceService.updateUdiRelevance(udiRelevanceEntity);
} catch (Exception e) {
e.printStackTrace();
@ -271,6 +274,7 @@ public class UdiContrastController {
} else
udiRelevanceEntity.setManufactory(udiInfoEntities.get(0).getYlqxzcrbarmc());
udiRelevanceEntity.setSupName(combineRequest.getSupName());
udiRelevanceEntity.setPrice(combineRequest.getPrice());
udiRelevanceEntity.setId(gennerOrderUtils.getRelId() + "");
udiRelevanceService.insertUdiRelevance(udiRelevanceEntity);
insertUdiInfos(udiInfoEntities);
@ -283,6 +287,7 @@ public class UdiContrastController {
udiRelevanceEntity.setUuid(udiInfoEntities.get(0).getUuid());
udiRelevanceEntity.setManufactory(udiInfoEntities.get(0).getYlqxzcrbarmc());
udiRelevanceEntity.setSupName(combineRequest.getSupName());
udiRelevanceEntity.setPrice(combineRequest.getPrice());
udiRelevanceEntity.setId(gennerOrderUtils.getRelId() + "");
udiRelevanceService.insertUdiRelevance(udiRelevanceEntity);
insertUdiInfos(udiInfoEntities);
@ -303,6 +308,7 @@ public class UdiContrastController {
udiRelevanceEntity.setManufactory(thrProductsEntity.getManufactory());
udiRelevanceEntity.setSupName(combineRequest.getSupName());
udiRelevanceEntity.setId(gennerOrderUtils.getRelId() + "");
udiRelevanceEntity.setPrice(thrProductsEntity.getPrice());
udiRelevanceService.insertUdiRelevance(udiRelevanceEntity);
UdiInfoEntity udiInfoEntity = new UdiInfoEntity();
BeanUtils.copyProperties(thrProductsEntity, udiInfoEntity);

@ -43,10 +43,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
//基础信息维护
@RestController
@ -312,6 +309,7 @@ public class UdiInfoController {
if (null == thrProductsEntity)
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
thrProductsEntity.setThirdSysFk("thirdId");
thrProductsEntity.setUpdateTime(new Date());
thrProductsService.insertThrProducts(thrProductsEntity);
return ResultVOUtils.success();
}

@ -172,7 +172,6 @@ public class CompanyProductRelevanceController {
if (companyEntity.getUnitIdFk().equals("110")) {
udiInfoExportRequest.setUnitFk(null);
} else {
// udiInfoExportRequest.setCustomerId(null);
udiInfoExportRequest.setUnitFk(companyEntity.getUnitIdFk());
}
companyProductsRelService.insertCompanyProducts(udiInfoExportRequest);

@ -268,6 +268,7 @@ public class StockOrderDetailController {
CompanyProductRelevanceResponse companyProductRelevanceResponse = new CompanyProductRelevanceResponse();
BeanUtils.copyProperties(udiRelevanceResponses.get(0), companyProductRelevanceResponse);
companyProductRelevanceResponse.setRlId(udiRelevanceResponses.get(0).getId());
companyProductRelevanceResponse.setPrice(udiRelevanceResponses.get(0).getPrice());
companyProductRelevanceResponses.add(companyProductRelevanceResponse);
}
} else

@ -414,6 +414,10 @@ public class WareHouseController {
return ResultVOUtils.error(500, "超出预验收库存数量");
}
}
}else {
if(invProductDetailEntity.getCount()<1){
return ResultVOUtils.error(500, "超出预验收库存数量");
}
}
}
}

@ -1,6 +1,7 @@
package com.glxp.sale.admin.controller.inventory;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageInfo;
import com.glxp.sale.admin.annotation.AuthRuleAnnotation;
import com.glxp.sale.admin.constant.ConstantStatus;
@ -104,6 +105,10 @@ public class InvPreInProductsController {
if (Constant.SYSTEM_CUSTOMER_ID.equals(filterInvProductRequest.getCustomerId())) {
filterInvProductRequest.setCustomerId(null);
}
if(StrUtil.isEmpty(filterInvProductRequest.getBatchNo()))
{
filterInvProductRequest.setBatchNo("empty");
}
List<InvProductDetailEntity> invProductDetailEntities = invProductDetailService.filterInvProduct(filterInvProductRequest);
PageInfo<InvProductDetailEntity> pageInfo;
pageInfo = new PageInfo<>(invProductDetailEntities);

@ -1,5 +1,6 @@
package com.glxp.sale.admin.controller.inventory;
import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageInfo;
import com.glxp.sale.admin.annotation.AuthRuleAnnotation;
import com.glxp.sale.admin.constant.ConstantStatus;
@ -75,6 +76,10 @@ public class InvPreProductsController {
filterInvProductRequest.setCustomerId(null);
// filterInvProductRequest.setSupId();
}
if(StrUtil.isEmpty(filterInvProductRequest.getBatchNo()))
{
filterInvProductRequest.setBatchNo("empty");
}
List<InvProductDetailEntity> invProductDetailEntities = invProductDetailService.filterInvProduct(filterInvProductRequest);
PageInfo<InvProductDetailEntity> pageInfo;
pageInfo = new PageInfo<>(invProductDetailEntities);

@ -52,7 +52,6 @@ import java.util.List;
import java.util.Map;
@RestController
public class InvProductsController {
@ -135,7 +134,9 @@ public class InvProductsController {
if (Constant.SYSTEM_CUSTOMER_ID.equals(filterInvProductRequest.getCustomerId())) {
filterInvProductRequest.setCustomerId(null);
}
// filterInvProductRequest.setSupId(null);
if (StrUtil.isEmpty(filterInvProductRequest.getBatchNo())) {
filterInvProductRequest.setBatchNo("empty");
}
List<InvProductDetailEntity> invProductDetailEntities = invProductDetailService.filterInvProduct(filterInvProductRequest);
PageInfo<InvProductDetailEntity> pageInfo;
pageInfo = new PageInfo<>(invProductDetailEntities);

@ -90,6 +90,18 @@ public class InvWarehouseController {
}
@AuthRuleAnnotation("")
@GetMapping("spms/inv/warehouse/filterByUser")
public BaseResponse filterByUser(FilterInvWarehouseRequest filterInvWarehouseRequest) {
AuthAdmin authAdmin = customerService.getUserBean();
filterInvWarehouseRequest.setPid(0);
filterInvWarehouseRequest.setStatus(1);
filterInvWarehouseRequest.setUserId(authAdmin.getId().intValue());
List<InvWarehouseEntity> mInvWarehouseEntities = invWarehouseService.filterAllByUser(filterInvWarehouseRequest);
return ResultVOUtils.success(mInvWarehouseEntities);
}
@AuthRuleAnnotation("")
@GetMapping("spms/inv/warehouse/filterAllLocInv")
public BaseResponse filterAllLocInv(FilterInvWarehouseRequest filterInvWarehouseRequest) {

@ -22,4 +22,5 @@ public interface BussinessChangeTypeDao {
boolean deleteByAction(@Param("scAction") String scAction);
boolean deleteByLocaAction(@Param("action") String action);
}

@ -0,0 +1,31 @@
package com.glxp.sale.admin.entity.basic;
import lombok.Data;
import java.util.Date;
@Data
public class SpsBusLoclTypeResponse {
private Integer id;
private String action;
private String name;
private String localAction;
private String originAction;
private String mainAction;
private String localName;
private String remark;
private boolean checkEnable;
private boolean advanceType;
private boolean spUse;
private String storageCode;
private int corpType;
private String defaultUnit;
private boolean genUnit;
private String thirdAction;
private String thirdSys;
private Date updateTime;
private String prefix;
private String localPrefix;
private boolean preIn;
}

@ -39,6 +39,7 @@ public class ThrProductsAddEntity {
private String remark1; //备注1
private String remark2; //备注2
private String remark3; //备注3
private String price;
private Integer checkStatus;
private String customerId;
}

@ -27,6 +27,7 @@ public class ThrProductsEntity {
private Date updateTime;
private String supName;
private boolean isChecked;
private String price;
//添加字段
private String model; //型号

@ -0,0 +1,19 @@
package com.glxp.sale.admin.req.basic;
import com.glxp.sale.admin.req.ListPageRequest;
import lombok.Data;
import java.util.Date;
@Data
public class BasicEntrustRecRequest extends ListPageRequest {
private Integer id;
private String action;
private String entrustInv;
private String entrustUser;
private String userId;
private Date updateTime;
}

@ -22,6 +22,7 @@ public class CombineRequest {
private Boolean supEnable;
private String manufactory;
private String supName;
private String price;
private boolean idSpliUdi;
private String uuid;
}

@ -22,5 +22,7 @@ public class FilterThrProductsRequest extends ListPageRequest {
private Integer checkStatus;
private String customerId;
private String supId;
private String sptm;
private String lastUpdateTime;
private String ybbm;
}

@ -3,6 +3,7 @@ package com.glxp.sale.admin.res.basic;
import com.glxp.sale.admin.entity.basic.BussinessLocalTypeEntity;
import com.glxp.sale.admin.entity.basic.BussinessOriginTypeEntity;
import com.glxp.sale.admin.entity.basic.BussinessTypeEntity;
import com.glxp.sale.admin.entity.basic.SpsBusLoclTypeResponse;
import lombok.Data;
import java.util.List;
@ -12,5 +13,5 @@ public class SpsSyncBusResponse {
private List<BussinessTypeEntity> bussinessTypeEntities;
private List<BussinessOriginTypeEntity> bussinessOriginTypeEntities;
private List<BussinessLocalTypeEntity> bussinessLocalTypeEntities;
private List<SpsBusLoclTypeResponse> bussinessLocalTypeEntities;
}

@ -67,6 +67,7 @@ public class UdiRelevanceResponse {
private String companyName;
private String originUuid;
private boolean allowNoBatch;
private String price;
public int getBhzxxsbzsl() {
if (bhzxxsbzsl == null || bhzxxsbzsl == 0) {

@ -20,4 +20,6 @@ public interface BussinessChangeTypeService {
boolean deleteById(String id);
boolean deleteByAction(String scAction);
boolean deleteByLocaAction(String action);
}

@ -55,4 +55,10 @@ public class BussinessChangeTypeServiceaImpl implements BussinessChangeTypeServi
public boolean deleteByAction(String scAction) {
return bussinessChangeTypeDao.deleteByAction(scAction);
}
@Override
public boolean deleteByLocaAction(String action) {
return bussinessChangeTypeDao.deleteByLocaAction(action);
}
}

@ -239,7 +239,7 @@ public class OrderServiceImpl implements OrderService {
BussinessTypeEntity supplementType = bussinessTypeDao.selectByAction(bussinessTypeEntity.getSupplementOrderType());
supplementOrder.setMainAction(supplementType.getMainAction());
supplementOrder.setAction(supplementType.getAction());
supplementOrder.setErpFk(null);
// String time = DateUtil.getBeforeMinute(supplementOrder.getActDate(), 5);
// supplementOrder.setActDate(time);

@ -1,9 +1,13 @@
package com.glxp.sale.admin.service.inventory.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageHelper;
import com.glxp.sale.admin.constant.ConstantType;
import com.glxp.sale.admin.dao.inventory.InvPreInProductDao;
import com.glxp.sale.admin.dao.inventory.InvPreInProductDetailDao;
import com.glxp.sale.admin.entity.inventory.InvProductDetailEntity;
import com.glxp.sale.admin.entity.inventory.InvProductEntity;
import com.glxp.sale.admin.req.inventory.FilterInvProductDetailRequest;
import com.glxp.sale.admin.res.inventory.InvProductDetailJoinResponse;
import com.glxp.sale.admin.service.inventory.InvPreInProductDetailService;
@ -20,6 +24,8 @@ public class InvPreInProductDetailServiceImpl implements InvPreInProductDetailSe
@Resource
InvPreInProductDetailDao invPreInProductDetailDao;
@Resource
InvPreInProductDao invPreInProductDao;
@Override
public List<InvProductDetailEntity> filterInvProduct(FilterInvProductDetailRequest filterInvProductDetailRequest) {
@ -88,27 +94,42 @@ public class InvPreInProductDetailServiceImpl implements InvPreInProductDetailSe
FilterInvProductDetailRequest filterInvProductDetailRequest = new FilterInvProductDetailRequest();
filterInvProductDetailRequest.setOriginCode(code);
List<InvProductDetailEntity> datas = invPreInProductDetailDao.filterInvProductDetail(filterInvProductDetailRequest);
Map<String, InvProductDetailEntity> invProductDetailEntityMap = new HashMap<>();
for (InvProductDetailEntity invProductDetailEntity : datas) {
InvProductDetailEntity temp = invProductDetailEntityMap.get(invProductDetailEntity.getCode());
if (temp == null) {
invProductDetailEntityMap.put(invProductDetailEntity.getOriginCode(), invProductDetailEntity);
if (CollUtil.isNotEmpty(datas)) {
InvProductDetailEntity invProductDetailEntity = datas.get(0);
String bacthNo = null;
if (StrUtil.isEmpty(invProductDetailEntity.getBatchNo())) {
bacthNo = "empty";
} else {
int count1 = 0;
int count2 = 0;
if (temp.getMainAction().equals(ConstantType.TYPE_PUT)) {
count1 = temp.getCount();
} else {
count1 = 0 - temp.getCount();
}
if (invProductDetailEntity.getMainAction().equals(ConstantType.TYPE_PUT)) {
count2 = invProductDetailEntity.getCount();
} else {
count2 = 0 - invProductDetailEntity.getCount();
}
temp.setCount(count1 + count2);
bacthNo = invProductDetailEntity.getBatchNo();
}
InvProductEntity invProductEntity = invPreInProductDao.selectByUuid(invProductDetailEntity.getProductIdFk(), bacthNo, invProductDetailEntity.getSupId(), invProductDetailEntity.getInvStorageCode(), invProductDetailEntity.getInvWarehouseCode());
invProductDetailEntity.setCount(invProductEntity.getInCount() - invProductEntity.getOutCount());
return invProductDetailEntity;
}
return invProductDetailEntityMap.get(code);
return null;
// Map<String, InvProductDetailEntity> invProductDetailEntityMap = new HashMap<>();
// for (InvProductDetailEntity invProductDetailEntity : datas) {
// InvProductDetailEntity temp = invProductDetailEntityMap.get(invProductDetailEntity.getOriginCode());
// if (temp == null) {
// invProductDetailEntityMap.put(invProductDetailEntity.getOriginCode(), invProductDetailEntity);
// } else {
// int count1 = 0;
// int count2 = 0;
// if (temp.getMainAction().equals(ConstantType.TYPE_PUT)) {
// count1 = temp.getCount();
// } else {
// count1 = 0 - temp.getCount();
// }
// if (invProductDetailEntity.getMainAction().equals(ConstantType.TYPE_PUT)) {
// count2 = invProductDetailEntity.getCount();
// } else {
// count2 = 0 - invProductDetailEntity.getCount();
// }
// temp.setCount(count1 + count2);
// }
// }
}
}

@ -53,17 +53,6 @@ public class InvPreProductServiceImpl implements InvPreProductService {
return invPreProductDao.selectByUuid(uuid, batchNo, supId, invStorageCode, invWarehouseCode);
// FilterInvProductRequest filterInvProductRequest = new FilterInvProductRequest();
// filterInvProductRequest.setRelIdFk(uuid);
// filterInvProductRequest.setBatchNo(batchNo);
// filterInvProductRequest.setSupId(supId);
// filterInvProductRequest.setInvWarehouseCode(invWarehouseCode);
// filterInvProductRequest.setInvStorageCode(invStorageCode);
// List<InvProductEntity> data = filterInvProduct(filterInvProductRequest);
// if (data != null && data.size() > 0) {
// return data.get(0);
// }
// return null;
}
@Override

@ -78,10 +78,6 @@ public class BasicBackUpdateProductService {
Map<String, ErpProductsResponse> erpProductsMap = new HashMap<>();
if (invmandocResponses != null && invmandocResponses.size() > 0) {
List<String> inventoryCodes = new ArrayList<>();
// if (filterErpGoodsRequest.getCode() != null) {
// inventoryCodes.add(filterErpGoodsRequest.getCode());
// erpProductsMap.put(filterErpGoodsRequest.getCode(), invmandocResponses.get(0));
// } else {
for (ErpProductsResponse invmandocResponse : invmandocResponses) {
UdiRelevanceEntity udiRelevanceEntity = udiRelevanceService.selectByThirdId(invmandocResponse.getCode(), thirdSysId);
if (udiRelevanceEntity == null) {
@ -238,11 +234,12 @@ public class BasicBackUpdateProductService {
udiRelevanceEntity1.setMainId(udiRelevanceEntity1.getThirdId4());
udiRelevanceEntity1.setMainName(udiRelevanceEntity1.getThirdName4());
}
udiRelevanceEntity1.setPrice(thrProductsEntity.getPrice());
udiRelevanceEntity1.setManufactory(thrProductsEntity.getManufactory());
udiRelevanceEntity1.setThirdId(thrProductsEntity.getCode());
udiRelevanceEntity1.setThirdName(thrProductsEntity.getName());
udiRelevanceEntity1.setUpdateTime(DateUtil.getDateTime());
udiRelevanceEntity1.setId(gennerOrderUtils.getRelId() + "");
udiRelevanceService.insertUdiRelevanceignore(udiRelevanceEntity1);
}
}
@ -256,14 +253,14 @@ public class BasicBackUpdateProductService {
public void syncUpdatetTime() {
//自动创建要求被下载已完成单据任务
BasicExportStatusEntity basicExportStatusEntity1 = basicExportService.findByData("AutoDownloadOrder", 0);
BasicExportStatusEntity basicExportStatusEntity1 = basicExportService.findByData(ConstantStatus.SYNC_SCAN_ORDER, 0);
if (basicExportStatusEntity1 == null) {
BaseResponse<SpsSyncOrderResponse> baseResponse = spsSyncDownloadService.findOrder(getRequest("AutoDownloadOrder"));
BaseResponse<SpsSyncOrderResponse> baseResponse = spsSyncDownloadService.findOrder(getRequest(ConstantStatus.SYNC_SCAN_ORDER));
SpsSyncOrderResponse syncOrderResponse = baseResponse.getData();
if (CollUtil.isNotEmpty(syncOrderResponse.getOrderEntities())) {
BasicExportStatusEntity orderStatusEntity = new BasicExportStatusEntity();
orderStatusEntity.setId(CustomUtil.getId());
orderStatusEntity.setIdDatas("AutoDownloadOrder");
orderStatusEntity.setIdDatas(ConstantStatus.SYNC_SCAN_ORDER);
orderStatusEntity.setType(BasicProcessStatus.NEW_ALL_ORDER);
orderStatusEntity.setUpdateTime(new Date());
orderStatusEntity.setStatus(0);
@ -275,17 +272,17 @@ public class BasicBackUpdateProductService {
//自动创建要求被下载单据类型任务
BasicExportStatusEntity basicExportStatusEntity2 = basicExportService.findByData("AutoDownloadBusType", 0);
BasicExportStatusEntity basicExportStatusEntity2 = basicExportService.findByData(ConstantStatus.SYNC_BUS_TYPE, 0);
if (basicExportStatusEntity2 == null) {
BaseResponse<SpsSyncBusResponse> baseResponse = spsSyncDownloadService.findBusType(getRequest("AutoDownloadBusType"));
BaseResponse<SpsSyncBusResponse> baseResponse = spsSyncDownloadService.findBusType(getRequest(ConstantStatus.SYNC_BUS_TYPE));
SpsSyncBusResponse spsSyncBusResponse = baseResponse.getData();
if (CollUtil.isNotEmpty(spsSyncBusResponse.getBussinessLocalTypeEntities())
|| CollUtil.isNotEmpty(spsSyncBusResponse.getBussinessOriginTypeEntities())
|| CollUtil.isNotEmpty(spsSyncBusResponse.getBussinessTypeEntities())) {
BasicExportStatusEntity busTypetatusEntity = new BasicExportStatusEntity();
busTypetatusEntity.setId(CustomUtil.getId());
busTypetatusEntity.setIdDatas("AutoDownloadBusType");
busTypetatusEntity.setIdDatas(ConstantStatus.SYNC_BUS_TYPE);
busTypetatusEntity.setType(BasicProcessStatus.NEW_ALL_BUS);
busTypetatusEntity.setUpdateTime(new Date());
busTypetatusEntity.setStatus(0);
@ -297,11 +294,10 @@ public class BasicBackUpdateProductService {
//自动创建要求被下载基础信息任务
BasicExportStatusEntity basicExportStatusEntity3 = basicExportService.findByData("AutoDownloadAllData", 0);
BasicExportStatusEntity basicExportStatusEntity3 = basicExportService.findByData(ConstantStatus.SYNC_BASIC_DATA, 0);
if (basicExportStatusEntity3 == null) {
BaseResponse<SpsSyncDataResponse> baseResponse = spsSyncDownloadService.findProductInfo(getRequest("AutoDownloadAllData"));
BaseResponse<SpsSyncDataResponse> baseResponse = spsSyncDownloadService.findProductInfo(getRequest(ConstantStatus.SYNC_BASIC_DATA));
SpsSyncDataResponse spsSyncDataResponse = baseResponse.getData();
if (CollUtil.isNotEmpty(spsSyncDataResponse.getThrOrderDetailEntities())
|| CollUtil.isNotEmpty(spsSyncDataResponse.getThrOrderEntities())
|| CollUtil.isNotEmpty(spsSyncDataResponse.getInvWarehouseEntities())
@ -315,7 +311,7 @@ public class BasicBackUpdateProductService {
) {
BasicExportStatusEntity basicExportStatusEntity = new BasicExportStatusEntity();
basicExportStatusEntity.setId(CustomUtil.getId());
basicExportStatusEntity.setIdDatas("AutoDownloadAllData");
basicExportStatusEntity.setIdDatas(ConstantStatus.SYNC_BASIC_DATA);
basicExportStatusEntity.setType(BasicProcessStatus.NEW_ALL_DATA);
basicExportStatusEntity.setUpdateTime(new Date());
basicExportStatusEntity.setStatus(0);
@ -326,15 +322,15 @@ public class BasicBackUpdateProductService {
}
//自动创建要求被下载同步库DI信息
BasicExportStatusEntity basicExportStatusEntity4 = basicExportService.findByData("AutoDownloadDiProducts", 0);
BasicExportStatusEntity basicExportStatusEntity4 = basicExportService.findByData(ConstantStatus.SYNC_DI_PRODUCTS, 0);
if (basicExportStatusEntity4 == null) {
BaseResponse<SpSyncUdiResponse> baseResponse = spsSyncDownloadService.syncUdi(getRequest("AutoDownloadDiProducts"));
BaseResponse<SpSyncUdiResponse> baseResponse = spsSyncDownloadService.syncUdi(getRequest(ConstantStatus.SYNC_DI_PRODUCTS));
SpSyncUdiResponse spSyncUdiResponse = baseResponse.getData();
if (CollUtil.isNotEmpty(spSyncUdiResponse.getProductInfoEntityList())
|| CollUtil.isNotEmpty(spSyncUdiResponse.getUdiCompanyEntities())) {
BasicExportStatusEntity basicExportStatusEntity = new BasicExportStatusEntity();
basicExportStatusEntity.setId(CustomUtil.getId());
basicExportStatusEntity.setIdDatas("AutoDownloadDiProducts");
basicExportStatusEntity.setIdDatas(ConstantStatus.SYNC_DI_PRODUCTS);
basicExportStatusEntity.setType(BasicProcessStatus.NEW_ALL_DI);
basicExportStatusEntity.setUpdateTime(new Date());
basicExportStatusEntity.setStatus(0);

@ -99,6 +99,7 @@ public class BasicUpdateProductService {
udiRelevanceEntity1.setThirdName(thrProductsEntity.getName());
udiRelevanceEntity1.setUpdateTime(DateUtil.getDateTime());
udiRelevanceEntity1.setSupName(thrProductsEntity.getSupName());
udiRelevanceEntity1.setPrice(thrProductsEntity.getPrice());
udiRelevanceEntity1.setManufactory(udiInfoEntity.getManufactory());
BasicThirdSysEntity basicThirdSysEntity = basicThirdSysService.selectMainThrSys();
String mainSys = basicThirdSysEntity.getThirdId();
@ -120,11 +121,12 @@ public class BasicUpdateProductService {
}
UdiRelevanceEntity udiRelevanceEntity = udiRelevanceService.selectUpteaByAll(udiRelevanceEntity1.getUuid(), udiRelevanceEntity1.getMainId());
if (udiRelevanceEntity == null) {
udiRelevanceEntity1.setId(gennerOrderUtils.getRelId() + "");
udiRelevanceService.insertUdiRelevanceignore(udiRelevanceEntity1);
} else {
errMsg = errMsg + "产品编码:" + udiRelevanceEntity1.getMainId() + "已存在!;";
}
udiRelevanceService.insertUdiRelevanceignore(udiRelevanceEntity1);
// udiRelevanceService.insertUdiRelevanceignore(udiRelevanceEntity1);
}
}
}
@ -169,6 +171,7 @@ public class BasicUpdateProductService {
udiRelevanceEntity1.setUuid(udiInfoEntity.getUuid());
udiRelevanceEntity1.setThirdName(thrProductsEntity.getName());
udiRelevanceEntity1.setUpdateTime(DateUtil.getDateTime());
udiRelevanceEntity1.setPrice(thrProductsEntity.getPrice());
udiRelevanceEntity1.setSupName(thrProductsEntity.getSupName());
udiRelevanceEntity1.setManufactory(udiInfoEntity.getManufactory());
@ -192,9 +195,10 @@ public class BasicUpdateProductService {
}
UdiRelevanceEntity udiRelevanceEntity = udiRelevanceService.selectUpteaByAll(udiRelevanceEntity1.getUuid(), udiRelevanceEntity1.getMainId());
if (udiRelevanceEntity == null) {
udiRelevanceEntity1.setId(gennerOrderUtils.getRelId() + "");
udiRelevanceService.insertUdiRelevanceignore(udiRelevanceEntity1);
} else {
errMsg = errMsg + "产品编码:" + udiRelevanceEntity1.getMainId() + "已存在,将直接选入!;";
errMsg = errMsg + "产品编码:" + udiRelevanceEntity1.getMainId() + "已存在,将直接选入!";
}
UdiRelevanceEntity temp = udiRelevanceService.selectUpteaByAll(udiRelevanceEntity1.getUuid(), udiRelevanceEntity1.getMainId());
rlIds.add(temp.getId());

@ -1,5 +1,6 @@
package com.glxp.sale.admin.thread;
import com.glxp.sale.admin.entity.basic.UdiRelevanceEntity;
import com.glxp.sale.admin.entity.info.CompanyProductRelevanceEntity;
import com.glxp.sale.admin.req.basic.FilterUdiInfoRequest;
import com.glxp.sale.admin.req.basic.UdiInfoExportRequest;
@ -29,6 +30,9 @@ public class CompanyProductsRelService {
List<String> rlIdS = udiInfoExportRequest.getRlIds();
for (String uuid : rlIdS) {
CompanyProductRelevanceEntity companyProductRelevanceEntity = new CompanyProductRelevanceEntity();
UdiRelevanceEntity udiRelevanceEntity = udiRelevanceService.selectById(uuid);
if (udiRelevanceEntity != null)
companyProductRelevanceEntity.setPrice(udiRelevanceEntity.getPrice());
companyProductRelevanceEntity.setCreate_time(new Date());
companyProductRelevanceEntity.setUpdate_time(new Date());
companyProductRelevanceEntity.setAuditStatus("3");

@ -807,14 +807,17 @@ public class InvProductsTrService {
orderEntity, WarehouseEntity warehouseEntity) {
InvProductEntity invProductEntity = new InvProductEntity();
invProductEntity.setRelIdFk(relId);
invProductEntity.setBatchNo(erpOrderEntity.getBatchNo());
if (StrUtil.isNotEmpty(erpOrderEntity.getBatchNo())) {
invProductEntity.setBatchNo(erpOrderEntity.getBatchNo());
} else
invProductEntity.setBatchNo(null);
invProductEntity.setCustomerId(orderEntity.getCustomerId());
invProductEntity.setExpireDate(erpOrderEntity.getExpireDate());
invProductEntity.setProductionDate(erpOrderEntity.getProductDate());
invProductEntity.setGgxh(erpOrderEntity.getPackSpec());
invProductEntity.setSupId(warehouseEntity.getSupId());
invProductEntity.setNameCode(erpOrderEntity.getNameCode());
invProductEntity.setPrice(erpOrderEntity.getPrice()+"");
invProductEntity.setPrice(erpOrderEntity.getPrice() + "");
invProductEntity.setProductsName(erpOrderEntity.getCoName());
invProductEntity.setYlqxzcrbarmc(erpOrderEntity.getProductCompany());
invProductEntity.setZczbhhzbapzbh(erpOrderEntity.getAuthCode());
@ -854,7 +857,10 @@ public class InvProductsTrService {
warehouseEntity.setCode(code);
}
invProductDetailEntity.setCode(code);
invProductDetailEntity.setBatchNo(warehouseEntity.getBatchNo());
if (StrUtil.isEmpty(warehouseEntity.getBatchNo())) {
invProductDetailEntity.setBatchNo(null);
} else
invProductDetailEntity.setBatchNo(warehouseEntity.getBatchNo());
invProductDetailEntity.setProductionDate(warehouseEntity.getProduceDate());
invProductDetailEntity.setExpireDate(warehouseEntity.getExpireDate());
invProductDetailEntity.setAction(warehouseEntity.getAction());

@ -1,5 +1,6 @@
package com.glxp.sale.admin.thread;
import cn.hutool.core.util.StrUtil;
import com.glxp.sale.admin.constant.ConstantStatus;
import com.glxp.sale.admin.constant.ConstantType;
import com.glxp.sale.admin.entity.basic.BasicUnitMaintainEntity;
@ -768,7 +769,10 @@ public class InvProductsTrService_back {
InvProductDetailEntity invProductDetailEntity = new InvProductDetailEntity();
invProductDetailEntity.setProductIdFk(erpOrderEntity.getGoodsid() + "");
invProductDetailEntity.setCode(warehouseEntity.getCode());
invProductDetailEntity.setBatchNo(warehouseEntity.getBatchNo());
if (StrUtil.isEmpty(warehouseEntity.getBatchNo())) {
invProductDetailEntity.setBatchNo(null);
} else
invProductDetailEntity.setBatchNo(warehouseEntity.getBatchNo());
invProductDetailEntity.setProductionDate(warehouseEntity.getProduceDate());
invProductDetailEntity.setExpireDate(warehouseEntity.getExpireDate());
invProductDetailEntity.setAction(warehouseEntity.getAction());

@ -823,6 +823,10 @@ public class IoTransInoutService {
orderEntity.setContrastStatus(ConstantStatus.ORDER_CHECK_UN);
orderEntity.setUpdateTime(new Date());
orderService.updateOrder(orderEntity);
if (stockOrderEntity.getStatus().equals(ConstantStatus.SORDER_DELIVER)) {
invProductsTrService.genInvProducts(orderEntity.getId());
}
} else {
orderEntity.setRemark("该产品DI绑定多个产品ID请在扫码单据详情绑定对应产品ID");
orderEntity.setContrastStatus(ConstantStatus.ORDER_CHECK_FAIL);
@ -891,7 +895,7 @@ public class IoTransInoutService {
}
} else {
stockOrderEntity.setStatus(ConstantStatus.SORDER_DELIVER);
invProductsTrService.genInvProducts(orderEntity.getId());
// invProductsTrService.genInvProducts(orderEntity.getId());
}
stockOrderEntity.setSupplementNo(orderEntity.getSupplementNo());
stockOrderEntity.setCorpName(orderEntity.getFromCorp());

@ -36,8 +36,8 @@ logging.file=D:/glxpdata/udiwms/udiwms.log
file_path=D:/glxpdata/udiwms
#UDI\u6570\u636E\u4E0B\u8F7D
UDI_KEY=6b137c66-6286-46c6-8efa-c2f5dd9237df
#UDI_SERVER_URL=https://www.udims.com/UDI_DL_Server_test
UDI_SERVER_URL=http://127.0.0.1:9994
UDI_SERVER_URL=https://www.udims.com/UDI_DL_Server_test
#UDI_SERVER_URL=http://127.0.0.1:9994
#UDI_SERVER_URL=https://www.udims.com/UDI_DL_Server
#UCLOD\u670D\u52A1
#UCLOD_SERVER_URL=http://127.0.0.1:9997

@ -22,8 +22,8 @@
<if test="scheduleType!=null">
and scheduleType = #{scheduleType}
</if>
</where>
order by updateTime desc
</select>
@ -55,6 +55,7 @@
<if test="startTime != null">startTime=#{startTime},</if>
<if test="endTime != null">endTime=#{endTime},</if>
<if test="remark != null">remark=#{remark},</if>
</trim>
WHERE id = #{id}
</update>

@ -17,12 +17,12 @@
parameterType="com.glxp.sale.admin.entity.basic.BussinessChangeTypeEntity">
insert
INTO basic_bustype_pre
(action, scAction, `index`, remark, beforeTime,intro,changeType)
(action, scAction, `index`, remark, beforeTime, intro, changeType)
values (#{action},
#{scAction},
#{index},
#{remark},
#{beforeTime},#{intro},#{changeType})
#{beforeTime}, #{intro}, #{changeType})
</insert>
<update id="updateBusChangeType" parameterType="com.glxp.sale.admin.entity.basic.BussinessChangeTypeEntity">
@ -54,6 +54,11 @@
</delete>
<delete id="deleteByLocaAction" parameterType="Map">
DELETE
FROM basic_bustype_pre
WHERE `action` = #{action}
</delete>
<select id="selectById" parameterType="Map" resultType="com.glxp.sale.admin.entity.basic.BussinessChangeTypeEntity">
select *
FROM basic_bustype_pre

@ -12,7 +12,7 @@
basic_udirel.thirdName1,basic_udirel.thirdName2,basic_udirel.thirdName3,basic_udirel.thirdName4,
basic_udirel.manufactory,basic_udirel.measname,basic_udirel.ybbm,basic_udirel.sptm,
basic_udirel.isDisable, basic_udirel.isLock,basic_udirel.lockStatus,basic_udirel.udplatCode,
basic_udirel.isAdavence,basic_udirel.mainId,basic_udirel.allowNoBatch,
basic_udirel.isAdavence,basic_udirel.mainId,basic_udirel.allowNoBatch,basic_udirel.price,
basic_products.nameCode,basic_products.packRatio,basic_products.packLevel,
basic_products.bhxjsl,basic_products.bhzxxsbzsl,basic_products.zxxsbzbhsydysl,
basic_products.bhxjcpbm,basic_products.bzcj,
@ -95,7 +95,7 @@
basic_udirel.thirdId,basic_udirel.thirdName,basic_udirel.isUseDy,
basic_udirel.thirdId1,basic_udirel.thirdId2,basic_udirel.thirdId3,basic_udirel.thirdId4,
basic_udirel.thirdName1,basic_udirel.thirdName2,basic_udirel.thirdName3,basic_udirel.thirdName4,
basic_udirel.manufactory,basic_udirel.measname,basic_udirel.ybbm,basic_udirel.sptm,
basic_udirel.manufactory,basic_udirel.measname,basic_udirel.ybbm,basic_udirel.sptm,basic_udirel.price,
basic_udirel.isDisable, basic_udirel.isLock,basic_udirel.lockStatus,basic_udirel.udplatCode,
basic_udirel.isAdavence,basic_udirel.mainId,basic_udirel.allowNoBatch,
basic_products.nameCode,basic_products.packRatio,basic_products.packLevel,
@ -187,7 +187,7 @@
basic_udirel.thirdId1,basic_udirel.thirdId2,basic_udirel.thirdId3,basic_udirel.thirdId4,
basic_udirel.ybbm,basic_udirel.sptm,basic_udirel.isDisable, basic_udirel.isLock,basic_udirel.lockStatus,
basic_udirel.thirdName1,basic_udirel.thirdName2,basic_udirel.thirdName3,basic_udirel.thirdName4,
basic_udirel.manufactory,basic_udirel.measname,basic_udirel.udplatCode,basic_udirel.allowNoBatch,
basic_udirel.manufactory,basic_udirel.measname,basic_udirel.udplatCode,basic_udirel.allowNoBatch,basic_udirel.price,
basic_products.nameCode,basic_products.packRatio,basic_products.packLevel,basic_products.bhxjsl,
basic_products.bhzxxsbzsl,basic_products.zxxsbzbhsydysl,basic_products.bhxjcpbm,basic_products.bzcj,
basic_products.addType,basic_products.deviceRecordKey,basic_products.cpmctymc,basic_products.cplb,
@ -393,7 +393,7 @@
(id,
thirdId,thirdName,uuid,isUseDy,updateTime,
thirdId1,thirdId2,thirdId3,thirdId4,thirdName1,thirdName2,thirdName3,thirdName4,manufactory,measname,ybbm,sptm,isDisable,isLock
,mainId,mainName,lockStatus,udplatCode,isAdavence,supName,allowNoBatch
,mainId,mainName,lockStatus,udplatCode,isAdavence,supName,allowNoBatch,price
)
values
(
@ -423,7 +423,7 @@
#{udplatCode},
#{isAdavence},
#{supName},
#{allowNoBatch}
#{allowNoBatch},#{price}
)
</insert>
@ -436,7 +436,7 @@
(id,
thirdId,thirdName,uuid,isUseDy,updateTime,
thirdId1,thirdId2,thirdId3,thirdId4,thirdName1,thirdName2,thirdName3,thirdName4,manufactory,measname,ybbm,sptm,isDisable,isLock
,mainId,mainName,lockStatus,udplatCode,isAdavence,supName,allowNoBatch
,mainId,mainName,lockStatus,udplatCode,isAdavence,supName,allowNoBatch,price
)
values
(
@ -466,7 +466,7 @@
#{udplatCode},
#{isAdavence},
#{supName},
#{allowNoBatch}
#{allowNoBatch},#{price}
)
</insert>
@ -516,6 +516,8 @@
<if test="isAdavence != null">isAdavence=#{isAdavence},</if>
<if test="supName != null">supName=#{supName},</if>
<if test="allowNoBatch != null">allowNoBatch=#{allowNoBatch},</if>
<if test="price != null">price=#{price},</if>
</trim>
WHERE id = #{id}
</update>
@ -540,7 +542,7 @@
<insert id="importUdiRelevance" parameterType="java.util.List">
replace into basic_udirel (id, thirdId, thirdName, uuid, isUseDy, updateTime, thirdId1, thirdId2, thirdId3,
thirdId4, thirdName1, thirdName2, thirdName3, thirdName4, ybbm, sptm, manufactory,
measname, isDisable, mainId, mainName, udplatCode,supName,allowNoBatch)
measname, isDisable, mainId, mainName, udplatCode,supName,allowNoBatch,price)
values
<foreach collection="udiRelevanceEntities" item="item" index="index" separator=",">
(#{item.id},
@ -564,7 +566,7 @@
#{item.isDisable},
#{item.mainId},
#{item.mainName},
#{item.udplatCode},#{item.supName},#{item.allowNoBatch})
#{item.udplatCode},#{item.supName},#{item.allowNoBatch},#{item.price})
</foreach>
</insert>
</mapper>

@ -505,6 +505,7 @@
resultType="com.glxp.sale.admin.entity.inout.OrderEntity">
SELECT * FROM io_order
<where>
<if test="status != '' and status!=null">
and status = #{status}
</if>
@ -512,7 +513,7 @@
and receiveStatus = #{receiveStatus}
</if>
<if test="lastUpdateTime!=null and lastUpdateTime!=''">
and <![CDATA[ DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S')>= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S') ]]>
<![CDATA[ and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S')>= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S') ]]>
</if>
<if test="filterActions!=null">
and `action` in

@ -22,6 +22,7 @@
<if test="batchNo != '' and batchNo != null">
AND batchNo = #{batchNo}
</if>
<if test="productionDate != '' and productionDate != null">
AND productionDate = #{productionDate}
</if>
@ -86,6 +87,9 @@
<if test="batchNo != '' and batchNo != null">
AND batchNo = #{batchNo}
</if>
<if test="batchNo == '' || batchNo == null">
AND batchNo is NULL
</if>
<if test="invStorageCode != '' and invStorageCode != null">
AND invStorageCode = #{invStorageCode}
</if>

@ -27,9 +27,12 @@
AND purchaseType = #{purchaseType}
</if>
<if test="batchNo != '' and batchNo != null">
<if test="batchNo != '' and batchNo != null and batchNo!='empty'">
AND batchNo = #{batchNo}
</if>
<if test="batchNo == 'empty'">
AND batchNo is NULL
</if>
<if test="unitFk != '' and unitFk != null">
AND unitFk = #{unitFk}
</if>
@ -77,9 +80,12 @@
AND purchaseType = #{purchaseType}
</if>
<if test="batchNo != '' and batchNo != null">
<if test="batchNo != '' and batchNo != null and batchNo!='empty'">
AND batchNo = #{batchNo}
</if>
<if test="batchNo == 'empty'">
AND batchNo is NULL
</if>
<if test="unitFk != '' and unitFk != null">
AND unitFk = #{unitFk}
</if>
@ -128,9 +134,12 @@
AND purchaseType = #{purchaseType}
</if>
<if test="batchNo != '' and batchNo != null">
<if test="batchNo != '' and batchNo != null and batchNo!='empty'">
AND batchNo = #{batchNo}
</if>
<if test="batchNo == 'empty'">
AND batchNo is NULL
</if>
<if test="unitFk != '' and unitFk != null">
AND unitFk = #{unitFk}
</if>
@ -214,6 +223,9 @@
<if test="batchNo != '' and batchNo != null">
AND batchNo = #{batchNo}
</if>
<if test="batchNo == '' || batchNo == null">
AND batchNo is NULL
</if>
<if test="supId != '' and supId != null">
AND supId = #{supId}
</if>
@ -265,6 +277,9 @@
<if test="batchNo != '' and batchNo != null">
AND batchNo = #{batchNo}
</if>
<if test="batchNo == '' || batchNo == null">
AND batchNo is NULL
</if>
<if test="unitFk != '' and unitFk != null">
AND unitFk = #{unitFk}
</if>

@ -87,6 +87,10 @@
<if test="batchNo != '' and batchNo != null">
AND batchNo = #{batchNo}
</if>
<if test="batchNo == '' || batchNo == null">
AND batchNo is NULL
</if>
<if test="invWarehouseCode != '' and invWarehouseCode != null">
AND invWarehouseCode = #{invWarehouseCode}
</if>

@ -27,9 +27,12 @@
AND purchaseType = #{purchaseType}
</if>
<if test="batchNo != '' and batchNo != null">
<if test="batchNo != '' and batchNo != null and batchNo!='empty'">
AND batchNo = #{batchNo}
</if>
<if test="batchNo == 'empty'">
AND batchNo is NULL
</if>
<if test="unitFk != '' and unitFk != null">
AND unitFk = #{unitFk}
</if>
@ -78,9 +81,12 @@
AND purchaseType = #{purchaseType}
</if>
<if test="batchNo != '' and batchNo != null">
<if test="batchNo != '' and batchNo != null and batchNo!='empty'">
AND batchNo = #{batchNo}
</if>
<if test="batchNo == 'empty'">
AND batchNo is NULL
</if>
<if test="unitFk != '' and unitFk != null">
AND unitFk = #{unitFk}
</if>
@ -157,6 +163,9 @@
<if test="batchNo != '' and batchNo != null">
AND batchNo = #{batchNo}
</if>
<if test="batchNo == '' || batchNo == null">
AND batchNo is NULL
</if>
<if test="supId != '' and supId != null">
AND supId = #{supId}
</if>
@ -208,6 +217,9 @@
<if test="batchNo != '' and batchNo != null">
AND batchNo = #{batchNo}
</if>
<if test="batchNo == '' || batchNo == null">
AND batchNo is NULL
</if>
<if test="unitFk != '' and unitFk != null">
AND unitFk = #{unitFk}
</if>

@ -22,6 +22,7 @@
<if test="batchNo != '' and batchNo != null">
AND inv_product.batchNo like concat('%',#{batchNo},'%')
</if>
<if test="productionDate != '' and productionDate != null">
AND inv_product.productionDate = #{productionDate}
</if>
@ -85,6 +86,9 @@
<if test="batchNo != '' and batchNo != null">
AND batchNo = #{batchNo}
</if>
<if test="batchNo == '' || batchNo == null">
AND batchNo is NULL
</if>
<if test="invWarehouseCode != '' and invWarehouseCode != null">
AND invWarehouseCode = #{invWarehouseCode}
</if>

@ -27,9 +27,12 @@
AND purchaseType = #{purchaseType}
</if>
<if test="batchNo != '' and batchNo != null">
<if test="batchNo != '' and batchNo != null and batchNo!='empty'">
AND batchNo = #{batchNo}
</if>
<if test="batchNo == 'empty'">
AND batchNo is NULL
</if>
<if test="unitFk != '' and unitFk != null">
AND unitFk = #{unitFk}
</if>
@ -76,9 +79,12 @@
AND purchaseType = #{purchaseType}
</if>
<if test="batchNo != '' and batchNo != null">
<if test="batchNo != '' and batchNo != null and batchNo!='empty'">
AND batchNo = #{batchNo}
</if>
<if test="batchNo == 'empty'">
AND batchNo is NULL
</if>
<if test="unitFk != '' and unitFk != null">
AND unitFk = #{unitFk}
</if>
@ -155,6 +161,9 @@
<if test="batchNo != '' and batchNo != null">
AND batchNo = #{batchNo}
</if>
<if test="batchNo == '' || batchNo == null">
AND batchNo is NULL
</if>
<if test="supId != '' and supId != null">
AND supId = #{supId}
</if>
@ -206,6 +215,9 @@
<if test="batchNo != '' and batchNo != null">
AND batchNo = #{batchNo}
</if>
<if test="batchNo == '' || batchNo == null">
AND batchNo is NULL
</if>
<if test="unitFk != '' and unitFk != null">
AND unitFk = #{unitFk}
</if>
@ -252,6 +264,9 @@
<if test="batchNo != '' and batchNo != null">
AND batchNo = #{batchNo}
</if>
<if test="batchNo == '' || batchNo == null">
AND batchNo is NULL
</if>
<if test="unitFk != '' and unitFk != null">
AND unitFk = #{unitFk}
</if>

@ -38,6 +38,7 @@
<if test="spUse != null">
AND a.spUse = #{spUse}
</if>
</where>
</select>

@ -13,6 +13,12 @@
<if test="code != '' and code != null">
AND code LIKE concat('%',#{code},'%')
</if>
<if test="sptm != '' and sptm != null">
AND sptm LIKE concat('%',#{sptm},'%')
</if>
<if test="ybbm != '' and ybbm != null">
AND ybbm LIKE concat('%',#{ybbm},'%')
</if>
<if test="registerNo != '' and registerNo != null">
AND registerNo LIKE concat('%',#{registerNo},'%')
</if>
@ -22,22 +28,22 @@
<if test="spec != '' and spec != null">
AND spec LIKE concat('%',#{spec},'%')
</if>
<if test="supName != '' and supName != null">
AND supName LIKE concat('%',#{supName},'%')
</if>
<if test="unionCode != '' and unionCode != null">
or code LIKE concat('%',#{unionCode},'%') or sptm LIKE concat('%',#{unionCode},'%') or ybbm LIKE
concat('%',#{unionCode},'%')
</if>
<if test="thirdSysFk != '' and thirdSysFk != null">
AND thirdSysFk = #{thirdSysFk}
</if>
<if test="supName != '' and supName != null">
AND supName = #{supName}
</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>
ORDER BY updateTime DESC
</select>
@ -84,13 +90,10 @@
<insert id="insertThrProducts" keyProperty="id" parameterType="com.glxp.sale.admin.entity.thrsys.ThrProductsEntity">
replace
INTO thr_products
(
code,name,measname,spec,registerNo,manufactory,
cplb,flbm,qxlb,ybbm,sptm,tyshxydm,zczbhhzbapzbh,ylqxzcrbarmc,ylqxzcrbarywmc,cpms,
thirdSysFk,updateTime,supName
)
values
(
(code, `name`, measname, spec, registerNo, manufactory,
cplb, flbm, qxlb, ybbm, sptm, tyshxydm, zczbhhzbapzbh, ylqxzcrbarmc, ylqxzcrbarywmc, cpms,
thirdSysFk, updateTime, supName, model, standard, qtbm, zczyxqz, remark, remark1, remark2, remark3,price)
values (
#{code},
#{name},
#{measname},
@ -109,32 +112,38 @@
#{cpms},
#{thirdSysFk},
#{updateTime},
#{supName}
#{supName},
#{model},
#{standard},
#{qtbm},
#{zczyxqz},
#{remark},
#{remark1},
#{remark2},
#{remark3},#{price}
)
</insert>
<insert id="insertThrProductss" keyProperty="id" parameterType="java.util.List">
replace INTO thr_products
(
code,name,measname,spec,registerNo,manufactory,
cplb,flbm,qxlb,ybbm,sptm,tyshxydm,zczbhhzbapzbh,ylqxzcrbarmc,ylqxzcrbarywmc,cpms,
thirdSysFk,updateTime,supName
)
(code, `name`, measname, spec, registerNo, manufactory,
cplb, flbm, qxlb, ybbm, sptm, tyshxydm, zczbhhzbapzbh, ylqxzcrbarmc, ylqxzcrbarywmc, cpms,
thirdSysFk, updateTime, supName, model, standard, qtbm, zczyxqz, remark, remark1, remark2, remark3,price)
values
<foreach collection="thrProductsEntities" item="item" index="index"
separator=",">
(
#{item.code},
(#{item.code},
#{item.name},
#{item.measname},
#{item.spec},
#{item.registerNo},
#{item.manufactory},
#{item.cplb}, #{item.flbm}, #{item.qxlb}, #{item.ybbm},#{item.sptm},
#{item.tyshxydm}, #{item.zczbhhzbapzbh}, #{item.ylqxzcrbarmc}, #{item.ylqxzcrbarywmc},#{item.cpms},
#{item.thirdSysFk},#{item.updateTime},#{item.supName}
)
#{item.cplb}, #{item.flbm}, #{item.qxlb}, #{item.ybbm}, #{item.sptm},
#{item.tyshxydm}, #{item.zczbhhzbapzbh}, #{item.ylqxzcrbarmc}, #{item.ylqxzcrbarywmc}, #{item.cpms},
#{item.thirdSysFk}, #{item.updateTime}, #{item.supName}, #{item.model}, #{item.standard},#{item.qtbm},
#{item.zczyxqz},
#{item.remark}, #{item.remark1}, #{item.remark2}, #{item.remark3},#{item.price})
</foreach>
</insert>
@ -166,6 +175,14 @@
<if test="thirdSysFk != null">thirdSysFk=#{thirdSysFk},</if>
<if test="updateTime != null">updateTime=#{updateTime},</if>
<if test="supName != null">supName=#{supName},</if>
<if test="model != null">model=#{model},</if>
<if test="standard != null">standard=#{standard},</if>
<if test="zczyxqz != null">zczyxqz=#{zczyxqz},</if>
<if test="remark != null">remark=#{remark},</if>
<if test="remark1 != null">remark1=#{remark1},</if>
<if test="remark2 != null">remark2=#{remark2},</if>
<if test="remark3 != null">remark3=#{remark3},</if>
<if test="price != null">price=#{price},</if>
</trim>
WHERE id = #{id}
@ -176,31 +193,11 @@
FROM thr_products
</delete>
<insert id="importThrProducts" parameterType="java.util.List">
replace INTO thr_products
(id, code, name, measname, spec, registerNo, manufactory,
cplb, flbm, qxlb, ybbm, sptm, tyshxydm, zczbhhzbapzbh, ylqxzcrbarmc, ylqxzcrbarywmc, cpms,
thirdSysFk, updateTime, supName)
values
<foreach collection="thrProductsEntities" item="item" index="index"
separator=",">
(#{item.id},
#{item.code},
#{item.name},
#{item.measname},
#{item.spec},
#{item.registerNo},
#{item.manufactory},
#{item.cplb}, #{item.flbm}, #{item.qxlb}, #{item.ybbm}, #{item.sptm},
#{item.tyshxydm}, #{item.zczbhhzbapzbh}, #{item.ylqxzcrbarmc}, #{item.ylqxzcrbarywmc}, #{item.cpms},
#{item.thirdSysFk}, #{item.updateTime}, #{item.supName})
</foreach>
</insert>
<insert id="importThrProductss" parameterType="java.util.List">
replace into thr_products (id, code, name, measname, spec, registerNo, manufactory, thirdSysFk, cplb, flbm,
qxlb, ybbm, sptm, tyshxydm, zczbhhzbapzbh, ylqxzcrbarmc, ylqxzcrbarywmc, cpms,
updateTime, supName) VALUES
updateTime, supName, model, standard, qtbm, zczyxqz, remark, remark1, remark2,
remark3,price) VALUES
<foreach collection="thrProductsEntities" item="item" index="index" separator=",">
(#{item.id},
#{item.code},
@ -221,7 +218,14 @@
#{item.ylqxzcrbarywmc},
#{item.cpms},
#{item.updateTime},
#{item.supName})
#{item.supName},
#{item.model},
#{item.standard},
#{item.zczyxqz},
#{item.remark},
#{item.remark1},
#{item.remark2},
#{item.remark3},#{item.price})
</foreach>
</insert>
</mapper>
Loading…
Cancel
Save