1.添加新增单据接口,修改单据信息接口,查询库存产品信息接口

2.添加测试标识,修改相关的请求参数实体类,生成模拟数据
master
MrZhai 3 years ago
parent 66ef77a16a
commit d167d2fa25

@ -0,0 +1,17 @@
package com.glxp.mipsdl.admin.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* /
*/
//此注解只能修饰方法
@Target(ElementType.METHOD)
//当前注解如何去保持
@Retention(RetentionPolicy.RUNTIME)
public @interface AuthRuleAnnotation {
String value();
}

@ -0,0 +1,126 @@
package com.glxp.mipsdl.admin.aspect;
import cn.hutool.core.util.StrUtil;
import com.glxp.mipsdl.admin.annotation.AuthRuleAnnotation;
import com.glxp.mipsdl.admin.exception.JsonException;
import com.glxp.mipsdl.admin.util.JwtUtils;
import com.glxp.mipsdl.common.enums.ResultEnum;
import io.jsonwebtoken.Claims;
import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.aspectj.lang.reflect.MethodSignature;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import java.lang.reflect.Method;
/**
* AOP
*/
@Aspect
@Component
@Slf4j
public class AuthorizeAspect {
/* @Resource
private AuthLoginService authLoginService;
@Resource
private AuthLicenseDao authLicenseDao;*/
@Pointcut("@annotation(com.glxp.mipsdl.admin.annotation.AuthRuleAnnotation)")
public void adminLoginVerify() {
}
/**
*
*
* @param joinPoint
*/
@Before("adminLoginVerify()")
public void doAdminAuthVerify(JoinPoint joinPoint) {
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
if (attributes == null) {
throw new JsonException(ResultEnum.NOT_NETWORK);
}
HttpServletRequest request = attributes.getRequest();
String id = request.getHeader("ADMIN_ID");
if (StrUtil.isBlank(id)) {
String apiKey = request.getHeader("api_key");
String secretKey = request.getHeader("secret_key");
/* AuthLicense authLicense = authLicenseDao.get(apiKey);
if (authLicense != null && authLicense.getSecretKey().equals(secretKey)) {
} else {
throw new JsonException(ResultEnum.LOGIN_VERIFY_FALL);
}*/
if (StrUtil.isNotBlank(apiKey) && StrUtil.isNotBlank(secretKey) && "ewKD2Cyr".equals(apiKey) && "rO4nDvNWKJ1uNuQQBnECPjnpDv4w6nh8".equals(secretKey)) {
} else {
throw new JsonException(ResultEnum.AUTH_FAILED);
}
} else {
String query = request.getQueryString();
Long adminId = null;
try {
adminId = Long.valueOf(id);
} catch (Exception e) {
throw new JsonException(ResultEnum.LOGIN_VERIFY_FALL);
}
String token = request.getHeader("ADMIN_TOKEN");
if (token == null) {
throw new JsonException(ResultEnum.LOGIN_VERIFY_FALL);
}
// 验证 token
Claims claims = JwtUtils.parse(token);
if (claims == null) {
throw new JsonException(ResultEnum.LOGIN_VERIFY_FALL);
}
Long jwtAdminId = Long.valueOf(claims.get("admin_id").toString());
if (adminId.compareTo(jwtAdminId) != 0) {
throw new JsonException(ResultEnum.LOGIN_VERIFY_FALL);
}
}
// 判断是否进行权限验证
MethodSignature signature = (MethodSignature) joinPoint.getSignature();
//从切面中获取当前方法
Method method = signature.getMethod();
//得到了方,提取出他的注解
AuthRuleAnnotation action = method.getAnnotation(AuthRuleAnnotation.class);
// 进行权限验证
// authRuleVerify(action.value(), adminId);
}
/**
*
*
* @param authRule
*/
private void authRuleVerify(String authRule, Long adminId) {
/* if (authRule != null && authRule.length() > 0) {
List<String> authRules = authLoginService.listRuleByAdminId(adminId);
// admin 为最高权限
for (String item : authRules) {
if (item.equals("admin") || item.equals(authRule)) {
return;
}
}
throw new JsonException(ResultEnum.AUTH_FAILED);
}*/
}
}

