1.医院在web端新增业务单据,新增扫码单据修改;

2.仓库信息加入
3.扫码单据与业务单据修改
master
anthonyywj2 3 years ago
parent af431517e2
commit 08e2f81f3c

@ -220,7 +220,7 @@ public class WareHouseController {
BussinessTypeEntity bussinessTypeEntity = bussinessTypeService.findBTByAction(addOrderRequest.getAction());
orderSaveRequest.setMainAction(bussinessTypeEntity.getMainAction());
orderSaveRequest.setLocStorageCode(addOrderRequest.getLocStorageCode());
orderSaveRequest.setAction(addOrderRequest.getAction());
orderSaveRequest.setActor(addOrderRequest.getActor());
orderSaveRequest.setCorpOrderId(addOrderRequest.getCorpOrderId());
@ -261,6 +261,7 @@ public class WareHouseController {
warehouseEntity.setBatchNo(udiEntity.getBatchNo());
warehouseEntity.setProduceDate(udiEntity.getProduceDate());
warehouseEntity.setExpireDate(udiEntity.getExpireDate());
warehouseEntity.setLocStorageCode(addOrderRequest.getLocStorageCode());
warehouseEntity.setSerialNo(udiEntity.getSerialNo());
warehouseEntity.setCount(1);
List<WarehouseEntity> warehouseEntityList = new ArrayList<>();

@ -0,0 +1,116 @@
package com.glxp.api.admin.controller.inventory;
import com.glxp.api.admin.entity.inventory.InvWarehouseEntity;
import com.glxp.api.admin.req.inout.DeleteRequest;
import com.glxp.api.admin.req.inventory.FilterInvWarehouseRequest;
import com.glxp.api.admin.res.inventory.InvWarehouseResponse;
import com.glxp.api.admin.service.inventory.InvWarehouseService;
import com.glxp.api.common.enums.ResultEnum;
import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@RestController
public class InvWarehouseController {
@Resource
InvWarehouseService invWarehouseService;
@GetMapping("spms/inv/warehouse/filter")
public BaseResponse filterInvWarehouse(FilterInvWarehouseRequest filterInvWarehouseRequest) {
List<InvWarehouseEntity> invWarehouseEntities = invWarehouseService.filterInvWarehouse(filterInvWarehouseRequest);
List<InvWarehouseResponse> merge = merge(invWarehouseEntities, 0);
Map<String, Object> restMap = new HashMap<>();
restMap.put("list", merge);
return ResultVOUtils.success(restMap);
}
@GetMapping("spms/inv/warehouse/filterAll")
public BaseResponse filterAllInvWarehouse(FilterInvWarehouseRequest filterInvWarehouseRequest) {
filterInvWarehouseRequest.setPid(0);
List<InvWarehouseEntity> invWarehouseEntities = invWarehouseService.filterInvWarehouse(filterInvWarehouseRequest);
return ResultVOUtils.success(invWarehouseEntities);
}
public List<InvWarehouseResponse> merge(List<InvWarehouseEntity> invWarehouseEntities,
Integer pid) {
List<InvWarehouseResponse> invWarehouseResponses = new ArrayList<>();
for (InvWarehouseEntity invWarehouseEntity : invWarehouseEntities) {
InvWarehouseResponse invWarehouseResponse = new InvWarehouseResponse();
BeanUtils.copyProperties(invWarehouseEntity, invWarehouseResponse);
if (pid.equals(invWarehouseEntity.getPid())) {
invWarehouseResponse.setChildren(merge(invWarehouseEntities, invWarehouseEntity.getId()));
invWarehouseResponses.add(invWarehouseResponse);
}
}
return invWarehouseResponses;
}
@PostMapping("/spms/inv/warehouse/save")
public BaseResponse save(@RequestBody @Valid InvWarehouseEntity invWarehouseEntity,
BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
if (invWarehouseEntity.getPid() == null) {
invWarehouseEntity.setPid(0); // 默认设置
}
boolean b = invWarehouseService.insertInvWarehouse(invWarehouseEntity);
if (!b) {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
}
return ResultVOUtils.success("添加成功!");
}
@PostMapping("/spms/inv/warehouse/edit")
public BaseResponse edit(@RequestBody @Valid InvWarehouseEntity invWarehouseEntity,
BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
if (invWarehouseEntity.getId() == null) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
}
invWarehouseEntity.setPid(null); // 不能修改父级 pid
boolean b = invWarehouseService.updateInvWarehouse(invWarehouseEntity);
if (!b) {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
}
return ResultVOUtils.success();
}
@PostMapping("/spms/inv/warehouse/delete")
public BaseResponse delete(@RequestBody DeleteRequest deleteRequest) {
if (deleteRequest.getId() == null) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
}
boolean b = invWarehouseService.deleteById(deleteRequest.getId());
if (!b) {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
}
return ResultVOUtils.success();
}
}

