fix: 南靖初始化

njxyy
chenhc 5 months ago
parent a147727df1
commit 9f54c9957c

@ -802,8 +802,8 @@ public class CtqyyClient extends CommonHttpClient {
@Override @Override
public BaseResponse getInvResult(UdiwmsInvProductsRequest udiwmsInvProductsRequest) { public BaseResponse getInvResult(UdiwmsInvProductsRequest udiwmsInvProductsRequest) {
CtqyyInvRequest ptxhyyInvRequest = new CtqyyInvRequest(); CtqyyInvRequest ptxhyyInvRequest = new CtqyyInvRequest();
ptxhyyInvRequest.setStartdate(DateUtil.formatDate(udiwmsInvProductsRequest.getStartDate(), "yyyy-MM-dd")); ptxhyyInvRequest.setStartdate(DateUtil.formatDate(DateUtil.parseDate(udiwmsInvProductsRequest.getStartDate()), "yyyy-MM-dd"));
ptxhyyInvRequest.setEnddate(DateUtil.formatDate(udiwmsInvProductsRequest.getEndDate(), "yyyy-MM-dd")); ptxhyyInvRequest.setEnddate(DateUtil.formatDate(DateUtil.parseDate(udiwmsInvProductsRequest.getEndDate()), "yyyy-MM-dd"));
CtqyyRequest ctqyyRequest = new CtqyyRequest(); CtqyyRequest ctqyyRequest = new CtqyyRequest();
ctqyyRequest.setMsgHeader(getMsgHeader("getMaterialSheet")); ctqyyRequest.setMsgHeader(getMsgHeader("getMaterialSheet"));
@ -866,8 +866,8 @@ public class CtqyyClient extends CommonHttpClient {
@Override @Override
public BaseResponse getInvCodeResult(UdiwmsInvProductsRequest udiwmsInvProductsRequest) { public BaseResponse getInvCodeResult(UdiwmsInvProductsRequest udiwmsInvProductsRequest) {
CtqyyInvRequest ptxhyyInvRequest = new CtqyyInvRequest(); CtqyyInvRequest ptxhyyInvRequest = new CtqyyInvRequest();
ptxhyyInvRequest.setStartdate(DateUtil.formatDate(udiwmsInvProductsRequest.getStartDate(), "yyyy-MM-dd")); ptxhyyInvRequest.setStartdate(DateUtil.formatDate(DateUtil.parseDate(udiwmsInvProductsRequest.getStartDate()), "yyyy-MM-dd"));
ptxhyyInvRequest.setEnddate(DateUtil.formatDate(udiwmsInvProductsRequest.getEndDate(), "yyyy-MM-dd")); ptxhyyInvRequest.setEnddate(DateUtil.formatDate(DateUtil.parseDate(udiwmsInvProductsRequest.getEndDate()), "yyyy-MM-dd"));
CtqyyRequest ctqyyRequest = new CtqyyRequest(); CtqyyRequest ctqyyRequest = new CtqyyRequest();
ctqyyRequest.setMsgHeader(getMsgHeader("getSickHighitem")); ctqyyRequest.setMsgHeader(getMsgHeader("getSickHighitem"));
@ -964,8 +964,8 @@ public class CtqyyClient extends CommonHttpClient {
@Override @Override
public BaseResponse getInvFeeResult(UdiwmsInvProductsRequest udiwmsInvProductsRequest) { public BaseResponse getInvFeeResult(UdiwmsInvProductsRequest udiwmsInvProductsRequest) {
CtqyyInvRequest ptxhyyInvRequest = new CtqyyInvRequest(); CtqyyInvRequest ptxhyyInvRequest = new CtqyyInvRequest();
ptxhyyInvRequest.setStartdate(DateUtil.formatDate(udiwmsInvProductsRequest.getStartDate(), "yyyy-MM-dd")); ptxhyyInvRequest.setStartdate(DateUtil.formatDate(DateUtil.parseDate(udiwmsInvProductsRequest.getStartDate()), "yyyy-MM-dd"));
ptxhyyInvRequest.setEnddate(DateUtil.formatDate(udiwmsInvProductsRequest.getEndDate(), "yyyy-MM-dd")); ptxhyyInvRequest.setEnddate(DateUtil.formatDate(DateUtil.parseDate(udiwmsInvProductsRequest.getEndDate()), "yyyy-MM-dd"));
CtqyyRequest ctqyyRequest = new CtqyyRequest(); CtqyyRequest ctqyyRequest = new CtqyyRequest();
ctqyyRequest.setMsgHeader(getMsgHeader("getSickPriceitem")); ctqyyRequest.setMsgHeader(getMsgHeader("getSickPriceitem"));

@ -757,7 +757,12 @@ public class NjxyyClient extends CommonHttpClient {
*/ */
@Override @Override
public BaseResponse getInvResult(UdiwmsInvProductsRequest udiwmsInvProductsRequest) { public BaseResponse getInvResult(UdiwmsInvProductsRequest udiwmsInvProductsRequest) {
udiwmsInvProductsRequest.setDatabaseProductName(getDataSourceType());
if (udiwmsInvProductsRequest != null && udiwmsInvProductsRequest.getStartDate() != null && udiwmsInvProductsRequest.getEndDate() != null){
}else {
return ResultVOUtils.error(500,"缺少开始结束日期必要参数");
}
List<A005> a005s = a005Service.filterList(udiwmsInvProductsRequest); List<A005> a005s = a005Service.filterList(udiwmsInvProductsRequest);

@ -448,8 +448,8 @@ public class PtxhyyClient extends CommonHttpClient {
@Override @Override
public BaseResponse getInvFeeResult(UdiwmsInvProductsRequest udiwmsInvProductsRequest) { public BaseResponse getInvFeeResult(UdiwmsInvProductsRequest udiwmsInvProductsRequest) {
PtxhyyInvRequest ptxhyyInvRequest = new PtxhyyInvRequest(); PtxhyyInvRequest ptxhyyInvRequest = new PtxhyyInvRequest();
ptxhyyInvRequest.setKssj(DateUtil.formatDate(udiwmsInvProductsRequest.getStartDate(), "yyyy-MM-dd")); ptxhyyInvRequest.setKssj(DateUtil.formatDate(DateUtil.parseDate(udiwmsInvProductsRequest.getStartDate()), "yyyy-MM-dd"));
ptxhyyInvRequest.setJssj(DateUtil.formatDate(udiwmsInvProductsRequest.getEndDate(), "yyyy-MM-dd")); ptxhyyInvRequest.setJssj(DateUtil.formatDate(DateUtil.parseDate(udiwmsInvProductsRequest.getEndDate()), "yyyy-MM-dd"));
String response = null; String response = null;
try { try {
response = FileUtils.getFileContent("D://UDI/response.json"); response = FileUtils.getFileContent("D://UDI/response.json");

@ -795,8 +795,8 @@ public class ScpwxyyClient extends CommonHttpClient {
@Override @Override
public BaseResponse getInvResult(UdiwmsInvProductsRequest udiwmsInvProductsRequest) { public BaseResponse getInvResult(UdiwmsInvProductsRequest udiwmsInvProductsRequest) {
CtqyyInvRequest ptxhyyInvRequest = new CtqyyInvRequest(); CtqyyInvRequest ptxhyyInvRequest = new CtqyyInvRequest();
ptxhyyInvRequest.setStartdate(DateUtil.formatDate(udiwmsInvProductsRequest.getStartDate(), "yyyy-MM-dd")); ptxhyyInvRequest.setStartdate(DateUtil.formatDate(DateUtil.parseDate(udiwmsInvProductsRequest.getStartDate()), "yyyy-MM-dd"));
ptxhyyInvRequest.setEnddate(DateUtil.formatDate(udiwmsInvProductsRequest.getEndDate(), "yyyy-MM-dd")); ptxhyyInvRequest.setEnddate(DateUtil.formatDate(DateUtil.parseDate(udiwmsInvProductsRequest.getEndDate()), "yyyy-MM-dd"));
CtqyyRequest ctqyyRequest = new CtqyyRequest(); CtqyyRequest ctqyyRequest = new CtqyyRequest();
ctqyyRequest.setMsgHeader(getMsgHeader("getMaterialSheet")); ctqyyRequest.setMsgHeader(getMsgHeader("getMaterialSheet"));
@ -859,8 +859,8 @@ public class ScpwxyyClient extends CommonHttpClient {
@Override @Override
public BaseResponse getInvCodeResult(UdiwmsInvProductsRequest udiwmsInvProductsRequest) { public BaseResponse getInvCodeResult(UdiwmsInvProductsRequest udiwmsInvProductsRequest) {
CtqyyInvRequest ptxhyyInvRequest = new CtqyyInvRequest(); CtqyyInvRequest ptxhyyInvRequest = new CtqyyInvRequest();
ptxhyyInvRequest.setStartdate(DateUtil.formatDate(udiwmsInvProductsRequest.getStartDate(), "yyyy-MM-dd")); ptxhyyInvRequest.setStartdate(DateUtil.formatDate(DateUtil.parseDate(udiwmsInvProductsRequest.getStartDate()), "yyyy-MM-dd"));
ptxhyyInvRequest.setEnddate(DateUtil.formatDate(udiwmsInvProductsRequest.getEndDate(), "yyyy-MM-dd")); ptxhyyInvRequest.setEnddate(DateUtil.formatDate(DateUtil.parseDate(udiwmsInvProductsRequest.getEndDate()), "yyyy-MM-dd"));
CtqyyRequest ctqyyRequest = new CtqyyRequest(); CtqyyRequest ctqyyRequest = new CtqyyRequest();
ctqyyRequest.setMsgHeader(getMsgHeader("getSickHighitem")); ctqyyRequest.setMsgHeader(getMsgHeader("getSickHighitem"));
@ -952,8 +952,8 @@ public class ScpwxyyClient extends CommonHttpClient {
@Override @Override
public BaseResponse getInvFeeResult(UdiwmsInvProductsRequest udiwmsInvProductsRequest) { public BaseResponse getInvFeeResult(UdiwmsInvProductsRequest udiwmsInvProductsRequest) {
CtqyyInvRequest ptxhyyInvRequest = new CtqyyInvRequest(); CtqyyInvRequest ptxhyyInvRequest = new CtqyyInvRequest();
ptxhyyInvRequest.setStartdate(DateUtil.formatDate(udiwmsInvProductsRequest.getStartDate(), "yyyy-MM-dd")); ptxhyyInvRequest.setStartdate(DateUtil.formatDate(DateUtil.parseDate(udiwmsInvProductsRequest.getStartDate()), "yyyy-MM-dd"));
ptxhyyInvRequest.setEnddate(DateUtil.formatDate(udiwmsInvProductsRequest.getEndDate(), "yyyy-MM-dd")); ptxhyyInvRequest.setEnddate(DateUtil.formatDate(DateUtil.parseDate(udiwmsInvProductsRequest.getEndDate()), "yyyy-MM-dd"));
CtqyyRequest ctqyyRequest = new CtqyyRequest(); CtqyyRequest ctqyyRequest = new CtqyyRequest();
ctqyyRequest.setMsgHeader(getMsgHeader("getSickPriceitem")); ctqyyRequest.setMsgHeader(getMsgHeader("getSickPriceitem"));

@ -788,8 +788,8 @@ public class YxfyyyClient extends CommonHttpClient {
@Override @Override
public BaseResponse getInvResult(UdiwmsInvProductsRequest udiwmsInvProductsRequest) { public BaseResponse getInvResult(UdiwmsInvProductsRequest udiwmsInvProductsRequest) {
CtqyyInvRequest ptxhyyInvRequest = new CtqyyInvRequest(); CtqyyInvRequest ptxhyyInvRequest = new CtqyyInvRequest();
ptxhyyInvRequest.setStartdate(DateUtil.formatDate(udiwmsInvProductsRequest.getStartDate(), "yyyy-MM-dd")); ptxhyyInvRequest.setStartdate(DateUtil.formatDate(DateUtil.parseDate(udiwmsInvProductsRequest.getStartDate()), "yyyy-MM-dd"));
ptxhyyInvRequest.setEnddate(DateUtil.formatDate(udiwmsInvProductsRequest.getEndDate(), "yyyy-MM-dd")); ptxhyyInvRequest.setEnddate(DateUtil.formatDate(DateUtil.parseDate(udiwmsInvProductsRequest.getEndDate()), "yyyy-MM-dd"));
CtqyyRequest ctqyyRequest = new CtqyyRequest(); CtqyyRequest ctqyyRequest = new CtqyyRequest();
ctqyyRequest.setMsgHeader(getMsgHeader("getMaterialSheet")); ctqyyRequest.setMsgHeader(getMsgHeader("getMaterialSheet"));
@ -852,8 +852,8 @@ public class YxfyyyClient extends CommonHttpClient {
@Override @Override
public BaseResponse getInvCodeResult(UdiwmsInvProductsRequest udiwmsInvProductsRequest) { public BaseResponse getInvCodeResult(UdiwmsInvProductsRequest udiwmsInvProductsRequest) {
CtqyyInvRequest ptxhyyInvRequest = new CtqyyInvRequest(); CtqyyInvRequest ptxhyyInvRequest = new CtqyyInvRequest();
ptxhyyInvRequest.setStartdate(DateUtil.formatDate(udiwmsInvProductsRequest.getStartDate(), "yyyy-MM-dd")); ptxhyyInvRequest.setStartdate(DateUtil.formatDate(DateUtil.parseDate(udiwmsInvProductsRequest.getStartDate()), "yyyy-MM-dd"));
ptxhyyInvRequest.setEnddate(DateUtil.formatDate(udiwmsInvProductsRequest.getEndDate(), "yyyy-MM-dd")); ptxhyyInvRequest.setEnddate(DateUtil.formatDate(DateUtil.parseDate(udiwmsInvProductsRequest.getEndDate()), "yyyy-MM-dd"));
CtqyyRequest ctqyyRequest = new CtqyyRequest(); CtqyyRequest ctqyyRequest = new CtqyyRequest();
ctqyyRequest.setMsgHeader(getMsgHeader("getSickHighitem")); ctqyyRequest.setMsgHeader(getMsgHeader("getSickHighitem"));
@ -945,8 +945,8 @@ public class YxfyyyClient extends CommonHttpClient {
@Override @Override
public BaseResponse getInvFeeResult(UdiwmsInvProductsRequest udiwmsInvProductsRequest) { public BaseResponse getInvFeeResult(UdiwmsInvProductsRequest udiwmsInvProductsRequest) {
CtqyyInvRequest ptxhyyInvRequest = new CtqyyInvRequest(); CtqyyInvRequest ptxhyyInvRequest = new CtqyyInvRequest();
ptxhyyInvRequest.setStartdate(DateUtil.formatDate(udiwmsInvProductsRequest.getStartDate(), "yyyy-MM-dd")); ptxhyyInvRequest.setStartdate(DateUtil.formatDate(DateUtil.parseDate(udiwmsInvProductsRequest.getStartDate()), "yyyy-MM-dd"));
ptxhyyInvRequest.setEnddate(DateUtil.formatDate(udiwmsInvProductsRequest.getEndDate(), "yyyy-MM-dd")); ptxhyyInvRequest.setEnddate(DateUtil.formatDate(DateUtil.parseDate(udiwmsInvProductsRequest.getEndDate()), "yyyy-MM-dd"));
CtqyyRequest ctqyyRequest = new CtqyyRequest(); CtqyyRequest ctqyyRequest = new CtqyyRequest();
ctqyyRequest.setMsgHeader(getMsgHeader("getSickPriceitem")); ctqyyRequest.setMsgHeader(getMsgHeader("getSickPriceitem"));

@ -1,10 +1,10 @@
package com.glxp.mipsdl.entity.njxyy; package com.glxp.mipsdl.entity.njxyy;
import cn.hutool.core.date.DateTime;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
@ -77,6 +77,6 @@ public class A005 {
private String corpname; private String corpname;
@TableField(value = "REMARK") @TableField(value = "REMARK")
private Date remark; private String remark;
} }

@ -170,8 +170,10 @@ public class UdiwmsInvProductsRequest extends ListPageRequest {
private String category; private String category;
private Integer filterNoInv; private Integer filterNoInv;
private Date startDate; private String startDate;
private Date endDate; private String endDate;
private String thirdSys; private String thirdSys;
private String databaseProductName;
} }

@ -19,17 +19,19 @@ import java.util.List;
public class A005Service extends ServiceImpl<A005Mapper, A005> { public class A005Service extends ServiceImpl<A005Mapper, A005> {
public List<A005> filterList(UdiwmsInvProductsRequest udiwmsInvProductsRequest) { public List<A005> filterList(UdiwmsInvProductsRequest udiwmsInvProductsRequest) {
// if (null == udiwmsInvProductsRequest) { if (null == udiwmsInvProductsRequest) {
// return Collections.emptyList(); return Collections.emptyList();
// } }
// if (null != udiwmsInvProductsRequest.getPage() && null != udiwmsInvProductsRequest.getLimit()) { if (null != udiwmsInvProductsRequest.getPage() && null != udiwmsInvProductsRequest.getLimit()) {
// PageHelper.offsetPage((udiwmsInvProductsRequest.getPage() - 1) * udiwmsInvProductsRequest.getLimit(), udiwmsInvProductsRequest.getLimit()); PageHelper.offsetPage((udiwmsInvProductsRequest.getPage() - 1) * udiwmsInvProductsRequest.getLimit(), udiwmsInvProductsRequest.getLimit());
// } }
LambdaQueryWrapper<A005> qw = new LambdaQueryWrapper<>(); // LambdaQueryWrapper<A005> qw = new LambdaQueryWrapper<>();
qw.ge(A005::getRemark,DateUtil.formatDate(udiwmsInvProductsRequest.getStartDate(), "yyyy-MM-dd") + " 00:00:00"); // qw.ge(A005::getRemark,DateUtil.parseDate(DateUtil.formatDate(udiwmsInvProductsRequest.getStartDate(), "yyyy-MM-dd") + " 00:00:00"));
qw.le(A005::getRemark,DateUtil.formatDate(udiwmsInvProductsRequest.getEndDate(), "yyyy-MM-dd") + " 23:59:59"); // qw.le(A005::getRemark,DateUtil.parseDate(DateUtil.formatDate(udiwmsInvProductsRequest.getEndDate(), "yyyy-MM-dd")+ " 23:59:59" ));
//
return this.list(qw); // udiwmsInvProductsRequest.setStartDate();
// udiwmsInvProductsRequest.setEndDate();
return this.baseMapper.filterList(udiwmsInvProductsRequest);
} }
} }

@ -4,9 +4,13 @@ import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.glxp.mipsdl.entity.njxyy.A005; import com.glxp.mipsdl.entity.njxyy.A005;
import com.glxp.mipsdl.entity.thrsys.ThrCorpEntity; import com.glxp.mipsdl.entity.thrsys.ThrCorpEntity;
import com.glxp.mipsdl.req.base.UdiwmsInvProductsRequest;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper @Mapper
@DS("njsql") @DS("njsql")
public interface A005Mapper extends BaseMapper<A005> { public interface A005Mapper extends BaseMapper<A005> {
List<A005> filterList(UdiwmsInvProductsRequest udiwmsInvProductsRequest);
} }

@ -30,6 +30,7 @@ mybatis-plus:
use-column-label: true use-column-label: true
map-underscore-to-camel-case: false map-underscore-to-camel-case: false
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
default-statement-timeout: 1800
global-config: global-config:
banner: false banner: false

@ -33,4 +33,37 @@
YLQXZCRBARMC, ZCZBHHZBAPZBH, MANUFACTURER, MANUFACTORYCODE, AMOUNT, RECOUNT, INOUTTYPE, YLQXZCRBARMC, ZCZBHHZBAPZBH, MANUFACTURER, MANUFACTORYCODE, AMOUNT, RECOUNT, INOUTTYPE,
INVCODE, INVNAME, CORPID, CORPNAME, REMARK INVCODE, INVNAME, CORPID, CORPNAME, REMARK
</sql> </sql>
<select id="filterList" resultType="com.glxp.mipsdl.entity.njxyy.A005">
SELECT CPMCTYMC, THRCODE, AMECODE, GGXH, BATCHNO, MEASNAME, PRICE, PRODUCTIONDATE, EXPIREDATE,
YLQXZCRBARMC, ZCZBHHZBAPZBH, MANUFACTURER, MANUFACTORYCODE, AMOUNT, RECOUNT, INOUTTYPE,
INVCODE, INVNAME, CORPID, CORPNAME, REMARK
FROM a005
<where>
<if test="startDate != null and databaseProductName == 'Oracle'">
<![CDATA[
and TRUNC(REMARK) >= TO_DATE(#{startDate} , 'YYYY-MM-DD')
]]>
</if>
<if test="endDate != null and databaseProductName == 'Oracle'">
<![CDATA[
and TRUNC(REMARK) <= TO_DATE(#{endDate} , 'YYYY-MM-DD')
]]>
</if>
<if test="startDate != null and databaseProductName == 'MySql'">
<![CDATA[
and REMARK >= (#{startDate}
]]>
</if>
<if test="endDate != null and databaseProductName == 'MySql'">
<![CDATA[
and REMARK <= #{endDate}
]]>
</if>
</where>
ORDER BY REMARK desc
</select>
</mapper> </mapper>
Loading…
Cancel
Save