|
|
@@ -21,7 +21,6 @@ import com.sckw.core.model.enums.CooperateTypeEnum;
|
|
|
import com.sckw.core.model.enums.OrderRuleEnum;
|
|
|
import com.sckw.core.model.enums.RedisOrderGenerateEnum;
|
|
|
import com.sckw.core.model.page.PageRes;
|
|
|
-import com.sckw.core.model.page.PageResult;
|
|
|
import com.sckw.core.model.vo.TableBottom;
|
|
|
import com.sckw.core.model.vo.TableStatisticRes;
|
|
|
import com.sckw.core.model.vo.TableTop;
|
|
|
@@ -1591,11 +1590,23 @@ public class KwoTradeOrderService {
|
|
|
TradeOrderListSelectDTO dto = buildSelectParam(params);
|
|
|
PageHelper.startPage(params.getPage(), params.getPageSize());
|
|
|
List<OrderListResDTO> list = kwoTradeOrderMapper.tradeOrderSelect(dto, dto.getGoodIds(), LoginUserHolder.getAuthUserIdList());
|
|
|
+ return buildResult(list);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param list
|
|
|
+ * @return com.sckw.core.model.page.PageRes
|
|
|
+ * @desc 构建列表结果响应
|
|
|
+ * @author yzc
|
|
|
+ * @date 2024/3/15 14:23
|
|
|
+ */
|
|
|
+ private PageRes buildResult(List<OrderListResDTO> list) {
|
|
|
List<OrderListResVO> result = new ArrayList<>();
|
|
|
if (CollUtil.isEmpty(list)) {
|
|
|
- PageInfo<OrderListResVO> pageInfo = new PageInfo<>(result);
|
|
|
- return PageRes.build(pageInfo, result);
|
|
|
+ return new PageRes<>(new PageInfo<>());
|
|
|
}
|
|
|
+ PageInfo<OrderListResDTO> pageInfo = new PageInfo<>(list);
|
|
|
List<Long> goodIdList = new ArrayList<>();
|
|
|
List<Long> contracIdList = new ArrayList<>();
|
|
|
List<Long> createByIds = new ArrayList<>();
|
|
|
@@ -1686,7 +1697,6 @@ public class KwoTradeOrderService {
|
|
|
.setCreateByName(Objects.isNull(userCache) ? null : userCache.getName());
|
|
|
result.add(vo);
|
|
|
});
|
|
|
- PageInfo<OrderListResVO> pageInfo = new PageInfo<>(result);
|
|
|
return PageRes.build(pageInfo, result);
|
|
|
}
|
|
|
|
|
|
@@ -1725,7 +1735,7 @@ public class KwoTradeOrderService {
|
|
|
}
|
|
|
String keywords = params.getKeywords();
|
|
|
if (StringUtils.isNotBlank(keywords)) {
|
|
|
- List<Long> goodIds = goodsInfoService.selectIdsLikeGoodsName(keywords);
|
|
|
+ List<Long> goodIds = goodsInfoService.getGoodsByGoodsNameAndTaxRate(keywords, null);
|
|
|
dto.setGoodIds(goodIds);
|
|
|
}
|
|
|
return dto;
|
|
|
@@ -1947,12 +1957,19 @@ public class KwoTradeOrderService {
|
|
|
* @author: yzc
|
|
|
* @date: 2023-07-20 15:03
|
|
|
* @Param params:
|
|
|
- * @return: com.sckw.core.model.page.PageResult
|
|
|
+ * @return: com.sckw.core.model.page.PageRes
|
|
|
*/
|
|
|
- public PageResult tradeOrderStatementList(TradeOrderStatementList params) {
|
|
|
-
|
|
|
-
|
|
|
- return null;
|
|
|
+ public PageRes tradeOrderStatementList(TradeOrderStatementList params) {
|
|
|
+ TradeOrderStatementListParamDTO dto = BeanUtil.copyProperties(params, TradeOrderStatementListParamDTO.class);
|
|
|
+ List<Long> excludeIds = new ArrayList<>();
|
|
|
+ if (StringUtils.isNotBlank(params.getExcludeIds())) {
|
|
|
+ excludeIds = StringUtils.splitStrToList(params.getExcludeIds(), ",", Long.class);
|
|
|
+ }
|
|
|
+ dto.setEntId(LoginUserHolder.getEntId());
|
|
|
+ List<Long> goodsIds = goodsInfoService.getGoodsByGoodsNameAndTaxRate(params.getGoodsName(), params.getGoodsTaxRate());
|
|
|
+ PageHelper.startPage(params.getPage(), params.getPageSize());
|
|
|
+ List<OrderListResDTO> list = kwoTradeOrderMapper.tradeOrderStatementList(dto, goodsIds, excludeIds);
|
|
|
+ return buildResult(list);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -1960,11 +1977,14 @@ public class KwoTradeOrderService {
|
|
|
* @author: yzc
|
|
|
* @date: 2023-07-27 17:05
|
|
|
* @Param params:
|
|
|
- * @return: com.sckw.core.model.page.PageResult
|
|
|
+ * @return: com.sckw.core.model.page.PageRes
|
|
|
*/
|
|
|
- public String tradeOrderContractList(TradeOrderContractParam params) {
|
|
|
-
|
|
|
-
|
|
|
- return null;
|
|
|
+ public PageRes tradeOrderContractList(TradeOrderContractParam params) {
|
|
|
+ TradeOrderContractParamDTO dto = BeanUtil.copyProperties(params, TradeOrderContractParamDTO.class);
|
|
|
+ dto.setEntId(LoginUserHolder.getEntId());
|
|
|
+ List<Long> contractIds = StringUtils.splitStrToList(params.getContractIds(), ",", Long.class);
|
|
|
+ PageHelper.startPage(params.getPage(), params.getPageSize());
|
|
|
+ List<OrderListResDTO> list = kwoTradeOrderMapper.tradeOrderContractList(dto, contractIds);
|
|
|
+ return buildResult(list);
|
|
|
}
|
|
|
}
|