|
@@ -4,6 +4,7 @@ import com.github.pagehelper.PageHelper;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
import com.github.pagehelper.PageInfo;
|
|
|
import com.sckw.core.common.enums.enums.DictTypeEnum;
|
|
import com.sckw.core.common.enums.enums.DictTypeEnum;
|
|
|
import com.sckw.core.model.page.PageRes;
|
|
import com.sckw.core.model.page.PageRes;
|
|
|
|
|
+import com.sckw.core.model.vo.TableTop;
|
|
|
import com.sckw.core.utils.BeanUtils;
|
|
import com.sckw.core.utils.BeanUtils;
|
|
|
import com.sckw.core.utils.CollectionUtils;
|
|
import com.sckw.core.utils.CollectionUtils;
|
|
|
import com.sckw.core.web.context.LoginUserHolder;
|
|
import com.sckw.core.web.context.LoginUserHolder;
|
|
@@ -38,9 +39,10 @@ public class KwpSettlementTradeService {
|
|
|
@DubboReference(version = "2.0.0", group = "design", check = false)
|
|
@DubboReference(version = "2.0.0", group = "design", check = false)
|
|
|
private RemoteSystemService remoteSystemService;
|
|
private RemoteSystemService remoteSystemService;
|
|
|
|
|
|
|
|
- public SettlementTradeDto getById(Long id,Integer unitType) {
|
|
|
|
|
- return settlementTradeMapper.getById(id,unitType);
|
|
|
|
|
|
|
+ public SettlementTradeDto getById(Long id, Integer unitType) {
|
|
|
|
|
+ return settlementTradeMapper.getById(id, unitType);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
public List<LedgerUnitDto> getListById(Long id) {
|
|
public List<LedgerUnitDto> getListById(Long id) {
|
|
|
return settlementTradeMapper.getListById(id);
|
|
return settlementTradeMapper.getListById(id);
|
|
|
}
|
|
}
|
|
@@ -98,8 +100,17 @@ public class KwpSettlementTradeService {
|
|
|
return new PageRes<>(new PageInfo<>());
|
|
return new PageRes<>(new PageInfo<>());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public SettlementLogisticsStatusCountVo getCount(SettlementTradeReq settlementReq) {
|
|
|
|
|
- return settlementTradeMapper.countOrder(settlementReq);
|
|
|
|
|
|
|
+ public List<TableTop> getCount(SettlementTradeReq settlementReq) {
|
|
|
|
|
+ Map<String, Long> stringIntegerMap = settlementTradeMapper.countOrder(settlementReq);
|
|
|
|
|
+ List<TableTop> res = new ArrayList<>(4);
|
|
|
|
|
+ for (SettlementEnum value : SettlementEnum.values()) {
|
|
|
|
|
+ TableTop tableTop = new TableTop();
|
|
|
|
|
+ tableTop.setName(value.getDesc());
|
|
|
|
|
+ tableTop.setValue(value.getStatus());
|
|
|
|
|
+ tableTop.setTotal(Math.toIntExact(stringIntegerMap.get(value.getLabel())));
|
|
|
|
|
+ res.add(tableTop);
|
|
|
|
|
+ }
|
|
|
|
|
+ return res;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -114,7 +125,7 @@ public class KwpSettlementTradeService {
|
|
|
|
|
|
|
|
|
|
|
|
|
public List<ISettlement> selectList(List<Long> ids, int unitType) {
|
|
public List<ISettlement> selectList(List<Long> ids, int unitType) {
|
|
|
- List<SettlementTradeDto> kwpSettlementTrades = settlementTradeMapper.selectByIds(ids,unitType);
|
|
|
|
|
|
|
+ List<SettlementTradeDto> kwpSettlementTrades = settlementTradeMapper.selectByIds(ids, unitType);
|
|
|
if (!CollectionUtils.isEmpty(kwpSettlementTrades)) {
|
|
if (!CollectionUtils.isEmpty(kwpSettlementTrades)) {
|
|
|
//根据企业类型进行对应的数据
|
|
//根据企业类型进行对应的数据
|
|
|
if (unitType == TradeUnitType.PURCHASE) {
|
|
if (unitType == TradeUnitType.PURCHASE) {
|