@ -0,0 +1,23 @@
package com.glxp.api.admin.dao.inventory;
import com.glxp.api.admin.entity.inventory.InvWarehouseEntity;
import com.glxp.api.admin.req.inventory.FilterInvWarehouseRequest;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface InvWarehouseDao {
List<InvWarehouseEntity> filterInvWarehouse(FilterInvWarehouseRequest filterInvWarehouseRequest);
List<InvWarehouseEntity> filterGroupInvWarehouse(FilterInvWarehouseRequest filterInvWarehouseRequest);
boolean insertInvWarehouse(InvWarehouseEntity InvWarehouseEntity);
boolean updateInvWarehouse(InvWarehouseEntity InvWarehouseEntity);
InvWarehouseEntity selectById(@Param("id") String id);
boolean deleteById(@Param("id") String id);
}

@ -15,4 +15,6 @@ public class BussinessLocalTypeEntity {
private Boolean checkEnable;
private Boolean advanceType;
private Boolean changeEnable;
private int corpType;
private boolean genUnit;
}

@ -37,4 +37,6 @@ public class BussinessTypeEntity {
private boolean secCheckSp;
private Integer index;
private int corpType;
}

@ -27,4 +27,5 @@ public class StockOrderEntity {
private String thirdOrderFk;
private String orderIdFk;
private BigDecimal totalPrice;
private String locStorageCode;
}

@ -20,4 +20,5 @@ public class StockOrderPrintEntity extends StockOrderDetailEntity {
private String printStatus;
private String unitIdFk;
private String customerId;
private String locStorageCode;
}

@ -21,4 +21,5 @@ public class OrderEntity {
private Integer signStatus;
private String stockCheckFk;
private String remark;
private String locStorageCode;
}

@ -26,4 +26,5 @@ public class WarehouseEntity {
private String relId;
private Integer status;
private String supId;
private String locStorageCode;
}

@ -0,0 +1,22 @@
package com.glxp.api.admin.entity.inventory;
import lombok.Data;
import java.util.Date;
@Data
public class InvWarehouseEntity {
private Integer id;
private Integer pid;
private String code;
private String name;
private Boolean advanceType;
private Boolean isDefault;
private Integer status;
private Date updateTime;
private String remark;
}

