diff --git a/src/main/java/com/glxp/mipsdl/client/ctqyy/CtqyyClient.java b/src/main/java/com/glxp/mipsdl/client/ctqyy/CtqyyClient.java index 53f6003..082ff1e 100644 --- a/src/main/java/com/glxp/mipsdl/client/ctqyy/CtqyyClient.java +++ b/src/main/java/com/glxp/mipsdl/client/ctqyy/CtqyyClient.java @@ -802,8 +802,8 @@ public class CtqyyClient extends CommonHttpClient { @Override public BaseResponse getInvResult(UdiwmsInvProductsRequest udiwmsInvProductsRequest) { CtqyyInvRequest ptxhyyInvRequest = new CtqyyInvRequest(); - ptxhyyInvRequest.setStartdate(DateUtil.formatDate(udiwmsInvProductsRequest.getStartDate(), "yyyy-MM-dd")); - ptxhyyInvRequest.setEnddate(DateUtil.formatDate(udiwmsInvProductsRequest.getEndDate(), "yyyy-MM-dd")); + ptxhyyInvRequest.setStartdate(DateUtil.formatDate(DateUtil.parseDate(udiwmsInvProductsRequest.getStartDate()), "yyyy-MM-dd")); + ptxhyyInvRequest.setEnddate(DateUtil.formatDate(DateUtil.parseDate(udiwmsInvProductsRequest.getEndDate()), "yyyy-MM-dd")); CtqyyRequest ctqyyRequest = new CtqyyRequest(); ctqyyRequest.setMsgHeader(getMsgHeader("getMaterialSheet")); @@ -866,8 +866,8 @@ public class CtqyyClient extends CommonHttpClient { @Override public BaseResponse getInvCodeResult(UdiwmsInvProductsRequest udiwmsInvProductsRequest) { CtqyyInvRequest ptxhyyInvRequest = new CtqyyInvRequest(); - ptxhyyInvRequest.setStartdate(DateUtil.formatDate(udiwmsInvProductsRequest.getStartDate(), "yyyy-MM-dd")); - ptxhyyInvRequest.setEnddate(DateUtil.formatDate(udiwmsInvProductsRequest.getEndDate(), "yyyy-MM-dd")); + ptxhyyInvRequest.setStartdate(DateUtil.formatDate(DateUtil.parseDate(udiwmsInvProductsRequest.getStartDate()), "yyyy-MM-dd")); + ptxhyyInvRequest.setEnddate(DateUtil.formatDate(DateUtil.parseDate(udiwmsInvProductsRequest.getEndDate()), "yyyy-MM-dd")); CtqyyRequest ctqyyRequest = new CtqyyRequest(); ctqyyRequest.setMsgHeader(getMsgHeader("getSickHighitem")); @@ -964,8 +964,8 @@ public class CtqyyClient extends CommonHttpClient { @Override public BaseResponse getInvFeeResult(UdiwmsInvProductsRequest udiwmsInvProductsRequest) { CtqyyInvRequest ptxhyyInvRequest = new CtqyyInvRequest(); - ptxhyyInvRequest.setStartdate(DateUtil.formatDate(udiwmsInvProductsRequest.getStartDate(), "yyyy-MM-dd")); - ptxhyyInvRequest.setEnddate(DateUtil.formatDate(udiwmsInvProductsRequest.getEndDate(), "yyyy-MM-dd")); + ptxhyyInvRequest.setStartdate(DateUtil.formatDate(DateUtil.parseDate(udiwmsInvProductsRequest.getStartDate()), "yyyy-MM-dd")); + ptxhyyInvRequest.setEnddate(DateUtil.formatDate(DateUtil.parseDate(udiwmsInvProductsRequest.getEndDate()), "yyyy-MM-dd")); CtqyyRequest ctqyyRequest = new CtqyyRequest(); ctqyyRequest.setMsgHeader(getMsgHeader("getSickPriceitem")); diff --git a/src/main/java/com/glxp/mipsdl/client/njxyy/NjxyyClient.java b/src/main/java/com/glxp/mipsdl/client/njxyy/NjxyyClient.java index c7389c0..080b0f9 100644 --- a/src/main/java/com/glxp/mipsdl/client/njxyy/NjxyyClient.java +++ b/src/main/java/com/glxp/mipsdl/client/njxyy/NjxyyClient.java @@ -757,7 +757,12 @@ public class NjxyyClient extends CommonHttpClient { */ @Override public BaseResponse getInvResult(UdiwmsInvProductsRequest udiwmsInvProductsRequest) { + udiwmsInvProductsRequest.setDatabaseProductName(getDataSourceType()); + if (udiwmsInvProductsRequest != null && udiwmsInvProductsRequest.getStartDate() != null && udiwmsInvProductsRequest.getEndDate() != null){ + }else { + return ResultVOUtils.error(500,"缺少开始结束日期必要参数"); + } List a005s = a005Service.filterList(udiwmsInvProductsRequest); diff --git a/src/main/java/com/glxp/mipsdl/client/ptxhyy/PtxhyyClient.java b/src/main/java/com/glxp/mipsdl/client/ptxhyy/PtxhyyClient.java index 1c59b7d..4195294 100644 --- a/src/main/java/com/glxp/mipsdl/client/ptxhyy/PtxhyyClient.java +++ b/src/main/java/com/glxp/mipsdl/client/ptxhyy/PtxhyyClient.java @@ -448,8 +448,8 @@ public class PtxhyyClient extends CommonHttpClient { @Override public BaseResponse getInvFeeResult(UdiwmsInvProductsRequest udiwmsInvProductsRequest) { PtxhyyInvRequest ptxhyyInvRequest = new PtxhyyInvRequest(); - ptxhyyInvRequest.setKssj(DateUtil.formatDate(udiwmsInvProductsRequest.getStartDate(), "yyyy-MM-dd")); - ptxhyyInvRequest.setJssj(DateUtil.formatDate(udiwmsInvProductsRequest.getEndDate(), "yyyy-MM-dd")); + ptxhyyInvRequest.setKssj(DateUtil.formatDate(DateUtil.parseDate(udiwmsInvProductsRequest.getStartDate()), "yyyy-MM-dd")); + ptxhyyInvRequest.setJssj(DateUtil.formatDate(DateUtil.parseDate(udiwmsInvProductsRequest.getEndDate()), "yyyy-MM-dd")); String response = null; try { response = FileUtils.getFileContent("D://UDI/response.json"); diff --git a/src/main/java/com/glxp/mipsdl/client/scpwxyy/ScpwxyyClient.java b/src/main/java/com/glxp/mipsdl/client/scpwxyy/ScpwxyyClient.java index 2994142..2018d47 100644 --- a/src/main/java/com/glxp/mipsdl/client/scpwxyy/ScpwxyyClient.java +++ b/src/main/java/com/glxp/mipsdl/client/scpwxyy/ScpwxyyClient.java @@ -795,8 +795,8 @@ public class ScpwxyyClient extends CommonHttpClient { @Override public BaseResponse getInvResult(UdiwmsInvProductsRequest udiwmsInvProductsRequest) { CtqyyInvRequest ptxhyyInvRequest = new CtqyyInvRequest(); - ptxhyyInvRequest.setStartdate(DateUtil.formatDate(udiwmsInvProductsRequest.getStartDate(), "yyyy-MM-dd")); - ptxhyyInvRequest.setEnddate(DateUtil.formatDate(udiwmsInvProductsRequest.getEndDate(), "yyyy-MM-dd")); + ptxhyyInvRequest.setStartdate(DateUtil.formatDate(DateUtil.parseDate(udiwmsInvProductsRequest.getStartDate()), "yyyy-MM-dd")); + ptxhyyInvRequest.setEnddate(DateUtil.formatDate(DateUtil.parseDate(udiwmsInvProductsRequest.getEndDate()), "yyyy-MM-dd")); CtqyyRequest ctqyyRequest = new CtqyyRequest(); ctqyyRequest.setMsgHeader(getMsgHeader("getMaterialSheet")); @@ -859,8 +859,8 @@ public class ScpwxyyClient extends CommonHttpClient { @Override public BaseResponse getInvCodeResult(UdiwmsInvProductsRequest udiwmsInvProductsRequest) { CtqyyInvRequest ptxhyyInvRequest = new CtqyyInvRequest(); - ptxhyyInvRequest.setStartdate(DateUtil.formatDate(udiwmsInvProductsRequest.getStartDate(), "yyyy-MM-dd")); - ptxhyyInvRequest.setEnddate(DateUtil.formatDate(udiwmsInvProductsRequest.getEndDate(), "yyyy-MM-dd")); + ptxhyyInvRequest.setStartdate(DateUtil.formatDate(DateUtil.parseDate(udiwmsInvProductsRequest.getStartDate()), "yyyy-MM-dd")); + ptxhyyInvRequest.setEnddate(DateUtil.formatDate(DateUtil.parseDate(udiwmsInvProductsRequest.getEndDate()), "yyyy-MM-dd")); CtqyyRequest ctqyyRequest = new CtqyyRequest(); ctqyyRequest.setMsgHeader(getMsgHeader("getSickHighitem")); @@ -952,8 +952,8 @@ public class ScpwxyyClient extends CommonHttpClient { @Override public BaseResponse getInvFeeResult(UdiwmsInvProductsRequest udiwmsInvProductsRequest) { CtqyyInvRequest ptxhyyInvRequest = new CtqyyInvRequest(); - ptxhyyInvRequest.setStartdate(DateUtil.formatDate(udiwmsInvProductsRequest.getStartDate(), "yyyy-MM-dd")); - ptxhyyInvRequest.setEnddate(DateUtil.formatDate(udiwmsInvProductsRequest.getEndDate(), "yyyy-MM-dd")); + ptxhyyInvRequest.setStartdate(DateUtil.formatDate(DateUtil.parseDate(udiwmsInvProductsRequest.getStartDate()), "yyyy-MM-dd")); + ptxhyyInvRequest.setEnddate(DateUtil.formatDate(DateUtil.parseDate(udiwmsInvProductsRequest.getEndDate()), "yyyy-MM-dd")); CtqyyRequest ctqyyRequest = new CtqyyRequest(); ctqyyRequest.setMsgHeader(getMsgHeader("getSickPriceitem")); diff --git a/src/main/java/com/glxp/mipsdl/client/yxfuyy/YxfyyyClient.java b/src/main/java/com/glxp/mipsdl/client/yxfuyy/YxfyyyClient.java index fcc4a52..62c3348 100644 --- a/src/main/java/com/glxp/mipsdl/client/yxfuyy/YxfyyyClient.java +++ b/src/main/java/com/glxp/mipsdl/client/yxfuyy/YxfyyyClient.java @@ -788,8 +788,8 @@ public class YxfyyyClient extends CommonHttpClient { @Override public BaseResponse getInvResult(UdiwmsInvProductsRequest udiwmsInvProductsRequest) { CtqyyInvRequest ptxhyyInvRequest = new CtqyyInvRequest(); - ptxhyyInvRequest.setStartdate(DateUtil.formatDate(udiwmsInvProductsRequest.getStartDate(), "yyyy-MM-dd")); - ptxhyyInvRequest.setEnddate(DateUtil.formatDate(udiwmsInvProductsRequest.getEndDate(), "yyyy-MM-dd")); + ptxhyyInvRequest.setStartdate(DateUtil.formatDate(DateUtil.parseDate(udiwmsInvProductsRequest.getStartDate()), "yyyy-MM-dd")); + ptxhyyInvRequest.setEnddate(DateUtil.formatDate(DateUtil.parseDate(udiwmsInvProductsRequest.getEndDate()), "yyyy-MM-dd")); CtqyyRequest ctqyyRequest = new CtqyyRequest(); ctqyyRequest.setMsgHeader(getMsgHeader("getMaterialSheet")); @@ -852,8 +852,8 @@ public class YxfyyyClient extends CommonHttpClient { @Override public BaseResponse getInvCodeResult(UdiwmsInvProductsRequest udiwmsInvProductsRequest) { CtqyyInvRequest ptxhyyInvRequest = new CtqyyInvRequest(); - ptxhyyInvRequest.setStartdate(DateUtil.formatDate(udiwmsInvProductsRequest.getStartDate(), "yyyy-MM-dd")); - ptxhyyInvRequest.setEnddate(DateUtil.formatDate(udiwmsInvProductsRequest.getEndDate(), "yyyy-MM-dd")); + ptxhyyInvRequest.setStartdate(DateUtil.formatDate(DateUtil.parseDate(udiwmsInvProductsRequest.getStartDate()), "yyyy-MM-dd")); + ptxhyyInvRequest.setEnddate(DateUtil.formatDate(DateUtil.parseDate(udiwmsInvProductsRequest.getEndDate()), "yyyy-MM-dd")); CtqyyRequest ctqyyRequest = new CtqyyRequest(); ctqyyRequest.setMsgHeader(getMsgHeader("getSickHighitem")); @@ -945,8 +945,8 @@ public class YxfyyyClient extends CommonHttpClient { @Override public BaseResponse getInvFeeResult(UdiwmsInvProductsRequest udiwmsInvProductsRequest) { CtqyyInvRequest ptxhyyInvRequest = new CtqyyInvRequest(); - ptxhyyInvRequest.setStartdate(DateUtil.formatDate(udiwmsInvProductsRequest.getStartDate(), "yyyy-MM-dd")); - ptxhyyInvRequest.setEnddate(DateUtil.formatDate(udiwmsInvProductsRequest.getEndDate(), "yyyy-MM-dd")); + ptxhyyInvRequest.setStartdate(DateUtil.formatDate(DateUtil.parseDate(udiwmsInvProductsRequest.getStartDate()), "yyyy-MM-dd")); + ptxhyyInvRequest.setEnddate(DateUtil.formatDate(DateUtil.parseDate(udiwmsInvProductsRequest.getEndDate()), "yyyy-MM-dd")); CtqyyRequest ctqyyRequest = new CtqyyRequest(); ctqyyRequest.setMsgHeader(getMsgHeader("getSickPriceitem")); diff --git a/src/main/java/com/glxp/mipsdl/entity/njxyy/A005.java b/src/main/java/com/glxp/mipsdl/entity/njxyy/A005.java index b476c35..f76d672 100644 --- a/src/main/java/com/glxp/mipsdl/entity/njxyy/A005.java +++ b/src/main/java/com/glxp/mipsdl/entity/njxyy/A005.java @@ -1,10 +1,10 @@ package com.glxp.mipsdl.entity.njxyy; -import cn.hutool.core.date.DateTime; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import java.math.BigDecimal; import java.util.Date; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -77,6 +77,6 @@ public class A005 { private String corpname; @TableField(value = "REMARK") - private Date remark; + private String remark; } \ No newline at end of file diff --git a/src/main/java/com/glxp/mipsdl/req/base/UdiwmsInvProductsRequest.java b/src/main/java/com/glxp/mipsdl/req/base/UdiwmsInvProductsRequest.java index 4425c1a..1518fce 100644 --- a/src/main/java/com/glxp/mipsdl/req/base/UdiwmsInvProductsRequest.java +++ b/src/main/java/com/glxp/mipsdl/req/base/UdiwmsInvProductsRequest.java @@ -170,8 +170,10 @@ public class UdiwmsInvProductsRequest extends ListPageRequest { private String category; private Integer filterNoInv; - private Date startDate; - private Date endDate; + private String startDate; + private String endDate; private String thirdSys; + private String databaseProductName; + } diff --git a/src/main/java/com/glxp/mipsdl/service/njxyy/A005Service.java b/src/main/java/com/glxp/mipsdl/service/njxyy/A005Service.java index c3a435d..6a767b9 100644 --- a/src/main/java/com/glxp/mipsdl/service/njxyy/A005Service.java +++ b/src/main/java/com/glxp/mipsdl/service/njxyy/A005Service.java @@ -19,17 +19,19 @@ import java.util.List; public class A005Service extends ServiceImpl { public List filterList(UdiwmsInvProductsRequest udiwmsInvProductsRequest) { -// if (null == udiwmsInvProductsRequest) { -// return Collections.emptyList(); -// } -// if (null != udiwmsInvProductsRequest.getPage() && null != udiwmsInvProductsRequest.getLimit()) { -// PageHelper.offsetPage((udiwmsInvProductsRequest.getPage() - 1) * udiwmsInvProductsRequest.getLimit(), udiwmsInvProductsRequest.getLimit()); -// } + if (null == udiwmsInvProductsRequest) { + return Collections.emptyList(); + } + if (null != udiwmsInvProductsRequest.getPage() && null != udiwmsInvProductsRequest.getLimit()) { + PageHelper.offsetPage((udiwmsInvProductsRequest.getPage() - 1) * udiwmsInvProductsRequest.getLimit(), udiwmsInvProductsRequest.getLimit()); + } - LambdaQueryWrapper qw = new LambdaQueryWrapper<>(); - qw.ge(A005::getRemark,DateUtil.formatDate(udiwmsInvProductsRequest.getStartDate(), "yyyy-MM-dd") + " 00:00:00"); - qw.le(A005::getRemark,DateUtil.formatDate(udiwmsInvProductsRequest.getEndDate(), "yyyy-MM-dd") + " 23:59:59"); - - return this.list(qw); +// LambdaQueryWrapper qw = new LambdaQueryWrapper<>(); +// qw.ge(A005::getRemark,DateUtil.parseDate(DateUtil.formatDate(udiwmsInvProductsRequest.getStartDate(), "yyyy-MM-dd") + " 00:00:00")); +// qw.le(A005::getRemark,DateUtil.parseDate(DateUtil.formatDate(udiwmsInvProductsRequest.getEndDate(), "yyyy-MM-dd")+ " 23:59:59" )); +// +// udiwmsInvProductsRequest.setStartDate(); +// udiwmsInvProductsRequest.setEndDate(); + return this.baseMapper.filterList(udiwmsInvProductsRequest); } } diff --git a/src/main/java/com/glxp/mipsdl/thirddao/njxyy/A005Mapper.java b/src/main/java/com/glxp/mipsdl/thirddao/njxyy/A005Mapper.java index 71eaa02..89829be 100644 --- a/src/main/java/com/glxp/mipsdl/thirddao/njxyy/A005Mapper.java +++ b/src/main/java/com/glxp/mipsdl/thirddao/njxyy/A005Mapper.java @@ -4,9 +4,13 @@ import com.baomidou.dynamic.datasource.annotation.DS; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.glxp.mipsdl.entity.njxyy.A005; import com.glxp.mipsdl.entity.thrsys.ThrCorpEntity; +import com.glxp.mipsdl.req.base.UdiwmsInvProductsRequest; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + @Mapper @DS("njsql") public interface A005Mapper extends BaseMapper { + List filterList(UdiwmsInvProductsRequest udiwmsInvProductsRequest); } diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 56d884d..3b0a433 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -30,6 +30,7 @@ mybatis-plus: use-column-label: true map-underscore-to-camel-case: false log-impl: org.apache.ibatis.logging.stdout.StdOutImpl + default-statement-timeout: 1800 global-config: banner: false diff --git a/src/main/resources/mybatis/mapper/other/njxyy/A005Mapper.xml b/src/main/resources/mybatis/mapper/other/njxyy/A005Mapper.xml index 9a2f308..658fc46 100644 --- a/src/main/resources/mybatis/mapper/other/njxyy/A005Mapper.xml +++ b/src/main/resources/mybatis/mapper/other/njxyy/A005Mapper.xml @@ -33,4 +33,37 @@ YLQXZCRBARMC, ZCZBHHZBAPZBH, MANUFACTURER, MANUFACTORYCODE, AMOUNT, RECOUNT, INOUTTYPE, INVCODE, INVNAME, CORPID, CORPNAME, REMARK + + \ No newline at end of file