|
@@ -9,6 +9,7 @@ import com.winsea.svc.base.base.service.ICommonCompanyService;
|
|
import com.winsea.svc.base.base.service.ICommonStaffService;
|
|
import com.winsea.svc.base.base.service.ICommonStaffService;
|
|
import com.winsea.svc.base.security.util.AuthSecurityUtils;
|
|
import com.winsea.svc.base.security.util.AuthSecurityUtils;
|
|
import com.yh.saas.common.support.util.IdGenerator;
|
|
import com.yh.saas.common.support.util.IdGenerator;
|
|
|
|
+import com.yh.saas.common.support.util.StringUtils;
|
|
import com.yh.saas.plugin.yiliangyiyun.constant.StatusEnum;
|
|
import com.yh.saas.plugin.yiliangyiyun.constant.StatusEnum;
|
|
import com.yh.saas.plugin.yiliangyiyun.entity.*;
|
|
import com.yh.saas.plugin.yiliangyiyun.entity.*;
|
|
import com.yh.saas.plugin.yiliangyiyun.mapper.WeighingManagementMapper;
|
|
import com.yh.saas.plugin.yiliangyiyun.mapper.WeighingManagementMapper;
|
|
@@ -60,48 +61,50 @@ public class WeighingManagementServiceImpl extends ServiceImpl<WeighingManagemen
|
|
pageView.put("startRecord", (weighingManagement.getCurrentPage() - 1)
|
|
pageView.put("startRecord", (weighingManagement.getCurrentPage() - 1)
|
|
* weighingManagement.getPageSize());
|
|
* weighingManagement.getPageSize());
|
|
//公司id
|
|
//公司id
|
|
- if(weighingManagement.getCompId() == null || weighingManagement.getCompId().isEmpty()){
|
|
|
|
|
|
+ if (weighingManagement.getCompId() == null || weighingManagement.getCompId().isEmpty()) {
|
|
weighingManagement.setCompId(AuthSecurityUtils.getStaffById(AuthSecurityUtils.getCurrentUserId()).getCompId());
|
|
weighingManagement.setCompId(AuthSecurityUtils.getStaffById(AuthSecurityUtils.getCurrentUserId()).getCompId());
|
|
}
|
|
}
|
|
- pageView.put("compId",weighingManagement.getCompId());
|
|
|
|
- pageView.put("searchKeyWord",weighingManagement.getSearchKeyWord());
|
|
|
|
- pageView.put("pageSize",weighingManagement.getPageSize());
|
|
|
|
- pageView.put("currentPage",weighingManagement.getCurrentPage());
|
|
|
|
- pageView.put("managementType",weighingManagement.getManagementType());
|
|
|
|
- pageView.put("warehouseName",weighingManagement.getWarehouseName());
|
|
|
|
|
|
+ pageView.put("compId", weighingManagement.getCompId());
|
|
|
|
+ pageView.put("searchKeyWord", weighingManagement.getSearchKeyWord());
|
|
|
|
+ pageView.put("pageSize", weighingManagement.getPageSize());
|
|
|
|
+ pageView.put("currentPage", weighingManagement.getCurrentPage());
|
|
|
|
+ pageView.put("managementType", weighingManagement.getManagementType());
|
|
|
|
+ pageView.put("warehouseName", weighingManagement.getWarehouseName());
|
|
// 查询销售订单总数
|
|
// 查询销售订单总数
|
|
Integer dataCount = baseMapper.getCountByCondition(pageView);
|
|
Integer dataCount = baseMapper.getCountByCondition(pageView);
|
|
List<WeighingManagement> dataList = baseMapper.getListByCondition(pageView);
|
|
List<WeighingManagement> dataList = baseMapper.getListByCondition(pageView);
|
|
- if (CollectionUtils.isNotEmpty(dataList)){
|
|
|
|
- for (WeighingManagement weighingManagement1:dataList){
|
|
|
|
- CommonCompany commonCompany=commonCompanyService.selectOne(new EntityWrapper<CommonCompany>()
|
|
|
|
- .eq("comp_id",weighingManagement1.getCompId()));
|
|
|
|
|
|
+ if(StringUtils.isEmpty(weighingManagement.getViewFlag())){
|
|
|
|
+ if (CollectionUtils.isNotEmpty(dataList)) {
|
|
|
|
+ for (WeighingManagement weighingManagement1 : dataList) {
|
|
|
|
+ CommonCompany commonCompany = commonCompanyService.selectOne(new EntityWrapper<CommonCompany>()
|
|
|
|
+ .eq("comp_id", weighingManagement1.getCompId()));
|
|
//公司名
|
|
//公司名
|
|
- if (commonCompany!=null){
|
|
|
|
|
|
+ if (commonCompany != null) {
|
|
weighingManagement1.setCompName(commonCompany.getCompName());
|
|
weighingManagement1.setCompName(commonCompany.getCompName());
|
|
}
|
|
}
|
|
- PaymentManagement paymentManagement=paymentManagementService.selectOne(new EntityWrapper<PaymentManagement>()
|
|
|
|
- .eq("relation_id",weighingManagement1.getRelationId())
|
|
|
|
|
|
+ PaymentManagement paymentManagement = paymentManagementService.selectOne(new EntityWrapper<PaymentManagement>()
|
|
|
|
+ .eq("relation_id", weighingManagement1.getRelationId())
|
|
.eq("comp_id", weighingManagement1.getCompId()));
|
|
.eq("comp_id", weighingManagement1.getCompId()));
|
|
- if(paymentManagement!=null){
|
|
|
|
|
|
+ if (paymentManagement != null) {
|
|
weighingManagement1.setPaymentManagement(paymentManagement);
|
|
weighingManagement1.setPaymentManagement(paymentManagement);
|
|
}
|
|
}
|
|
- QualityInspectionManagement qualityInspectionManagement=qualityInspectionManagementService.selectOne(new EntityWrapper<QualityInspectionManagement>()
|
|
|
|
- .eq("relation_id",weighingManagement1.getRelationId())
|
|
|
|
|
|
+ QualityInspectionManagement qualityInspectionManagement = qualityInspectionManagementService.selectOne(new EntityWrapper<QualityInspectionManagement>()
|
|
|
|
+ .eq("relation_id", weighingManagement1.getRelationId())
|
|
.eq("comp_id", weighingManagement1.getCompId()));
|
|
.eq("comp_id", weighingManagement1.getCompId()));
|
|
- if(qualityInspectionManagement!=null){
|
|
|
|
|
|
+ if (qualityInspectionManagement != null) {
|
|
weighingManagement1.setQualityInspectionManagement(qualityInspectionManagement);
|
|
weighingManagement1.setQualityInspectionManagement(qualityInspectionManagement);
|
|
}
|
|
}
|
|
- WarehouseBaseInfo warehouseBaseInfo=warehouseBaseInfoService.selectOne(new EntityWrapper<WarehouseBaseInfo>()
|
|
|
|
- .eq("comp_id",weighingManagement1.getCompId())
|
|
|
|
- .eq("warehouse_name",weighingManagement1.getWarehouseName()));
|
|
|
|
- if (warehouseBaseInfo!=null){
|
|
|
|
|
|
+ WarehouseBaseInfo warehouseBaseInfo = warehouseBaseInfoService.selectOne(new EntityWrapper<WarehouseBaseInfo>()
|
|
|
|
+ .eq("comp_id", weighingManagement1.getCompId())
|
|
|
|
+ .eq("warehouse_name", weighingManagement1.getWarehouseName()));
|
|
|
|
+ if (warehouseBaseInfo != null) {
|
|
//仓库负责人,电话
|
|
//仓库负责人,电话
|
|
weighingManagement1.setPerson(warehouseBaseInfo.getPersonCharge());
|
|
weighingManagement1.setPerson(warehouseBaseInfo.getPersonCharge());
|
|
weighingManagement1.setPersonPhone(warehouseBaseInfo.getPersonPhone());
|
|
weighingManagement1.setPersonPhone(warehouseBaseInfo.getPersonPhone());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ }
|
|
Page<WeighingManagement> page = new Page<>();
|
|
Page<WeighingManagement> page = new Page<>();
|
|
page.setRecords(dataList == null ? Lists.newArrayList() : dataList);
|
|
page.setRecords(dataList == null ? Lists.newArrayList() : dataList);
|
|
page.setTotal(dataCount == null ? 0 : dataCount);
|
|
page.setTotal(dataCount == null ? 0 : dataCount);
|