@ -24,7 +24,7 @@ public class BasicUnitMaintainFilterRequest extends ListPageRequest {
private Boolean isDownThrSys;
List<ErpUnitsResponse> thrCorpEntities;
private int corpType;
private Integer corpType;
private String unitId;

@ -14,7 +14,7 @@ public class AddOrderRequest {
private String fromType;
private String actDate;
private String billType;
private String locStorageCode;
private String orderId;
private String customerId;
}

@ -13,4 +13,5 @@ public class WarehouseQueryRequest extends ListPageRequest {
private String orderId;
private String nameCode;
private String supId;
private String locStorageCode;
}

@ -16,4 +16,5 @@ public class WarehouseSaveRequest {
private String fromCorpId;
private long id;
private String fromCorp;
private String locStorageCode;
}

@ -0,0 +1,19 @@
package com.glxp.api.admin.req.inventory;
import com.glxp.api.admin.req.ListPageRequest;
import lombok.Data;
import java.util.Date;
@Data
public class FilterInvWarehouseRequest extends ListPageRequest {
private Integer id;
private Integer pid;
private String code;
private String name;
private Boolean advanceType;
private Boolean isDefault;
private Date updateTime;
private String key;
}

@ -0,0 +1,24 @@
package com.glxp.api.admin.res.inventory;
import lombok.Data;
import java.util.Date;
import java.util.List;
@Data
public class InvWarehouseResponse {
private Integer id;
private Integer pid;
private String code;
private String name;
private Boolean advanceType;
private Boolean isDefault;
private Integer status;
private Date updateTime;
private String remark;
private List<InvWarehouseResponse> children;
}

@ -0,0 +1,28 @@
package com.glxp.api.admin.service.inventory;
import com.glxp.api.admin.entity.inventory.InvWarehouseEntity;
import com.glxp.api.admin.req.inventory.FilterInvWarehouseRequest;
import java.util.List;
public interface InvWarehouseService {
InvWarehouseEntity findDefault(Boolean advaceType, Boolean isDefault);
List<InvWarehouseEntity> filterInvWarehouse(FilterInvWarehouseRequest filterInvWarehouseRequest);
List<InvWarehouseEntity> filterGroupInvWarehouse(FilterInvWarehouseRequest filterInvWarehouseRequest);
boolean insertInvWarehouse(InvWarehouseEntity invWarehouseEntity);
boolean updateInvWarehouse(InvWarehouseEntity invWarehouseEntity);
InvWarehouseEntity selectById(String id);
InvWarehouseEntity selectByCode(String code);
boolean deleteById(String id);
}

@ -0,0 +1,88 @@
package com.glxp.api.admin.service.inventory.impl;
import com.github.pagehelper.PageHelper;
import com.glxp.api.admin.dao.inventory.InvWarehouseDao;
import com.glxp.api.admin.entity.inventory.InvWarehouseEntity;
import com.glxp.api.admin.req.inventory.FilterInvWarehouseRequest;
import com.glxp.api.admin.service.inventory.InvWarehouseService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;
@Service
public class InvWarehouseServiceImpl implements InvWarehouseService {
@Resource
InvWarehouseDao invWarehouseDao;
@Override
public InvWarehouseEntity findDefault(Boolean advaceType, Boolean isDefault) {
FilterInvWarehouseRequest filterInvWarehouseRequest = new FilterInvWarehouseRequest();
filterInvWarehouseRequest.setIsDefault(isDefault);
filterInvWarehouseRequest.setAdvanceType(advaceType);
List<InvWarehouseEntity> invWarehouseEntities = invWarehouseDao.filterInvWarehouse(filterInvWarehouseRequest);
if (invWarehouseEntities != null && invWarehouseEntities.size() > 0)
return invWarehouseEntities.get(0);
return null;
}
@Override
public List<InvWarehouseEntity> filterInvWarehouse(FilterInvWarehouseRequest filterInvWarehouseRequest) {
if (filterInvWarehouseRequest == null) {
return Collections.emptyList();
}
if (filterInvWarehouseRequest.getPage() != null) {
int offset = (filterInvWarehouseRequest.getPage() - 1) * filterInvWarehouseRequest.getLimit();
PageHelper.offsetPage(offset, filterInvWarehouseRequest.getLimit());
}
List<InvWarehouseEntity> data = invWarehouseDao.filterInvWarehouse(filterInvWarehouseRequest);
return data;
}
@Override
public List<InvWarehouseEntity> filterGroupInvWarehouse(FilterInvWarehouseRequest filterInvWarehouseRequest) {
if (filterInvWarehouseRequest == null) {
return Collections.emptyList();
}
if (filterInvWarehouseRequest.getPage() != null) {
int offset = (filterInvWarehouseRequest.getPage() - 1) * filterInvWarehouseRequest.getLimit();
PageHelper.offsetPage(offset, filterInvWarehouseRequest.getLimit());
}
List<InvWarehouseEntity> data = invWarehouseDao.filterGroupInvWarehouse(filterInvWarehouseRequest);
return data;
}
@Override
public boolean insertInvWarehouse(InvWarehouseEntity invWarehouseEntity) {
return invWarehouseDao.insertInvWarehouse(invWarehouseEntity);
}
@Override
public boolean updateInvWarehouse(InvWarehouseEntity invWarehouseEntity) {
return invWarehouseDao.updateInvWarehouse(invWarehouseEntity);
}
@Override
public InvWarehouseEntity selectById(String id) {
return invWarehouseDao.selectById(id);
}
@Override
public InvWarehouseEntity selectByCode(String code) {
FilterInvWarehouseRequest filterInvWarehouseRequest = new FilterInvWarehouseRequest();
filterInvWarehouseRequest.setCode(code);
List<InvWarehouseEntity> invWarehouseEntities = invWarehouseDao.filterInvWarehouse(filterInvWarehouseRequest);
if (invWarehouseEntities != null && invWarehouseEntities.size() > 0)
return invWarehouseEntities.get(0);
return null;
}
@Override
public boolean deleteById(String id) {
return invWarehouseDao.deleteById(id);
}
}

@ -18,6 +18,7 @@ import com.glxp.api.admin.util.HttpClient;
import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
@ -29,6 +30,10 @@ import java.util.List;
@Service
public class BasicGenExcelService {
@Value("${SPSYNC_IP}")
private String spsSyncUrl;
@Resource
CorpExportLogService corpExportLogService;
@Resource
@ -146,20 +151,20 @@ public class BasicGenExcelService {
}
//todo 上传SMP
SystemParamConfigEntity systemParamConfigEntity = systemParamConfigService.selectByParamKey("smp_service_ip");
if (systemParamConfigEntity != null) {
String response = HttpClient.uCloudPost(systemParamConfigEntity.getParamValue() + "/udiwms/basic/corps/upload", postCorpsRequest);
BaseResponse baseResponse = JSONObject.parseObject(response, new TypeReference<BaseResponse>() {
});
if (baseResponse.getCode() == 20000) {
corpExportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_SUCCESS);
} else {
corpExportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_FAIL);
}
// SystemParamConfigEntity systemParamConfigEntity = systemParamConfigService.selectByParamKey("smp_service_ip");
// if (systemParamConfigEntity != null) {
String response = HttpClient.uCloudPost(spsSyncUrl + "/udiwms/basic/corps/upload", postCorpsRequest);
BaseResponse baseResponse = JSONObject.parseObject(response, new TypeReference<BaseResponse>() {
});
if (baseResponse.getCode() == 20000) {
corpExportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_SUCCESS);
} else {
corpExportLogEntity.setRemark("SMP服务IP地址未定义");
corpExportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_FAIL);
}
// } else {
// corpExportLogEntity.setRemark("SMP服务IP地址未定义");
// corpExportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_FAIL);
// }
corpExportLogService.updateCorpExportLog(corpExportLogEntity);
@ -242,21 +247,21 @@ public class BasicGenExcelService {
postUdiInfoRequest.setDatas(genDatas);
}
//todo 上传SMP
SystemParamConfigEntity systemParamConfigEntity = systemParamConfigService.selectByParamKey("smp_service_ip");
if (systemParamConfigEntity != null) {
String response = HttpClient.uCloudPost(systemParamConfigEntity.getParamValue() + "/udiwms/basic/products/upload", postUdiInfoRequest);
BaseResponse baseResponse = JSONObject.parseObject(response, new TypeReference<BaseResponse>() {
});
if (baseResponse.getCode() == 20000) {
udiInfoExportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_SUCCESS);
} else {
udiInfoExportLogEntity.setRemark(baseResponse.getMessage());
udiInfoExportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_FAIL);
}
// SystemParamConfigEntity systemParamConfigEntity = systemParamConfigService.selectByParamKey("smp_service_ip");
// if (systemParamConfigEntity != null) {
String response = HttpClient.uCloudPost(spsSyncUrl + "/udiwms/basic/products/upload", postUdiInfoRequest);
BaseResponse baseResponse = JSONObject.parseObject(response, new TypeReference<BaseResponse>() {
});
if (baseResponse.getCode() == 20000) {
udiInfoExportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_SUCCESS);
} else {
udiInfoExportLogEntity.setRemark("SMP服务IP地址未定义");
udiInfoExportLogEntity.setRemark(baseResponse.getMessage());
udiInfoExportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_FAIL);
}
// } else {
// udiInfoExportLogEntity.setRemark("SMP服务IP地址未定义");
// udiInfoExportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_FAIL);
// }
udiInfoExportLogService.updateUdiInfoExportLog(udiInfoExportLogEntity);
}

