Browse Source

合并代码

master
clong 1 year ago
parent
commit
6dcd884b9f
13 changed files with 46 additions and 15 deletions
  1. +13
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/constant/ParameterConstant.java
  2. +2
    -3
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/dto/order/SalesOrderDetailDTO.java
  3. +2
    -1
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/entity/SalesOrderDetailEntity.java
  4. +1
    -1
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/service/Impl/SalesOrderDetailServiceImpl.java
  5. +0
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/service/Impl/StaffServiceImpl.java
  6. +1
    -1
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/Impl/BasicApiServiceImpl.java
  7. +1
    -1
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/Impl/BasicEAIServiceImpl.java
  8. +1
    -1
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/Impl/SalesOrderDetailEAIServiceImpl.java
  9. +0
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/Impl/StaffEAIServiceImpl.java
  10. +4
    -3
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/order/SalesOrderDetailCreateEAIService.java
  11. +13
    -3
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/order/SalesOrderDetailGetEAIService.java
  12. +0
    -0
      demo-athenaopt_backend/develop/src/test/java/com/digiwin/athena/app/provider/Impl/temp.txt
  13. +8
    -1
      doc/sql/app-20230427-ddl.sql

+ 13
- 0
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/constant/ParameterConstant.java View File

@ -0,0 +1,13 @@
package com.digiwin.athena.app.infra.constant;
/**
* @author CR-7
* create: 2023-04-28 13:33
* Description: 参数常量类
*/
public class ParameterConstant {
public static final String OPTION = "option";
public static final String SET_NUMBER = "1";
}

+ 2
- 3
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/dto/order/SalesOrderDetailDTO.java View File

@ -71,7 +71,6 @@ public class SalesOrderDetailDTO {
@SerializedName(value = "storage_spaces_name") @SerializedName(value = "storage_spaces_name")
private String storageSpacesName; private String storageSpacesName;
/** /**
* 1.未检料;2.已检料 * 1.未检料;2.已检料
*/ */
@ -81,6 +80,6 @@ public class SalesOrderDetailDTO {
/** /**
* 租户sid * 租户sid
*/ */
@SerializedName(value = "tenantSid")
private Integer tenantSid;
@SerializedName(value = "tenantsid")
private Integer tenantsid;
} }

+ 2
- 1
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/entity/SalesOrderDetailEntity.java View File

@ -18,9 +18,10 @@ import lombok.NoArgsConstructor;
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
@Builder @Builder
@TableName(value = "sales_order_detail", autoResultMap = true)
@TableName(value = "cim_sales_order_detail", autoResultMap = true)
public class SalesOrderDetailEntity extends BaseMgrEntity<SalesOrderDetailEntity> { public class SalesOrderDetailEntity extends BaseMgrEntity<SalesOrderDetailEntity> {
/** /**
* 订单单号 * 订单单号
*/ */


demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/service/impl/SalesOrderDetailServiceImpl.java → demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/service/Impl/SalesOrderDetailServiceImpl.java View File

@ -1,4 +1,4 @@
package com.digiwin.athena.app.infra.service.impl;
package com.digiwin.athena.app.infra.service.Impl;
import com.digiwin.athena.app.infra.entity.SalesOrderDetailEntity; import com.digiwin.athena.app.infra.entity.SalesOrderDetailEntity;
import com.digiwin.athena.app.infra.repository.SalesOrderDetailRepository; import com.digiwin.athena.app.infra.repository.SalesOrderDetailRepository;

demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/service/impl/StaffServiceImpl.java → demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/service/Impl/StaffServiceImpl.java View File


demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/BasicApiServiceImpl.java → demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/Impl/BasicApiServiceImpl.java View File

@ -6,7 +6,7 @@
* History: * History:
* 作者姓名 --修改时间 --版本号--描述 * 作者姓名 --修改时间 --版本号--描述
*/ */
package com.digiwin.athena.app.provider.impl;
package com.digiwin.athena.app.provider.Impl;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.digiwin.app.service.DWServiceContext; import com.digiwin.app.service.DWServiceContext;

demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/BasicEAIServiceImpl.java → demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/Impl/BasicEAIServiceImpl.java View File

@ -5,7 +5,7 @@
* History: * History:
* 作者姓名 --修改时间 --版本号--描述 * 作者姓名 --修改时间 --版本号--描述
*/ */
package com.digiwin.athena.app.provider.impl;
package com.digiwin.athena.app.provider.Impl;
import com.digiwin.app.service.DWEAIResult; import com.digiwin.app.service.DWEAIResult;
import com.digiwin.athena.app.provider.BasicEAIService; import com.digiwin.athena.app.provider.BasicEAIService;

demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/SalesOrderDetailEAIServiceImpl.java → demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/Impl/SalesOrderDetailEAIServiceImpl.java View File

@ -1,4 +1,4 @@
package com.digiwin.athena.app.provider.impl;
package com.digiwin.athena.app.provider.Impl;
import com.digiwin.app.service.DWEAIResult; import com.digiwin.app.service.DWEAIResult;
import com.digiwin.athena.app.provider.SalesOrderDetailEAIService; import com.digiwin.athena.app.provider.SalesOrderDetailEAIService;

demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/StaffEAIServiceImpl.java → demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/Impl/StaffEAIServiceImpl.java View File


+ 4
- 3
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/order/SalesOrderDetailCreateEAIService.java View File

@ -1,5 +1,6 @@
package com.digiwin.athena.app.service.order; package com.digiwin.athena.app.service.order;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference; import com.alibaba.fastjson.TypeReference;
import com.digiwin.app.service.DWEAIResult; import com.digiwin.app.service.DWEAIResult;
import com.digiwin.athena.app.infra.dto.order.SalesOrderDetailDTO; import com.digiwin.athena.app.infra.dto.order.SalesOrderDetailDTO;
@ -14,7 +15,6 @@ import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -47,12 +47,13 @@ public class SalesOrderDetailCreateEAIService extends AbsEAIService {
SalesOrderDetailEntity salesOrderDetailEntity = new SalesOrderDetailEntity(); SalesOrderDetailEntity salesOrderDetailEntity = new SalesOrderDetailEntity();
BeanUtils.copyProperties(assemble,salesOrderDetailEntity); BeanUtils.copyProperties(assemble,salesOrderDetailEntity);
salesOrderDetailEntity.setId(SnowflakeWorker.nextId()); salesOrderDetailEntity.setId(SnowflakeWorker.nextId());
salesOrderDetailEntity.setTenantSid(null);
salesOrderDetailEntity.setTenantSid(1L);
salesOrderDetailEntity.setStatus(1);
return salesOrderDetailEntity; return salesOrderDetailEntity;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
salesOrderDetailService.saveBatch(salesOrderDetailEntityList); salesOrderDetailService.saveBatch(salesOrderDetailEntityList);
return EAIUtil.buildEAIResult(new HashMap<>());
return EAIUtil.buildEAIResult(new JSONObject().fluentPut("sales_order_detail",salesOrderDetailEntityList));
} }
} }