@ -198,7 +198,7 @@ public class GlxpFileClient implements BaseFileClient {
Cell cell1 = row.getCell(0);
if (cell1 != null) {
cell1.setCellType(CellType.STRING);
udiwmsProductInfoResponse.setId(cell1.getStringCellValue());
udiwmsProductInfoResponse.setUnitId(cell1.getStringCellValue());
}
Cell cell2 = row.getCell(1);
if (cell2 != null) {

@ -84,7 +84,7 @@ public class YGUdplatFileClient implements BaseFileClient {
if (deliCorpEntities != null && deliCorpEntities.size() > 0) {
for (DeliCorpEntity deliCorpEntity : deliCorpEntities) {
UdiwmsUnitResponse udiwmsProductInfoResponse = new UdiwmsUnitResponse();
udiwmsProductInfoResponse.setId(deliCorpEntity.getDistributorId());
udiwmsProductInfoResponse.setUnitId(deliCorpEntity.getDistributorId());
udiwmsProductInfoResponse.setName(deliCorpEntity.getDistributorName());
udiwmsProductInfoResponses.add(udiwmsProductInfoResponse);
}

@ -87,7 +87,7 @@ public class ZyV1FileClient implements BaseFileClient {
for (ZyCorpEntity zyCorpEntity : zyCorpEntities) {
UdiwmsUnitResponse udiwmsUnitResponse = new UdiwmsUnitResponse();
udiwmsUnitResponse.setName(zyCorpEntity.getCorpName());
udiwmsUnitResponse.setId(zyCorpEntity.getCorpCode());
udiwmsUnitResponse.setUnitId(zyCorpEntity.getCorpCode());
udiwmsUnitResponses.add(udiwmsUnitResponse);
}
PostThrCorpRequest postThrProductsRequest = new PostThrCorpRequest();

@ -0,0 +1,241 @@
package com.glxp.mipsdl.admin.client.http;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.glxp.mipsdl.admin.req.*;
import com.glxp.mipsdl.admin.res.system.UdiwmsInvProductResponse;
import com.glxp.mipsdl.admin.res.system.UdiwmsOrderResponse;
import com.glxp.mipsdl.admin.res.system.UdiwmsProductInfoResponse;
import com.glxp.mipsdl.admin.res.system.UdiwmsUnitResponse;
import com.glxp.mipsdl.admin.util.CustomUtil;
import com.glxp.mipsdl.common.res.BaseResponse;
import com.glxp.mipsdl.common.util.ResultVOUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
/**
*
*/
@Slf4j
@Service
public class TestClient {
/**
*
*
* @param testUnitRequest
* @return
*/
public BaseResponse getUnit(UdiwmsUnitRequest testUnitRequest) {
if (null == testUnitRequest || StrUtil.isBlank(testUnitRequest.getThirdSys())) {
return ResultVOUtils.error(500, "第三方系统ID不能为空");
}
List<UdiwmsUnitResponse> unitResponses = new ArrayList<>();
AtomicInteger unitId = new AtomicInteger(2468);
for (int i = 0; i < 10; i++) {
UdiwmsUnitResponse response = new UdiwmsUnitResponse();
response.setUnitId(String.valueOf(unitId.get()));
unitId.addAndGet(1);
response.setName("福建省诏安县医院");
response.setSpell("ZAXYY");
response.setAddr("诏安县南诏镇江厝前路65号");
response.setCreditNo("123506244897495930");
response.setContact("沈主任");
response.setMobile("13306961860");
unitResponses.add(response);
}
return ResultVOUtils.success(unitResponses);
}
/**
*
*
* @param udiwmsProductRequest
* @return
*/
public BaseResponse getProducuts(UdiwmsProductRequest udiwmsProductRequest) {
if (null == udiwmsProductRequest || StrUtil.isBlank(udiwmsProductRequest.getThirdSys())) {
return ResultVOUtils.error(500, "第三方系统ID不能为空");
}
List<UdiwmsProductInfoResponse> productInfoResponses = new ArrayList<>();
for (int i = 0; i < 10; i++) {
UdiwmsProductInfoResponse response = UdiwmsProductInfoResponse.builder()
.code("6555")
.name("下肢直型锁定钢板")
.measname("块")
.spec("12孔")
.model("12孔")
.registerNo("20153461024")
.manufactory("江苏艾迪尔")
.supName("南昌必理商贸有限公司")
.cplb("产品类别")
.flbm("分类编码")
.qxlb("器械类别")
.ybbm("医保编码")
.sptm("商品条码")
.tyshxydm("注册人社会信用号")
.zczbhhzbapzbh("注册证 备案证号")
.ylqxzcrbarmc("注册/备案人名称")
.ylqxzcrbarywmc("注册/备案人英文名称")
.cpms("产品描述")
.spmc("商品名称")
.qtbm("其他编码")
.zczyxqz("注册证有效期截止时间")
.updateTime(new Date())
.build();
productInfoResponses.add(response);
}
return ResultVOUtils.success(productInfoResponses);
}
/**
*
*
* @param udiwmsOrderRequest
* @return
*/
public BaseResponse getOrders(UdiwmsOrderRequest udiwmsOrderRequest) {
if (null == udiwmsOrderRequest || StrUtil.isBlank(udiwmsOrderRequest.getThirdSys())) {
return ResultVOUtils.error(500, "第三方系统ID不能为空");
}
UdiwmsOrderResponse udiwmsOrderResponse = new UdiwmsOrderResponse();
udiwmsOrderResponse.setBillNo("SP2022031376813");
udiwmsOrderResponse.setStartDate("2022-03-13");
udiwmsOrderResponse.setStartDate("2022-03-20");
udiwmsOrderResponse.setBillFlag("单据状态");
udiwmsOrderResponse.setBillType("ST54467264148");
udiwmsOrderResponse.setBilldate("2022-03-13");
udiwmsOrderResponse.setCreateUser("沈先生");
udiwmsOrderResponse.setReviewUser("沈先生");
udiwmsOrderResponse.setAddress("福建省厦门市集美区");
udiwmsOrderResponse.setLinkMan("沈先生");
udiwmsOrderResponse.setLinkTel("13306961860");
List<UdiwmsOrderResponse.SubErpOrder> subErpOrders = new ArrayList<>();
for (int i = 0; i < 3; i++) {
UdiwmsOrderResponse.SubErpOrder subErpOrder = new UdiwmsOrderResponse.SubErpOrder();
subErpOrder.setDetailId(CustomUtil.getId());
subErpOrder.setCorpName("福建片仔癀诊断技术有限公司");
subErpOrder.setBatchNo(CustomUtil.getUUId());
subErpOrder.setProductDate(DateUtil.formatDate(DateUtil.yesterday()));
subErpOrder.setExpireDate(DateUtil.formatDate(DateUtil.tomorrow()));
subErpOrder.setCount(10);
subErpOrder.setPrice(BigDecimal.valueOf(1000, 2));
subErpOrder.setProductId("6555");
subErpOrders.add(subErpOrder);
}
udiwmsOrderResponse.setDetailList(subErpOrders);
return ResultVOUtils.success(udiwmsOrderResponse);
}
/**
*
*
* @param udiwmsOrderRequest
* @return
*/
public BaseResponse addOrders(UdiwmsOrderRequest udiwmsOrderRequest) {
Map<String, Object> verifyResult = verifyOrderParams(udiwmsOrderRequest);
boolean flag = (boolean) verifyResult.get("flag");
if (!flag) {
return ResultVOUtils.error(500, verifyResult.get("msg").toString());
}
return ResultVOUtils.success(CustomUtil.getId());
}
/**
*
*
* @param udiwmsOrderRequest
* @return
*/
private Map<String, Object> verifyOrderParams(UdiwmsOrderRequest udiwmsOrderRequest) {
boolean flag = true;
String msg = "";
if (null == udiwmsOrderRequest) {
flag = false;
msg = "单据数据不能为空";
} else if (StrUtil.isBlank(udiwmsOrderRequest.getThirdSys())) {
flag = false;
msg = "第三方系统ID不能为空";
} else if (StrUtil.isBlank(udiwmsOrderRequest.getBillDate()) || StrUtil.isBlank(udiwmsOrderRequest.getBillFlag()) || StrUtil.isBlank(udiwmsOrderRequest.getCorpName())
|| StrUtil.isBlank(udiwmsOrderRequest.getCorpId()) || StrUtil.isBlank(udiwmsOrderRequest.getBillType()) || StrUtil.isBlank(udiwmsOrderRequest.getStatus())
|| StrUtil.isBlank(udiwmsOrderRequest.getStatus()) || CollUtil.isEmpty(udiwmsOrderRequest.getItems())) {
flag = false;
msg = "订单关键参数缺失或错误";
} else {
List<UdiwmsOrderDetail> items = udiwmsOrderRequest.getItems();
for (UdiwmsOrderDetail item : items) {
if (StrUtil.isBlank(item.getProductId()) || StrUtil.isBlank(item.getProductName()) || null == item.getPrice()
|| null == item.getCount() || 0 >= item.getPrice().compareTo(BigDecimal.ZERO) || 0 >= item.getCount()
|| StrUtil.isBlank(item.getProductDate()) || StrUtil.isBlank(item.getStandard())) {
flag = false;
msg = "单据详情数据缺失";
break;
}
}
}
Map<String, Object> map = new HashMap<>(2);
map.put("flag", flag);
map.put("msg", msg);
return map;
}
/**
*
*
* @param udiwmsOrderRequest
* @return
*/
public BaseResponse editOrder(UdiwmsOrderRequest udiwmsOrderRequest) {
Map<String, Object> verifyResult = verifyOrderParams(udiwmsOrderRequest);
boolean flag = (boolean) verifyResult.get("flag");
if (!flag) {
return ResultVOUtils.error(500, verifyResult.get("msg").toString());
}
if (StrUtil.isBlank(udiwmsOrderRequest.getBillNo())) {
return ResultVOUtils.error(500, "单据号不能为空");
}
return ResultVOUtils.success(CustomUtil.getId());
}
/**
*
*
* @param udiwmsOnhandRequest
* @return
*/
public BaseResponse getEnvProduct(UdiwmsOnhandRequest udiwmsOnhandRequest) {
if (null == udiwmsOnhandRequest || StrUtil.isBlank(udiwmsOnhandRequest.getThirdSys())) {
return ResultVOUtils.error(500, "第三方系统ID不能为空");
}
List<UdiwmsInvProductResponse> list = new ArrayList<>();
for (int i = 0; i < 3; i++) {
UdiwmsInvProductResponse response = new UdiwmsInvProductResponse();
response.setBatchNo("批次号");
response.setInventoryCode("1");
response.setInventoryName("总库");
response.setWarehouseCode("1001");
response.setWarehouseName("货位1");
response.setProductDate(DateUtil.formatDate(DateUtil.yesterday()));
response.setExpireDate(DateUtil.formatDate(DateUtil.tomorrow()));
response.setProductName("下肢直型锁定钢板");
response.setProductId("6555");
response.setStandard("12孔");
response.setRegisterNo("20153461024");
response.setCount(10);
response.setManufactory("江苏艾迪尔");
response.setSupId("2001");
response.setSupName("南昌必理商贸有限公司");
list.add(response);
}
return ResultVOUtils.success(list);
}
}

@ -240,7 +240,7 @@ public class UdPlatClient implements BaseHttpClient {
Map<String, String> orderDetailParamMap = new TreeMap<>();
orderDetailParamMap.put("hisOrderDetailId", CustomUtil.getId()); //医院订单明细主键
orderDetailParamMap.put("hospHisCode", udiwmsOrderRequest.getProductId()); //院内目录商品编码
orderDetailParamMap.put("planBuyNum", udiwmsOrderRequest.getCount()); //采购数量
orderDetailParamMap.put("planBuyNum", String.valueOf(udiwmsOrderRequest.getCount())); //采购数量
//orderDetailParamMap.put("purchaseRemark", null); //自定义订单备注信息,参数中无此字段,暂时不传
orderDetailParamMap.put("productSpecId", udiwmsOrderRequest.getProductId());
//查询产品规格型号信息

@ -41,10 +41,12 @@ public class YyUCloud31Client implements BaseHttpClient {
setEntity = setService.finSetUp();
HttpHeaders headers = new HttpHeaders();
headers.add("Content-Type", "application/json; charset=UTF-8");
headers.add("system", setEntity.getSystemCode());
headers.add("usercode", setEntity.getUserCode());
headers.add("password", setEntity.getPasswd());
headers.add("trantype", setEntity.getTransType());
if (setEntity != null) {
headers.add("system", setEntity.getSystemCode());
headers.add("usercode", setEntity.getUserCode());
headers.add("password", setEntity.getPasswd());
headers.add("trantype", setEntity.getTransType());
}
return headers;
}
@ -65,7 +67,7 @@ public class YyUCloud31Client implements BaseHttpClient {
for (UCustmandocResponse queryResponse : uCustmandocResponses) {
UdiwmsUnitResponse custmandocResponse = new UdiwmsUnitResponse();
custmandocResponse.setAddr(queryResponse.getParentvo().getConaddr());
custmandocResponse.setId(queryResponse.getParentvo().getCustcode());
custmandocResponse.setUnitId(queryResponse.getParentvo().getCustcode());
custmandocResponse.setName(queryResponse.getParentvo().getCustname());
custmandocResponse.setSpell(queryResponse.getParentvo().getMnecode());
custmandocResponse.setMobile(queryResponse.getParentvo().getPhone1());
@ -117,7 +119,7 @@ public class YyUCloud31Client implements BaseHttpClient {
@Override
public BaseResponse getOrders(UdiwmsOrderRequest udiwmsOrderRequest) {
if(udiwmsOrderRequest.getAction()==null && udiwmsOrderRequest.getBillAction()==null){
if (udiwmsOrderRequest.getAction() == null && udiwmsOrderRequest.getBillAction() == null) {
return ResultVOUtils.error(500, "单据类型不能为空!");
}
if ("WareHouseIn".equals(udiwmsOrderRequest.getAction()) || udiwmsOrderRequest.getBillAction().equals("采购入库")
@ -400,7 +402,7 @@ public class YyUCloud31Client implements BaseHttpClient {
subErpOrder.setExpireDate(childrenvoBean.getDvalidate());
subPurchases.add(subErpOrder);
}
udiwmsOrderResponse.setSubErpOrders(subPurchases);
udiwmsOrderResponse.setDetailList(subPurchases);
}
purchaseinResponses.add(udiwmsOrderResponse);
}
@ -448,7 +450,7 @@ public class YyUCloud31Client implements BaseHttpClient {
subPurchase.setBatchNo(childrenvoBean.getVbatchcode());
subPurchases.add(subPurchase);
}
purchaseinResponse.setSubErpOrders(subPurchases);
purchaseinResponse.setDetailList(subPurchases);
}
purchaseinResponses.add(purchaseinResponse);
}

@ -1,5 +1,7 @@
package com.glxp.mipsdl.admin.controller;
import com.glxp.mipsdl.admin.annotation.AuthRuleAnnotation;
import com.glxp.mipsdl.admin.client.http.TestClient;
import com.glxp.mipsdl.admin.client.http.UdPlatClient;
import com.glxp.mipsdl.admin.client.http.YyUCloud31Client;
import com.glxp.mipsdl.admin.http.request.USignRequest;
@ -24,10 +26,14 @@ public class UdiWmsController {
@Resource
YyUCloud31Client pzhzdClient;
@Resource
private TestClient testClient;
@Resource
private UdPlatClient udPlatClient;
//获取erp往来单位信息接口
@AuthRuleAnnotation("")
@PostMapping("/udiwms/erp/getUnits")
public BaseResponse getUnits(@RequestBody UdiwmsUnitRequest testUnitRequest,
BindingResult bindingResult) {
@ -36,37 +42,72 @@ public class UdiWmsController {
}
if (curFlag.equals("YONGYOU_U8_V3.1")) {
return pzhzdClient.getUnit(testUnitRequest);
} else if (curFlag.equals("TEST")) {
return testClient.getUnit(testUnitRequest);
} else
return ResultVOUtils.error(500, "未设置系统版本!");
}
//获取ERP产品信息接口
@AuthRuleAnnotation("")
@PostMapping("/udiwms/erp/getProducts")
public BaseResponse getProducts(@RequestBody UdiwmsProductRequest udiwmsProductRequest) {
if (curFlag.equals("YONGYOU_U8_V3.1")) {
return pzhzdClient.getPrdoucts(udiwmsProductRequest);
} else if (curFlag.equals("YG_UDPLAT_V1.0")) {
return udPlatClient.getPrdoucts(udiwmsProductRequest);
} else if (curFlag.equals("TEST")) {
return testClient.getProducuts(udiwmsProductRequest);
}
return ResultVOUtils.error(500, "未设置系统版本!");
}
//获取ERP订单接口
@AuthRuleAnnotation("")
@PostMapping("/udiwms/erp/getOrders")
public BaseResponse getOrders(@RequestBody UdiwmsOrderRequest udiwmsOrderRequest) {
if (curFlag.equals("YONGYOU_U8_V3.1")) {
return pzhzdClient.getOrders(udiwmsOrderRequest);
} else if (curFlag.equals("TEST")) {
return testClient.getOrders(udiwmsOrderRequest);
} else
return ResultVOUtils.error(500, "未设置系统版本!");
}
//新增单据
@AuthRuleAnnotation("")
@PostMapping("/udiwms/erp/addOrders")
public BaseResponse addOrders(@RequestBody UdiwmsOrderRequest udiwmsOrderRequest) {
if (curFlag.equals("TEST")) {
return testClient.addOrders(udiwmsOrderRequest);
}
return ResultVOUtils.error(500, "");
}
/**
*
*
* @param udiwmsOrderRequest
* @return
*/
@AuthRuleAnnotation("")
@PostMapping("/udiwms/erp/editOrder")
public BaseResponse editOrder(@RequestBody UdiwmsOrderRequest udiwmsOrderRequest) {
if (curFlag.equals("TEST")) {
return testClient.editOrder(udiwmsOrderRequest);
}
return ResultVOUtils.success("修改成功");
}
//获取库存产品基本信息(批次号,生产日期,失效日期,仓位号)
@PostMapping("/udiwms/erp/inv/getEnvProduct")
public BaseResponse getEnvProduct(@RequestBody UdiwmsOnhandRequest udiwmsOnhandRequest) {
if (curFlag.equals("YONGYOU_U8_V3.1")) {
return pzhzdClient.getInvProducts(udiwmsOnhandRequest);
} else if (curFlag.equals("TEST")) {
return testClient.getEnvProduct(udiwmsOnhandRequest);
} else
return ResultVOUtils.error(500, "未设置系统版本!");

@ -2,9 +2,10 @@ package com.glxp.mipsdl.admin.dao.yyu8v31;
import com.glxp.mipsdl.admin.entity.yyu8v31.YyUcloudV31SetEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface YyUcloudV31SetDao {
YyUcloudV31SetEntity finSetUp(String url);
YyUcloudV31SetEntity finSetUp(@Param("url") String url);
}

@ -2,23 +2,19 @@ package com.glxp.mipsdl.admin.req;
import lombok.Data;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
/**
*
*/
@Data
public class ListPageRequest {
@NotNull(message = "请选择第几页")
@Min(message = "分页参数错误", value = 1)
//@NotNull(message = "请选择第几页")
//@Min(message = "分页参数错误", value = 1)
private Integer page;
@NotNull(message = "请填写每页查询数量")
@Min(value = 1, message = "分页参数不能小于1")
@Max(value = 10001, message = "分页参数不能大于50")
//@NotNull(message = "请填写每页查询数量")
//@Min(value = 1, message = "分页参数不能小于1")
//@Max(value = 10001, message = "分页参数不能大于50")
private Integer limit;
}

@ -5,10 +5,17 @@ import lombok.Data;
import java.util.List;
@Data
public class UdiwmsOnhandRequest extends ListPageRequest{
public class UdiwmsOnhandRequest extends ListPageRequest {
private String batchNo; //批次号
private String warehouseCode; //货位号
private String inventoryCode; //仓库号
private List<String> inventoryCodes; //暂时不启用
private String thirdSys; //第三方系统ID
private String productId; //产品ID
private String productName; //产品名称
private String productDate; //产品名称
private String expireDate; //失效日期
private String batchNo;
private String warehouseCode;
private String inventoryCode;
private List<String> inventoryCodes;
}

@ -0,0 +1,16 @@
package com.glxp.mipsdl.admin.req;
import lombok.Data;
import java.math.BigDecimal;
@Data
public class UdiwmsOrderDetail {
private String productId; //产品编码
private BigDecimal price; //单价
private String standard; //规格型号
private String productName; //产品名称
private String productDate; //生产日期
private Integer count; //数量
}

@ -2,6 +2,9 @@ package com.glxp.mipsdl.admin.req;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
@Data
public class UdiwmsOrderRequest {
@ -14,7 +17,7 @@ public class UdiwmsOrderRequest {
private Integer limit;
private Integer page;
private String billdate; //单据日期
private String billDate; //单据日期
private String billType; //单据类型
private Integer createUser;
@ -28,15 +31,24 @@ public class UdiwmsOrderRequest {
private String address; //地址
private String linkMan; //联系人
private String linkTel; //电话
private String corpId; //第三方单据往来单位ID
private String corpName; //往来单位
private String batchNo; //批次号
private String expireDate; //失效日期
private String productDate; //生产日期
private String count; //数量
private Integer count; //数量
private String productId; //产品编码
private String detailCode; //明细编码
private String thirdSys; //第三方系统ID
private String status; //单据状态
private BigDecimal price; //单价
private String standard; //规格型号
private String productName;
//阳光采购平台 耗材目录规格id
private String productSpecId;
private List<UdiwmsOrderDetail> items; //单据详情数组
}

@ -3,7 +3,7 @@ package com.glxp.mipsdl.admin.req;
import lombok.Data;
@Data
public class UdiwmsProductRequest extends ListPageRequest{
public class UdiwmsProductRequest extends ListPageRequest {
private String code; //产品编码
private String name; //产品名称
@ -74,5 +74,6 @@ public class UdiwmsProductRequest extends ListPageRequest{
private String remark2;
//备注3
private String remark3;
private String thirdSys;
}

@ -5,9 +5,9 @@ import lombok.Data;
@Data
public class UdiwmsUnitRequest extends ListPageRequest {
String key;
private String unitId;
private String name;
String key; //关键字查询,匹配 往来单位编码,往来单位名称,往来单位简称,支持模糊查询
private String unitId; //往来单位编码
private String name; //往来单位名称
private String thirdSys; //第三方系统编码
}

@ -1,19 +1,38 @@
package com.glxp.mipsdl.admin.res.system;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
@Data
public class UdiwmsInvProductResponse {
@JsonIgnore
private String code;
@JsonIgnore
private String name;
@JsonIgnore
private String spec;
private String batchNo;
private String batchNo;//批次号
@JsonIgnore
private String manufacturingDate;
@JsonIgnore
private String expirationDate;
private String warehouseCode;
private String warehouseName;
private String warehouseCode;//货位号
private String warehouseName;//货位名称
@JsonIgnore
private String registerCertNo;
private Integer count;
private Integer count;//数量
private String inventoryCode;//仓库号
private String inventoryName;//仓库名称
private String productName;//产品名称
private String productDate;//生产日期
private String expireDate;//失效日期
private String productId;//产品ID
private String standard; //规格型号
private String registerNo; //注册证号
private String manufactory; //生产厂家
private String supId; //配送企业ID
private String supName; //配送企业名称
}

@ -1,5 +1,8 @@
package com.glxp.mipsdl.admin.res.system;
import com.fasterxml.jackson.annotation.JsonIgnore;
import java.math.BigDecimal;
import java.util.List;
public class UdiwmsOrderResponse {
@ -8,10 +11,126 @@ public class UdiwmsOrderResponse {
private String billdate;
private String corpId;
private String corpName;
private String billType;
private String billType; //单据类型
@JsonIgnore
private String signFlag;
@JsonIgnore
private String originType;
private List<SubErpOrder> subErpOrders;
private List<SubErpOrder> detailList;
private String startDate; //起始时间
private String endDate; //结束时间
private String billFlag; //单据状态
private String createUser; //创建人
private String reviewUser; //审核人
private String address; //地址
private String linkMan; //联系人
private String linkTel; //电话
private String remark; //| 备注
private String remark1; //备注1/规格型号ID
private String remark2; //备注2/型号
private String remark3; //备注3/规格
public String getSignFlag() {
return signFlag;
}
public String getStartDate() {
return startDate;
}
public void setStartDate(String startDate) {
this.startDate = startDate;
}
public String getEndDate() {
return endDate;
}
public void setEndDate(String endDate) {
this.endDate = endDate;
}
public String getBillFlag() {
return billFlag;
}
public void setBillFlag(String billFlag) {
this.billFlag = billFlag;
}
public String getCreateUser() {
return createUser;
}
public void setCreateUser(String createUser) {
this.createUser = createUser;
}
public String getReviewUser() {
return reviewUser;
}
public void setReviewUser(String reviewUser) {
this.reviewUser = reviewUser;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getLinkMan() {
return linkMan;
}
public void setLinkMan(String linkMan) {
this.linkMan = linkMan;
}
public String getLinkTel() {
return linkTel;
}
public void setLinkTel(String linkTel) {
this.linkTel = linkTel;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getRemark1() {
return remark1;
}
public void setRemark1(String remark1) {
this.remark1 = remark1;
}
public String getRemark2() {
return remark2;
}
public void setRemark2(String remark2) {
this.remark2 = remark2;
}
public String getRemark3() {
return remark3;
}
public void setRemark3(String remark3) {
this.remark3 = remark3;
}
public String getBillNo() {
return billNo;
@ -61,12 +180,12 @@ public class UdiwmsOrderResponse {
this.signFlag = signFlag;
}
public List<SubErpOrder> getSubErpOrders() {
return subErpOrders;
public List<SubErpOrder> getDetailList() {
return detailList;
}
public void setSubErpOrders(List<SubErpOrder> subErpOrders) {
this.subErpOrders = subErpOrders;
public void setDetailList(List<SubErpOrder> detailList) {
this.detailList = detailList;
}
public String getOriginType() {
@ -78,15 +197,43 @@ public class UdiwmsOrderResponse {
}
public static class SubErpOrder {
private String productId;
private String productId; //产品编码
private String productName;
private String spec;
private String batchNo;
private String expireDate;
private String productDate;
private String batchNo;//批次号
private String expireDate;//失效日期
private String productDate; //生产日期
private int count; //账面数量
private int reCount; //实际数量
private String detailId; //明细ID
private String corpName; //往来单位
private BigDecimal price; //单价
public String getDetailId() {
return detailId;
}
public void setDetailId(String detailId) {
this.detailId = detailId;
}
public String getCorpName() {
return corpName;
}
public void setCorpName(String corpName) {
this.corpName = corpName;
}
public BigDecimal getPrice() {
return price;
}
public void setPrice(BigDecimal price) {
this.price = price;
}
public String getProductId() {
return productId;
}

@ -1,12 +1,20 @@
package com.glxp.mipsdl.admin.res.system;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class UdiwmsProductInfoResponse {
private String code; //产品编码
private String name; //通用名称
private String measname; //计量单位
@ -15,8 +23,8 @@ public class UdiwmsProductInfoResponse {
private String manufactory; //生产厂家
private String supName; //配送企业
private Date updateTime;
private boolean isChecked;
private Date updateTime; //更新时间
private boolean isChecked; //
//产品类别
private String cplb;
@ -77,4 +85,6 @@ public class UdiwmsProductInfoResponse {
private String hospHisCode;
}

@ -4,11 +4,13 @@ import lombok.Data;
@Data
public class UdiwmsUnitResponse {
private String id; //必填
private String name; //必填
private String spell;
private String addr;
private String creditNo;
private String contact;
private String mobile;
private String unitId; //必填 往来单位ID
private String name; //必填 往来单位名称
private String spell; //往来单位简称
private String addr; //地址
private String creditNo; //社会信用号
private String contact; //联系人
private String mobile; //联系电话
}

@ -58,7 +58,7 @@ public class InvDlErpStockService {
page++;
for (UdiwmsOrderResponse erpOrderEntity : erpOrderEntities) {
//ERP数据更新
List<UdiwmsOrderResponse.SubErpOrder> subErpOrders = erpOrderEntity.getSubErpOrders();
List<UdiwmsOrderResponse.SubErpOrder> subErpOrders = erpOrderEntity.getDetailList();
if (subErpOrders != null && subErpOrders.size() > 0) {
for (UdiwmsOrderResponse.SubErpOrder subErpOrder : subErpOrders) {
ErpStockEntity erpStockEntity = new ErpStockEntity();
@ -162,7 +162,7 @@ public class InvDlErpStockService {
subErpOrder.setExpireDate(childrenvoBean.getDvalidate());
subPurchases.add(subErpOrder);
}
udiwmsOrderResponse.setSubErpOrders(subPurchases);
udiwmsOrderResponse.setDetailList(subPurchases);
}
purchaseinResponses.add(udiwmsOrderResponse);
}

@ -28,8 +28,7 @@ UDIWMS_IP=http://192.168.0.109:9991
#0.NULL(空未配置1.GLXP(自定义规范标准2.ZHIYE_V1(智业V1,诏安医院),3.YG_UDPLAT_V1(阳光采购平台)
FILE_VERSION_FLAG=ZHIYE_V1
#接口实时获取
#0.NULL(空,未配置),1.YONGYOU_U8_V3.1(用友3.1版本,片仔癀诊断) 2.YG_UDPLAT_V1.0(阳光采购平台)
ONLINE_VESRION_FLAG=YG_UDPLAT_V1.0
#0.NULL(空,未配置),1.YONGYOU_U8_V3.1(用友3.1版本,片仔癀诊断) 2.YG_UDPLAT_V1.0(阳光采购平台) 3.TEST(标准接口,测试用)
ONLINE_VESRION_FLAG=TEST

@ -7,10 +7,9 @@
resultType="com.glxp.mipsdl.admin.entity.yyu8v31.YyUcloudV31SetEntity">
SELECT *
FROM yy_ucloud_v31_setup
<where>
<if test="name != null and name != ''">
and ipUrl = #{name}
<if test="url != null and url != ''">
and ipUrl = #{url}
</if>
</where>
limit 1

Loading…
Cancel
Save