@ -163,7 +163,14 @@ public class BasicUdiInfoImportService {
udiRelevanceService.updateUdiRelevance(temp);
} else {
UdiRelevanceEntity mTemp = udiRelevanceService.selectUpdateByThirdId(mainId);
boolean isThird = false;
if (mTemp != null) {
UdiInfoEntity udiInfoEntity1 = udiInfoService.findByUuid(mTemp.getUuid());
if (udiInfoEntity1 != null && udiInfoEntity1.getProductType() != null && udiInfoEntity1.getProductType() == 1) {
isThird = true;
}
}
if (mTemp != null && !isThird) {
udiInfoImportDetailEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_CODE_FAIL);
udiInfoImportDetailEntity.setRemark("产品编码已存在关联不能重复插入!");
udiInfoImportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_FAIL);
@ -211,7 +218,7 @@ public class BasicUdiInfoImportService {
if (udiInfoImportDetailEntity.getSptm() != null && !udiInfoImportDetailEntity.getSptm().trim().equals("")) {
udiRelevanceEntity.setSptm(udiInfoImportDetailEntity.getSptm());
}
if (udiInfoImportDetailEntity.getIsUseDy() != null && udiInfoImportDetailEntity.getIsUseDy().trim().equals("")) {
if (udiInfoImportDetailEntity.getIsUseDy() != null && !udiInfoImportDetailEntity.getIsUseDy().trim().equals("")) {
if (udiInfoImportDetailEntity.getIsUseDy().equals("是")) {
udiRelevanceEntity.setIsUseDy(true);
} else {

@ -30,6 +30,7 @@ import com.glxp.api.admin.util.HttpClient;
import com.glxp.api.admin.util.RedisUtil;
import com.glxp.api.common.res.BaseResponse;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
@ -40,6 +41,9 @@ import java.util.List;
@Service
public class ThrOrdersDlService {
@Value("${SPSYNC_IP}")
private String spsSyncUrl;
@Resource
ThrOrderService thrOrderService;
@Resource
@ -285,20 +289,20 @@ public class ThrOrdersDlService {
//toDo 上傳SMP
postThrOrderRequest.setGenKey(genKey);
postThrOrderRequest.setThirdSys(thrOrderExportRequest.getThirdSysFk());
SystemParamConfigEntity systemParamConfigEntity = systemParamConfigService.selectByParamKey("smp_service_ip");
if (systemParamConfigEntity != null) {
String response = HttpClient.uCloudPost(systemParamConfigEntity.getParamValue() + "/udiwms/thrsys/postOrderDetail", postThrOrderRequest);
BaseResponse baseResponse = JSONObject.parseObject(response, new TypeReference<BaseResponse>() {
});
if (baseResponse.getCode() == 20000) {
thrOrderExportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_SUCCESS);
} else {
thrOrderExportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_FAIL);
}
// SystemParamConfigEntity systemParamConfigEntity = systemParamConfigService.selectByParamKey("smp_service_ip");
// if (systemParamConfigEntity != null) {
String response = HttpClient.uCloudPost(spsSyncUrl + "/udiwms/thrsys/postOrderDetail", postThrOrderRequest);
BaseResponse baseResponse = JSONObject.parseObject(response, new TypeReference<BaseResponse>() {
});
if (baseResponse.getCode() == 20000) {
thrOrderExportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_SUCCESS);
} else {
thrOrderExportLogEntity.setRemark("SMP服务IP地址未定义");
thrOrderExportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_FAIL);
}
// } else {
// thrOrderExportLogEntity.setRemark("SMP服务IP地址未定义");
// thrOrderExportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_FAIL);
// }
thrOrderExportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_SUCCESS);
thrOrderExportLogService.updateThrOrderExportLog(thrOrderExportLogEntity);

@ -24,6 +24,7 @@ import com.glxp.api.admin.service.thrsys.ThrProductsService;
import com.glxp.api.admin.util.*;
import com.glxp.api.common.res.BaseResponse;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
@ -35,6 +36,10 @@ import java.util.stream.Collectors;
@Service
public class ThrProductsDlService {
@Value("${SPSYNC_IP}")
private String spsSyncUrl;
@Resource
ThrProductsService thrProductsService;
@Resource
@ -258,20 +263,20 @@ public class ThrProductsDlService {
}
//Todo 接口上传SMP
SystemParamConfigEntity systemParamConfigEntity = systemParamConfigService.selectByParamKey("smp_service_ip");
if (systemParamConfigEntity != null) {
String response = HttpClient.uCloudPost(systemParamConfigEntity.getParamValue() + "/udiwms/thrsys/postThrProducts", postThrProductsRequest);
BaseResponse baseResponse = JSONObject.parseObject(response, new TypeReference<BaseResponse>() {
});
if (baseResponse.getCode() == 20000) {
thrProductsExportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_SUCCESS);
} else {
thrProductsExportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_FAIL);
}
// SystemParamConfigEntity systemParamConfigEntity = systemParamConfigService.selectByParamKey("smp_service_ip");
// if (systemParamConfigEntity != null) {
String response = HttpClient.uCloudPost(spsSyncUrl + "/udiwms/thrsys/postThrProducts", postThrProductsRequest);
BaseResponse baseResponse = JSONObject.parseObject(response, new TypeReference<BaseResponse>() {
});
if (baseResponse.getCode() == 20000) {
thrProductsExportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_SUCCESS);
} else {
thrProductsExportLogEntity.setRemark("SMP服务IP地址未定义");
thrProductsExportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_FAIL);
}
// } else {
// thrProductsExportLogEntity.setRemark("SMP服务IP地址未定义");
// thrProductsExportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_FAIL);
// }
thrProductsExportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_SUCCESS);
thrProductsExportLogService.updateThrProductsExportLog(thrProductsExportLogEntity);