+ 13
- 3
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/order/SalesOrderDetailGetEAIService.java View File

@ -4,8 +4,10 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.digiwin.app.service.DWEAIResult; import com.digiwin.app.service.DWEAIResult;
import com.digiwin.athena.app.infra.constant.ParameterConstant;
import com.digiwin.athena.app.infra.entity.SalesOrderDetailEntity; import com.digiwin.athena.app.infra.entity.SalesOrderDetailEntity;
import com.digiwin.athena.app.infra.service.SalesOrderDetailService; import com.digiwin.athena.app.infra.service.SalesOrderDetailService;
import com.digiwin.athena.opt.common.eai.EAIRequest;
import com.digiwin.athena.opt.common.eai.EAIUtil; import com.digiwin.athena.opt.common.eai.EAIUtil;
import com.digiwin.athena.opt.common.eai.service.AbsEAIService; import com.digiwin.athena.opt.common.eai.service.AbsEAIService;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
@ -27,7 +29,6 @@ public class SalesOrderDetailGetEAIService extends AbsEAIService {
@Resource @Resource
SalesOrderDetailService salesOrderDetailService; SalesOrderDetailService salesOrderDetailService;
@Override @Override
public String getServiceName() { public String getServiceName() {
return SalesOrderDetailUtil.DEMO_SO_ITEM_INFO_GET; return SalesOrderDetailUtil.DEMO_SO_ITEM_INFO_GET;
@ -35,8 +36,17 @@ public class SalesOrderDetailGetEAIService extends AbsEAIService {
@Override @Override
public DWEAIResult execute(Map<String, String> headers, String messageBody) throws Exception { public DWEAIResult execute(Map<String, String> headers, String messageBody) throws Exception {
LambdaQueryWrapper queryWrapper = Wrappers.<SalesOrderDetailEntity>lambdaQuery()
.eq(SalesOrderDetailEntity::getTenantSid,0);
EAIRequest request = EAIRequest.build(messageBody);
// 两次开窗查询
LambdaQueryWrapper queryWrapper;
if(request.getParameter().get(ParameterConstant.OPTION).equals(ParameterConstant.SET_NUMBER)){
queryWrapper = Wrappers.<SalesOrderDetailEntity>lambdaQuery()
.eq(SalesOrderDetailEntity::getTenantSid,0L);
}else{
queryWrapper = Wrappers.<SalesOrderDetailEntity>lambdaQuery()
.eq(SalesOrderDetailEntity::getTenantSid,1L);
}
List<SalesOrderDetailEntity> list = salesOrderDetailService.list(queryWrapper); List<SalesOrderDetailEntity> list = salesOrderDetailService.list(queryWrapper);


demo-athenaopt_backend/develop/src/test/java/com/digiwin/athena/app/provider/impl/temp.txt → demo-athenaopt_backend/develop/src/test/java/com/digiwin/athena/app/provider/Impl/temp.txt View File


+ 8
- 1
doc/sql/app-20230427-ddl.sql View File

@ -11,6 +11,13 @@ create table `sales_order_detail` (
`warehouse_name` varchar(255) default null comment '仓库', `warehouse_name` varchar(255) default null comment '仓库',
`storage_spaces_name` varchar(255) default null comment '储位', `storage_spaces_name` varchar(255) default null comment '储位',
`status` int(1) default null comment '1.未检料;2.已检料', `status` int(1) default null comment '1.未检料;2.已检料',
`tenantSid` int(1) default null comment '租户sid',
`tenantsid` int(1) default null comment '租户sid',
`tenant_id` varchar(20) DEFAULT NULL,
`create_by` varchar(50) DEFAULT NULL,
`create_date` datetime DEFAULT NULL,
`modified_by` varchar(50) DEFAULT NULL,
`modified_date` datetime DEFAULT NULL,
`version` int(11) DEFAULT NULL,
`deleted` tinyint(255) DEFAULT NULL,
primary key (`id`) primary key (`id`)
) engine=innodb default charset=utf8mb4 comment='订单明细'; ) engine=innodb default charset=utf8mb4 comment='订单明细';

Loading…
Cancel
Save