@ -18,13 +18,16 @@ logging.level.com.glxp.api.admin.erp.second=debug
#logback配置
logging.path=output/logs
# 不指定的情况下默认生成在项目根目录,按照配置生成所需的日志名称
logging.file=D:/udi.log
#logging.file=D:/udi.log
file_path=D:/1s/udiwms/udiwmsfile/
#file_path=/home/glxp/udiwms
#UDI数据下载
UDI_KEY=6b137c66-6286-46c6-8efa-c2f5dd9237df
UDI_SERVER_URL=https://www.udims.com/UDI_DL_Server_test
#中转服务IP地址
SPSYNC_IP=http://127.0.0.1:9989
#SPSYNC_IP=http://192.168.0.109:8080/SP_SYNC_SERVER
#UDI_SERVER_URL=http://127.0.0.1:9995
##端口号
# Redis数据库索引默认为0

@ -92,7 +92,8 @@
#{thirdName2},
#{thirdName3},
#{thirdName4},
#{updateTime},#{corpType}
#{updateTime},
#{corpType}
)
</insert>
@ -100,7 +101,7 @@
<insert id="insert" parameterType="com.glxp.api.admin.entity.basic.BasicUnitMaintainEntity">
insert INTO basic_corp(thirdId, erpId, name, spell, addr,
status, type, creditNo, contact, mobile, thirdId1, thirdId2, thirdId3, thirdId4,
thirdName, thirdName1, thirdName2, thirdName3, thirdName4, updateTime,corpType)
thirdName, thirdName1, thirdName2, thirdName3, thirdName4, updateTime, corpType)
values (#{thirdId},
#{erpId},
#{name},
@ -112,7 +113,7 @@
#{contact},
#{mobile},
#{thirdId1}, #{thirdId2}, #{thirdId3}, #{thirdId4},
#{thirdName}, #{thirdName1}, #{thirdName2}, #{thirdName3}, #{thirdName4}, #{updateTime},#{corpType})
#{thirdName}, #{thirdName1}, #{thirdName2}, #{thirdName3}, #{thirdName4}, #{updateTime}, #{corpType})
</insert>

@ -26,9 +26,9 @@
<select id="filterJoin" parameterType="com.glxp.api.admin.req.basic.BussinessLocalTypeFilterRequest"
resultType="com.glxp.api.admin.entity.basic.BussinessLocalTypeEntity">
SELECT basic_bustype_local.name localName, basic_bustype_local.action localAction,originAction,
basic_bussiness_type.name ,
basic_bussiness_type.name ,basic_bussiness_type.corpType,basic_bussiness_type.genUnit,
basic_bussiness_type.action,basic_bussiness_type.checkEnable,basic_bustype_local.advanceType,basic_bustype_local.changeEnable
FROM basic_bustype_local inner join
FROM basic_bustype_local left join
basic_bussiness_type
on basic_bustype_local.action = basic_bussiness_type.localAction
<where>

@ -50,7 +50,7 @@
AND mainAction LIKE concat(#{mainAction},'%')
</if>
<if test="enabled != ''and enabled != null">
AND basic_third_sys.enabled =#{enabled}
AND basic_bussiness_type.enable =#{enabled}
</if>
<if test=" enable != null">
AND basic_bussiness_type.enable =#{enable}
@ -63,7 +63,7 @@
order by basic_bussiness_type.`index`
</select>
<!-- AND basic_third_sys.enabled =#{enabled}-->
<insert id="insertBussinessType" keyProperty="id"
parameterType="com.glxp.api.admin.entity.basic.BussinessTypeEntity">

@ -24,7 +24,7 @@
parameterType="com.glxp.api.admin.entity.business.StockOrderEntity">
insert INTO stock_order(id, billNo, billdate, corpId, corpName, billType, billFlag,
thirdSysFk, status, statusInfo, type, sourceType,
printStatus, unitIdFk, customerId, thirdOrderFk, orderIdFk, totalPrice)
printStatus, unitIdFk, customerId, thirdOrderFk, orderIdFk, totalPrice,locStorageCode)
values (#{id},
#{billNo},
#{billdate},
@ -37,7 +37,8 @@
#{statusInfo},
#{type},
#{sourceType},
#{printStatus}, #{unitIdFk}, #{customerId}, #{thirdOrderFk}, #{orderIdFk}, #{totalPrice})
#{printStatus}, #{unitIdFk}, #{customerId},
#{thirdOrderFk}, #{orderIdFk}, #{totalPrice},#{locStorageCode})
</insert>
<update id="updateById" parameterType="com.glxp.api.admin.entity.business.StockOrderEntity">
UPDATE stock_order
@ -59,7 +60,7 @@
<if test="thirdOrderFk != null">thirdOrderFk=#{thirdOrderFk},</if>
<if test="orderIdFk != null">orderIdFk=#{orderIdFk},</if>
<if test="totalPrice != null">totalPrice=#{totalPrice},</if>
<if test="locStorageCode != null">locStorageCode=#{locStorageCode},</if>
</trim>
WHERE id = #{id}
</update>

@ -36,7 +36,7 @@
<insert id="insertWarehouse" keyProperty="id" parameterType="com.glxp.api.admin.req.inout.WarehouseSaveRequest">
INSERT INTO io_codes(action, mainAction, code, corpOrderId,
actor, actDate, upperCorpOrderId, fromCorpId,
fromCorp, nameCode, relId,status,supId)
fromCorp, nameCode, relId,status,supId,locStorageCode)
values (#{action},
#{mainAction},
#{code},
@ -44,7 +44,7 @@
#{actor},
#{actDate},
#{fromCorpId},
#{fromCorp}, #{orderId}, #{nameCode}, #{relId},#{status},#{supId})
#{fromCorp}, #{orderId}, #{nameCode}, #{relId},#{status},#{supId},#{locStorageCode})
</insert>
<insert id="insertWarehouses" parameterType="java.util.List">
@ -56,7 +56,7 @@
actor,
actDate,
fromCorpId,fromCorp,orderId,batchNo,produceDate,expireDate,
serialNo,count,packageLevel,warehouseCode,nameCode,relId,status,supId)
serialNo,count,packageLevel,warehouseCode,nameCode,relId,status,supId,locStorageCode)
VALUES
<foreach collection="io_codesEntities" item="item" index="index"
separator=",">
@ -76,7 +76,7 @@
,#{item.serialNo}
,#{item.count}
,#{item.packageLevel} ,#{item.warehouseCode},#{item.nameCode},#{item.relId},#{item.status}
,#{item.supId})
,#{item.supId},#{item.locStorageCode})
</foreach>
</insert>
@ -136,7 +136,7 @@
<if test="sCount != null">sCount=#{sCount},</if>
<if test="status != null">status=#{status},</if>
<if test="supId != null">supId=#{supId},</if>
<if test="locStorageCode != null">locStorageCode=#{locStorageCode},</if>
</trim>
WHERE id=#{id}
</update>

@ -7,7 +7,8 @@
<insert id="insertCodesTemp" parameterType="java.util.List">
INSERT INTO io_codes_temp
(action, mainAction,code, corpOrderId, actor,actDate,
fromCorpId, fromCorp, orderId,batchNo,produceDate,expireDate,serialNo,count,nameCode,relId,status,supId)
fromCorpId, fromCorp, orderId,batchNo,produceDate,expireDate,serialNo,
count,nameCode,relId,status,supId,locStorageCode)
VALUES
<foreach collection="codes" item="item" index="index"
separator=",">
@ -26,7 +27,7 @@
,#{item.expireDate}
,#{item.serialNo}
,#{item.count},#{item.nameCode}
, #{item.relId},#{item.status},#{item.supId})
, #{item.relId},#{item.status},#{item.supId},#{item.locStorageCode})
</foreach>
</insert>
@ -34,7 +35,7 @@
<insert id="insertCodesTempSingle" keyProperty="id" parameterType="com.glxp.api.admin.entity.inout.WarehouseEntity">
INSERT INTO io_codes_temp(action, mainAction, code, corpOrderId, actor, actDate,
fromCorpId, fromCorp, orderId, batchNo, produceDate, expireDate, serialNo, count,
nameCode, relId, status, supId)
nameCode, relId, status, supId,locStorageCode)
values (#{action},
#{mainAction},
#{code},
@ -48,7 +49,7 @@
#{produceDate},
#{expireDate},
#{serialNo},
#{count}, #{nameCode}, #{relId}, #{status}, #{supId})
#{count}, #{nameCode}, #{relId}, #{status}, #{supId},#{locStorageCode})
</insert>
<select id="findByOrderId" parameterType="com.glxp.api.admin.req.inout.WarehouseQueryRequest"

@ -32,7 +32,7 @@
<insert id="insertOrder" keyProperty="id" parameterType="com.glxp.api.admin.entity.inout.OrderEntity">
insert INTO io_order(id, action, corpOrderId, actDate, fromCorpId, actor, mainAction,
fromCorp, status, remark, exportStatus, fromType, contrastStatus, signStatus, erpFk,
stockCheckFk)
stockCheckFk,locStorageCode)
values (#{id},
#{action},
#{corpOrderId},
@ -48,7 +48,7 @@
#{contrastStatus},
#{signStatus},
#{erpFk},
#{stockCheckFk})
#{stockCheckFk},#{locStorageCode})
</insert>
<update id="updateOrder" parameterType="com.glxp.api.admin.entity.inout.OrderEntity">
UPDATE io_order
@ -68,6 +68,8 @@
<if test="erpFk != null">erpFk=#{erpFk},</if>
<if test="signStatus != null">signStatus=#{signStatus}</if>
<if test="stockCheckFk != null">stockCheckFk=#{stockCheckFk}</if>
<if test="locStorageCode != null">locStorageCode=#{locStorageCode}</if>
</trim>
WHERE id = #{id}
</update>

@ -0,0 +1,102 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.api.admin.dao.inventory.InvWarehouseDao">
<select id="filterInvWarehouse" parameterType="com.glxp.api.admin.req.inventory.FilterInvWarehouseRequest"
resultType="com.glxp.api.admin.entity.inventory.InvWarehouseEntity">
SELECT * FROM inv_warehouse
<where>
<if test="id != '' and id != null">
AND id = #{id}
</if>
<if test="pid != '' and pid != null">
AND pid = #{pid}
</if>
<if test="code != '' and code != null">
AND code = #{code}
</if>
<if test="name != '' and name != null">
AND name = #{name}
</if>
<if test=" advanceType != null">
AND advanceType = #{advanceType}
</if>
<if test="isDefault != null">
AND isDefault = #{isDefault}
</if>
<if test="key != null">
and code like concat('%',#{key},'%') or `name` like concat('%',#{key},'%')
</if>
</where>
</select>
<select id="selectById" parameterType="Map"
resultType="com.glxp.api.admin.entity.inventory.InvWarehouseEntity">
SELECT *
FROM inv_warehouse
WHERE id = #{id}
</select>
<select id="filterGroupInvWarehouse" parameterType="com.glxp.api.admin.req.inventory.FilterInvWarehouseRequest"
resultType="com.glxp.api.admin.res.inventory.InvProductResponse">
SELECT * FROM inv_warehouse
<where>
<if test="id != '' and id != null">
AND id = #{id}
</if>
<if test="pid != '' and pid != null">
AND pid = #{pid}
</if>
<if test="code != '' and code != null">
AND code = #{code}
</if>
<if test="name != '' and name != null">
AND name = #{name}
</if>
<if test="advanceType != '' and advanceType != null">
AND advanceType = #{advanceType}
</if>
<if test="isDefault != '' and isDefault != null">
AND isDefault = #{isDefault}
</if>
</where>
</select>
<insert id="insertInvWarehouse" keyProperty="id"
parameterType="com.glxp.api.admin.entity.inventory.InvWarehouseEntity">
insert INTO inv_warehouse
(pid, code, name, advanceType, isDefault,
status, updateTime, remark)
values (#{pid}, #{code},
#{name}, #{advanceType}, #{isDefault},
#{status}, #{updateTime},
#{remark})
</insert>
<delete id="deleteById" parameterType="Map">
DELETE
FROM inv_warehouse
WHERE id = #{id}
</delete>
<update id="updateInvWarehouse" parameterType="com.glxp.api.admin.entity.inventory.InvWarehouseEntity">
UPDATE inv_warehouse
<trim prefix="set" suffixOverrides=",">
<if test="pid != null">pid=#{pid},</if>
<if test="name != null">name=#{name},</if>
<if test="code != null">code=#{code},</if>
<if test="advanceType != null">advanceType=#{advanceType},</if>
<if test="isDefault != null">isDefault=#{isDefault},</if>
<if test="status != null">status=#{status},</if>
<if test="updateTime != null">updateTime=#{updateTime},</if>
<if test="remark != null">remark=#{remark},</if>
</trim>
WHERE id = #{id}
</update>
</mapper>

@ -29,7 +29,8 @@
AND spec LIKE concat('%',#{spec},'%')
</if>
<if test="unionCode != '' and unionCode != null">
or code LIKE concat('%',#{unionCode},'%') or sptm LIKE concat('%',#{unionCode},'%') or ybbm LIKE concat('%',#{unionCode},'%')
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}
@ -39,14 +40,18 @@
</if>
</where>
ORDER BY updateTime DESC
</select>
<!-- ORDER BY updateTime DESC-->
<select id="selectById" parameterType="Map" resultType="com.glxp.api.admin.entity.thrsys.ThrProductsEntity">
select * FROM thr_products WHERE id = #{id}
select *
FROM thr_products
WHERE id = #{id}
</select>
<insert id="insertThrProducts" keyProperty="id" parameterType="com.glxp.api.admin.entity.thrsys.ThrProductsEntity">
replace INTO thr_products
replace
INTO thr_products
(
code,name,measname,spec,registerNo,manufactory,
cplb,flbm,qxlb,ybbm,sptm,tyshxydm,zczbhhzbapzbh,ylqxzcrbarmc,ylqxzcrbarywmc,cpms,
@ -54,16 +59,26 @@
)
values
(
#{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}
)
</insert>
<insert id="insertThrProductss" keyProperty="id" parameterType="java.util.List">
@ -92,7 +107,9 @@
</insert>
<delete id="deleteById" parameterType="Map">
DELETE FROM thr_products WHERE id = #{id}
DELETE
FROM thr_products
WHERE id = #{id}
</delete>
<update id="updateThrProducts" parameterType="com.glxp.api.admin.entity.thrsys.ThrProductsEntity">
@ -123,6 +140,7 @@
</update>
<delete id="deleteAll">
DELETE FROM thr_products
DELETE
FROM thr_products
</delete>
</mapper>
Loading…
Cancel
Save