看板前端和接口修改
master
xs 4 months ago
parent ed42221638
commit e763d2271a

@ -15,21 +15,21 @@ public class FifthMesBorderController {
private FifthMesBorderService fifthMesBorderService;
/**
*
* ()
*/
@GetMapping("/productProgress")
public AjaxResult productProgress(){
return AjaxResult.success(fifthMesBorderService.productProgress());
}
/**
*
*
*/
@GetMapping("/workOrderProgress")
public AjaxResult workOrderProgress(){
return AjaxResult.success(fifthMesBorderService.workOrderProgress());
}
/**
*
*
*/
@GetMapping("/productionQualified")
public AjaxResult productionQualified(){
@ -44,7 +44,7 @@ public class FifthMesBorderController {
return AjaxResult.success(fifthMesBorderService.orderTime());
}
/**
*
* ()
*/
@GetMapping("/orderEfficiency")
public AjaxResult orderEfficiency(){

@ -14,6 +14,7 @@ import org.springframework.stereotype.Service;
import java.util.*;
import java.util.stream.Collectors;
import java.text.DecimalFormat;
@Service
public class FourthMesBoardServiceImpl implements IFourthMesBoardService {
@Autowired
@ -68,7 +69,7 @@ public class FourthMesBoardServiceImpl implements IFourthMesBoardService {
latestProductOrder.setMesProductPlanList(mesProductPlanList);
List<MesBaseProcessInfo> mesBaseProcessInfoList = this.computeProcessPercentage(mesProductPlanList);
List<MesBaseProcessInfo> mesBaseProcessInfoList = this.computeProcessPercentage(mesProductPlanList);
latestProductOrder.setBaseProcessInfoList(mesBaseProcessInfoList);
}
@ -79,17 +80,17 @@ public class FourthMesBoardServiceImpl implements IFourthMesBoardService {
/**
*
*/
private List<MesBaseProcessInfo> computeProcessPercentage(List<MesProductPlan> mesProductPlanList){
private List<MesBaseProcessInfo> computeProcessPercentage(List<MesProductPlan> mesProductPlanList) {
//所有工序加起来的占比
int totalPercentage = mesProductPlanList.stream()
.mapToInt(MesProductPlan::getProcessPercentageInt)
.reduce(0, Integer::sum);
Map<Long,String> processInfo = new HashMap<>();
processInfo.put(41L,"激光切割");
processInfo.put(42L,"折弯");
processInfo.put(43L,"焊接");
processInfo.put(44L,"装配");
Map<Long, String> processInfo = new HashMap<>();
processInfo.put(41L, "激光切割");
processInfo.put(42L, "折弯");
processInfo.put(43L, "焊接");
processInfo.put(44L, "装配");
Map<Long, List<MesProductPlan>> processIdMap = mesProductPlanList.stream().collect(Collectors.groupingBy(MesProductPlan::getProcessId));
@ -100,10 +101,14 @@ public class FourthMesBoardServiceImpl implements IFourthMesBoardService {
int processTotalPercentage = mesProductPlans.stream()
.mapToInt(MesProductPlan::getProcessPercentageInt)
.reduce(0, Integer::sum);
int computePercentage = processTotalPercentage/totalPercentage*75;
int computePercentage = 0 ;
if (totalPercentage>0){
computePercentage = processTotalPercentage / totalPercentage * 75;
}
MesBaseProcessInfo baseProcessInfo = new MesBaseProcessInfo();//喷塑
baseProcessInfo.setProcessPercentage(computePercentage+"%");
baseProcessInfo.setProcessPercentage(computePercentage + "%");
baseProcessInfo.setProcessName(processInfo.get(processId));
mesBaseProcessInfoList.add(baseProcessInfo);
}
@ -124,12 +129,13 @@ public class FourthMesBoardServiceImpl implements IFourthMesBoardService {
/**
* 4
*
* @return
*/
@Override
public JSONObject getQualityAndAvailablePercentage(){
public JSONObject getQualityAndAvailablePercentage() {
JSONObject resultJson = new JSONObject();
// 定义良率范围
// 定义良率范围
double passRateMin = 95.0; // 最小值
double passRateMax = 100.0; // 最大值
@ -137,7 +143,7 @@ public class FourthMesBoardServiceImpl implements IFourthMesBoardService {
double passRate = generateRandomWithOneDecimal(passRateMin, passRateMax);
//不良率
double failureRate = 100-passRate;
double failureRate = 100 - passRate;
DecimalFormat df = new DecimalFormat("#.0");
@ -147,9 +153,9 @@ public class FourthMesBoardServiceImpl implements IFourthMesBoardService {
double availableRate = generateRandomWithOneDecimal(availableRateMin, availableRateMax);
resultJson.put("passRate",passRate+"%");
resultJson.put("failureRate",Double.parseDouble(df.format(failureRate))+"%");
resultJson.put("availableRate",availableRate+"%");
resultJson.put("passRate", passRate + "%");
resultJson.put("failureRate", Double.parseDouble(df.format(failureRate)) + "%");
resultJson.put("availableRate", availableRate + "%");
return resultJson;

@ -25,6 +25,8 @@ public class MesProduceStatisticsDetail extends BaseEntity
@Excel(name = "生产工单ID")
private Long productOrderId;
private String productOrderStatus;
private String dispatchType;
private Long dispatchId;
@ -132,6 +134,14 @@ public class MesProduceStatisticsDetail extends BaseEntity
return productOrderId;
}
public String getProductOrderStatus() {
return productOrderStatus;
}
public void setProductOrderStatus(String productOrderStatus) {
this.productOrderStatus = productOrderStatus;
}
public String getDispatchType() {
return dispatchType;
}

@ -210,6 +210,8 @@ public class MesProductPlan extends BaseEntity
private String processPercentage;
private String orderStatus;//生产工单状态
public Long getSaleOrderId() {
return saleOrderId;
}
@ -647,6 +649,14 @@ public class MesProductPlan extends BaseEntity
this.processPercentage = processPercentage;
}
public String getOrderStatus() {
return orderStatus;
}
public void setOrderStatus(String orderStatus) {
this.orderStatus = orderStatus;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

@ -831,8 +831,10 @@ public class MesProductPlanDetailServiceImpl implements IMesProductPlanDetailSer
queryProductPlandetail.setPlanDetailStatus(MesConstants.MES_PRODUCT_PLAN_DETAIL_STATUS_FINISH);
queryProductPlandetail.setStatisticsFlag("1");
List<MesProductPlanDetail> mesProductPlanDetailList = mesProductPlanDetailMapper.selectMesProductPlanDetailList4Statistics(queryProductPlandetail);
List<MesProductPlanDetail> filterProductPlanDetailList = mesProductPlanDetailList.stream()
.filter(mppd-> mppd.getRealBeginTime()!=null && mppd.getRealEndTime()!=null).collect(Collectors.toList());
for (MesProductPlanDetail mesProductPlanDetail : mesProductPlanDetailList) {
for (MesProductPlanDetail mesProductPlanDetail : filterProductPlanDetailList) {
MesProductPlan mesProductPlan = mesProductPlanMapper.selectOnlyMesProductPlanByPlanId(mesProductPlanDetail.getPlanId());
//计算工时
@ -877,6 +879,7 @@ public class MesProductPlanDetailServiceImpl implements IMesProductPlanDetailSer
MesProduceStatisticsDetail mesProduceStatisticsDetail = new MesProduceStatisticsDetail();
mesProduceStatisticsDetail.setProductOrderId(mesProductPlan.getProductOrderId());
mesProduceStatisticsDetail.setProductOrderStatus(mesProductPlan.getOrderStatus());
mesProduceStatisticsDetail.setDispatchType(mesProductPlan.getDispatchType());
mesProduceStatisticsDetail.setDispatchId(mesProductPlan.getDispatchId());
mesProduceStatisticsDetail.setSaleOrderId(mesProductPlan.getSaleOrderId());

@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="MesProduceStatisticsDetail" id="MesProduceStatisticsDetailResult">
<result property="statisticsDetailId" column="statistics_detail_id" />
<result property="productOrderId" column="product_order_id" />
<result property="productOrderStatus" column="product_order_status" />
<result property="dispatchType" column="dispatch_type" />
<result property="dispatchId" column="dispatch_id" />
<result property="saleOrderId" column="sale_order_id" />
@ -87,6 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
insert into mes_produce_statistics_detail
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="productOrderId != null">product_order_id,</if>
<if test="productOrderStatus != null">product_order_status,</if>
<if test="dispatchType != null">dispatch_type,</if>
<if test="dispatchId != null">dispatch_id,</if>
<if test="saleOrderId != null">sale_order_id,</if>
@ -112,6 +114,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="productOrderId != null">#{productOrderId},</if>
<if test="productOrderStatus != null">#{productOrderStatus},</if>
<if test="dispatchType != null">#{dispatchType},</if>
<if test="dispatchId != null">#{dispatchId},</if>
<if test="saleOrderId != null">#{saleOrderId},</if>

@ -460,16 +460,16 @@
<select id="productProgress" resultType="com.hw.mes.domain.MesProductOrder">
SELECT x.* FROM `hwjy-cloud`.mes_product_order x where x.dispatch_id =4 order by x.real_begin_time desc limit 1
</select>
<select id="selectFifthWorkorder" resultType="com.hw.mes.domain.MesProductOrder">
<select id="selectFifthWorkorder" resultMap="MesProductOrderResult">
select
x.*
x.order_code,x.plan_amount,x.complete_amount,mbmi.material_name
from
`hwjy-cloud`.mes_product_order x
mes_product_order x left join mes_base_material_info mbmi on x.material_id=mbmi.material_id
where
x.dispatch_id = 4
and x.real_begin_time > now() - interval 1 month
and x.plan_begin_time > now() - interval 1 month
order by
x.real_begin_time asc
x.plan_begin_time desc
</select>
<select id="getLatestWorkOrder" resultType="com.hw.mes.domain.MesProductOrder">
SELECT x.* FROM `hwjy-cloud`.mes_product_order x where x.plan_begin_time > now() - interval 1 month order by plan_begin_time asc LIMIT 1
@ -535,7 +535,7 @@
from
mes_produce_statistics_detail a left join mes_base_process_info b on a.process_id = b.process_id
where
a.product_order_id in (
a.product_order_id = (
select
product_order_id
from
@ -545,7 +545,7 @@
(
select
max(real_begin_time) real_begin_time
from mes_produce_statistics_detail) group by product_order_id) group by a.real_begin_time ,a.real_end_time,a.process_id ,a.product_order_id
from mes_produce_statistics_detail where product_order_status='2')) group by a.real_begin_time ,a.real_end_time,a.process_id ,a.product_order_id
</select>
<select id="orderEfficiency" resultType="com.hw.mes.domain.MesProduceStatisticsDetail">
select

@ -58,6 +58,7 @@
<result property="productId" column="product_id"/>
<result property="dispatchType" column="dispatch_type"/>
<result property="dispatchId" column="dispatch_id"/>
<result property="orderStatus" column="order_status"/>
</resultMap>
<resultMap id="MesProductPlanMesProductPlanDetailResult" type="MesProductPlan" extends="MesProductPlanResult">
@ -584,7 +585,8 @@
b.sale_order_id,
b.saleorder_code,
b.dispatch_type,
b.dispatch_id
b.dispatch_id,
b.order_status
from mes_product_plan a left join mes_product_order b on a.product_order_id = b.product_order_id
where a.plan_id = #{planId}
</select>

@ -272,7 +272,7 @@
<if test="selectFlag != null and selectFlag != ''">and not exists (select 1 from mes_sale_order_relate msor where mso.sale_order_id = msor.relate_sale_order_id)</if>
<if test="parentIds != null and parentIds != ''">and exists (select 1 from mes_material_bom mmb where mmb.erp_material_id=mso.material_id and mmb.material_bom_id in (${parentIds}))</if>
</where>
order by mso.saleorder_code,mso.erp_modify_date desc
order by mso.erp_modify_date desc
</select>

@ -16,19 +16,22 @@ public class FifthWmsBorderController {
private FifthWmsBorderService fifthWmsBorderService;
/**
*
* ()
*/
@GetMapping("/locationCount")
public AjaxResult locationCount(){
return AjaxResult.success(fifthWmsBorderService.locationCount());
}
/**
*
*
*/
@GetMapping("fifthPanake")
public AjaxResult fifthPanake(){
return AjaxResult.success(fifthWmsBorderService.fifthPanake());
}
/**
*
*/

@ -15,29 +15,26 @@ public class SecondWmsBorderController {
private SecondWmsBorderService secondWmsBorderService;
/**
*
*
* @return
*/
@GetMapping("/totalStock")
public AjaxResult totalStock(){
return AjaxResult.success(secondWmsBorderService.totalStock());
}
/**
*
*/
@GetMapping("/locationCount")
public AjaxResult locationCount(){
return AjaxResult.success(secondWmsBorderService.locationCount());
@GetMapping("/todayInstockAmount")
public AjaxResult todayInstockAmount(){
return AjaxResult.success(secondWmsBorderService.todayInstockAmount());
}
/**
*
*
* @return
*/
@GetMapping("/tableInfo")
public AjaxResult tableInfo(){
return AjaxResult.success(secondWmsBorderService.tableInfo());
@GetMapping("/totalStock")
public AjaxResult totalStock(){
return AjaxResult.success(secondWmsBorderService.totalStock());
}
/**
* 线
* 线
*/
@GetMapping("/inAndOutStockInfo")
public AjaxResult inAndOutStockInfo(){
@ -45,7 +42,7 @@ public class SecondWmsBorderController {
}
/**
*
* ()
* @return
*/
@GetMapping("/instockTimeCount")
@ -53,12 +50,26 @@ public class SecondWmsBorderController {
return AjaxResult.success(secondWmsBorderService.instockTimeCount());
}
/**
*
* @return
*
*/
@GetMapping("/todayInstockAmount")
public AjaxResult todayInstockAmount(){
return AjaxResult.success(secondWmsBorderService.todayInstockAmount());
@GetMapping("/locationCount")
public AjaxResult locationCount(){
return AjaxResult.success(secondWmsBorderService.locationCount());
}
/**
*
*/
@GetMapping("/tableInfo")
public AjaxResult tableInfo(){
return AjaxResult.success(secondWmsBorderService.tableInfo());
}
}

@ -39,21 +39,29 @@ public class FifthWmsBoardServiceImpl implements FifthWmsBorderService {
@Override
public Map locationCount() {
HashMap map = new HashMap<>();
List<WmsProductInstock> list = wmsRawInstockMapper.locationCount();
List<WmsRawOutstock> list1 = wmsRawOutstockMapper.locationCount();
List<WmsProductInstock> list = wmsRawInstockMapper.locationCount();//原料柜体和辅料近一个月入库数量
List<WmsRawOutstock> list1 = wmsRawOutstockMapper.locationCount();//辅料近一个月出库数量
List<WmsProductInstock> list2 = wmsProductInstockMapper.locationCount();
List<WmsProductOutstock> list3 = wmsProductOutstockMapper.locationCount();
for (WmsProductInstock wmsProductInstock : list) {
if (wmsProductInstock.getWarehouseId()==511){
map.put("rawInStock",wmsProductInstock.getInstockAmount());
}
if (wmsProductInstock.getWarehouseId()==512){
map.put("furawInStock",wmsProductInstock.getInstockAmount());
if(list!=null && !list.isEmpty()) {
for (WmsProductInstock wmsProductInstock : list) {
if (wmsProductInstock.getWarehouseId() == 511) {
map.put("rawInStock", wmsProductInstock.getInstockAmount().intValue());//原料柜体入库数量
}
if (wmsProductInstock.getWarehouseId() == 512) {
map.put("furawInStock", wmsProductInstock.getInstockAmount().intValue());//辅料入库数量
}
}
}
map.put("rawOutStock",list1.get(0).getRealOutstockAmount());
map.put("productInStock",list2.get(0).getInstockAmount());
map.put("productOutStock",list3.get(0).getOutstockQty());
if(list1!=null && !list1.isEmpty()) {
map.put("rawOutStock", list1.get(0).getRealOutstockAmount().intValue());
}
if(list2!=null && !list2.isEmpty()) {
map.put("productInStock", list2.get(0).getInstockAmount().intValue());
}
if(list3!=null && !list3.isEmpty()) {
map.put("productOutStock", list3.get(0).getOutstockQty().intValue());
}
return map;
}
@ -67,9 +75,9 @@ public class FifthWmsBoardServiceImpl implements FifthWmsBorderService {
@Override
public Map fifthPanake() {
List<WmsRawStock> wmsRawStocks = wmsRawStockMapper.selectRawLocationPercentage();
List<WmsRawStock> wmsRawStocks = wmsRawStockMapper.selectRawLocationPercentage();//原材料库存占比(原料柜体)
List<WmsProductStock> productStocks = wmsProductStockMapper.selectProductStockPercentage();
Integer emptyLocationCount = wmsBaseLocationMapper.selectEmptyLocation();
Integer emptyLocationCount = wmsBaseLocationMapper.selectEmptyLocation();//
Integer allLocation = wmsBaseLocationMapper.selectAllLocation();
BigDecimal emptyLocationPercentage = new BigDecimal(emptyLocationCount).divide(new BigDecimal(allLocation), 2, BigDecimal.ROUND_HALF_UP);
Integer oppylLocation = allLocation - emptyLocationCount;
@ -77,7 +85,7 @@ public class FifthWmsBoardServiceImpl implements FifthWmsBorderService {
HashMap<String, Object> map = new HashMap<>();
map.put("wmsRawStocks",wmsRawStocks);
map.put("productStocks",productStocks);
map.put("emptyLocationPercentage",emptyLocationPercentage);
map.put("emptyLocationPercentage",emptyLocationPercentage);//辅料空料箱占比
map.put("opplyLocationPercentage",opplyLocationPercentage);
return map;
}

@ -63,7 +63,7 @@ public class FourthWmsBoardService implements IFourthWmsBoardService {
@Override
public List<WmsStockTotal> getFourthFloorTotalProductStocks() {
WmsStockTotal queryStockTotal = new WmsStockTotal();
//todo: 需要设置仓库ID为431
queryStockTotal.setWarehouseId(431L);
List<WmsStockTotal> wmsStockTotalList = wmsStockTotalMapper.selectStockTotalListGroupByMaterial(queryStockTotal);
return wmsStockTotalList;
}

@ -12,11 +12,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@Service
public class SecondWmsBoardServiceImpl implements SecondWmsBorderService {
@ -62,16 +60,32 @@ public class SecondWmsBoardServiceImpl implements SecondWmsBorderService {
public List<WmsProductInstock> inAndOutStockInfo() {
List<WmsProductInstock> instocks = wmsProductStockMapper.selectInStock();
List<WmsProductOutstock> outstocks = wmsProductStockMapper.selectOutStock();
Map<Date,List<WmsProductOutstock>> map = outstocks.stream().collect(Collectors.groupingBy(WmsProductOutstock::getDay));
for (WmsProductInstock instock : instocks) {
if (map != null&&map.keySet().size()>0) {
WmsProductOutstock wmsProductOutstock = map.get(instock.getDay()).get(0);
instock.setOutStockAmount(wmsProductOutstock.getOutstockQty());
}else {
instock.setOutStockAmount(new BigDecimal(0));
Map<Date,List<WmsProductInstock>> instocksMap = instocks.stream().collect(Collectors.groupingBy(WmsProductInstock::getDay));
Map<Date,List<WmsProductOutstock>> outstocksMap = outstocks.stream().collect(Collectors.groupingBy(WmsProductOutstock::getDay));
Set<Date> dateSet = Stream.concat(instocksMap.keySet().stream(), outstocksMap.keySet().stream())
.collect(Collectors.toCollection(TreeSet::new));
List<WmsProductInstock> returnInstocks = new ArrayList<>();
for (Date date : dateSet) {
WmsProductInstock returnInstock = new WmsProductInstock();
returnInstock.setDay(date);
if(instocksMap!=null){
List<WmsProductInstock> wmsProductInstocks = instocksMap.get(date);
if(wmsProductInstocks!=null && !wmsProductInstocks.isEmpty()){
returnInstock.setInstockAmount(wmsProductInstocks.get(0).getInstockAmount());
}
}
if(outstocksMap!=null){
List<WmsProductOutstock> wmsProductOutstocks = outstocksMap.get(date);
if(wmsProductOutstocks!=null && !wmsProductOutstocks.isEmpty()){
returnInstock.setOutStockAmount(wmsProductOutstocks.get(0).getOutstockQty());
}
}
returnInstocks.add(returnInstock);
}
return instocks;
return returnInstocks;
}
@Override
@ -81,13 +95,13 @@ public class SecondWmsBoardServiceImpl implements SecondWmsBorderService {
@Override
public Map<String, BigDecimal> locationCount() {
int availibleLocation = wmsProductStockMapper.selectAvailibleLocation();
int toatlLocation = wmsProductStockMapper.selectTotalLocation();
int availibleLocation = wmsProductStockMapper.selectAvailibleLocation();//可用库位数量
int toatlLocation = wmsProductStockMapper.selectTotalLocation();//获取总库位数量
int opplyLocation = wmsProductStockMapper.selectOpplyLocation();
HashMap<String, BigDecimal> result = new HashMap<>();
BigDecimal bigDecimal = new BigDecimal(toatlLocation);
BigDecimal availibleRate = new BigDecimal(availibleLocation).divide(bigDecimal, 2, BigDecimal.ROUND_HALF_UP);
BigDecimal opplyRate = new BigDecimal(opplyLocation).divide(bigDecimal, 2, BigDecimal.ROUND_HALF_UP);
BigDecimal availibleRate = new BigDecimal(availibleLocation).divide(bigDecimal, 2, BigDecimal.ROUND_HALF_UP);//可用库位占比
BigDecimal opplyRate = new BigDecimal(opplyLocation).divide(bigDecimal, 2, BigDecimal.ROUND_HALF_UP);//库存占用总库位的占用率
result.put("availibleRate",availibleRate);
result.put("opplyRate",opplyRate);
return result;

@ -307,9 +307,9 @@
select
count(1)
from
`hwjy-cloud`.wms_base_location
`hwjy-cloud`.wms_base_location wbl
where
warehouse_id = 512 and container_code is null
warehouse_id = 512 and not exists (select 1 from wms_raw_stock wrs where wbl.location_code=wrs.location_code)
</select>
<select id="selectAllLocation" resultType="java.lang.Integer">
select

@ -361,7 +361,7 @@
select count(1) FROM `hwjy-cloud`.wms_base_location where warehouse_id =231 and container_code is not null
</select>
<select id="tableInfo" resultType="com.hw.wms.domain.WmsProductOutstockDetail">
select * from wms_product_outstock_detail where begin_time > now() - interval 1 month and execute_status = 3 order by begin_time asc
select * from wms_product_outstock_detail where warehouse_id=231 and begin_time > now() - interval 1 month and execute_status = 2 order by begin_time asc
</select>
<select id="selectInStock" resultType="com.hw.wms.domain.WmsProductInstock">
sELECT date_format(apply_date , '%Y-%m-%d 00:00:00') as day,
@ -386,16 +386,16 @@
day
</select>
<select id="selectOneWeek" resultType="java.lang.Integer">
SELECT count(1) FROM `hwjy-cloud`.wms_product_stock where instock_date > now() - interval 1 week
SELECT count(1) FROM `hwjy-cloud`.wms_product_instock where warehouse_id=231 and apply_date > now() - interval 1 week
</select>
<select id="selectTwoWeek" resultType="java.lang.Integer">
SELECT count(1) FROM `hwjy-cloud`.wms_product_stock where instock_date > now() - interval 2 week
SELECT count(1) FROM `hwjy-cloud`.wms_product_instock where warehouse_id=231 and apply_date > now() - interval 2 week
</select>
<select id="selectOneMonth" resultType="java.lang.Integer">
SELECT count(1) FROM `hwjy-cloud`.wms_product_stock where instock_date > now() - interval 1 month
SELECT count(1) FROM `hwjy-cloud`.wms_product_instock where warehouse_id=231 and apply_date > now() - interval 1 month
</select>
<select id="selectHalfYear" resultType="java.lang.Integer">
SELECT count(1) FROM `hwjy-cloud`.wms_product_stock where instock_date > now() - interval 6 month
SELECT count(1) FROM `hwjy-cloud`.wms_product_instock where warehouse_id=231 and apply_date > now() - interval 6 month
</select>
<select id="todayInstockAmount" resultType="java.math.BigDecimal">
select

@ -21,10 +21,10 @@
<HighChart key="chart4" ref="chart4"></HighChart>
</div>
<div class="num1 num1_1" style="top: 11.9%;left: 13.4%;color:#5fc2f2">{{ topData.furawInStock[0] }}</div>
<div class="num1 num1_2" style="top: 11.9%;left:15.7%;color:#5fc2f2">{{ topData.furawInStock[1] }}</div>
<div class="num1 num1_3" style="top: 11.9%;left:18%;color:#5fc2f2">{{ topData.furawInStock[2] }}</div>
<div class="num1 num1_4" style="top: 11.9%;left:20.4%;color:#5fc2f2">{{ topData.furawInStock[3] }}</div>
<div class="num1 num1_1" style="top: 11.9%;left: 13.4%;color:#5fc2f2">{{ topData.rawInStock[0] }}</div>
<div class="num1 num1_2" style="top: 11.9%;left:15.7%;color:#5fc2f2">{{ topData.rawInStock[1] }}</div>
<div class="num1 num1_3" style="top: 11.9%;left:18%;color:#5fc2f2">{{ topData.rawInStock[2] }}</div>
<div class="num1 num1_4" style="top: 11.9%;left:20.4%;color:#5fc2f2">{{ topData.rawInStock[3] }}</div>
<div class="num1 num1_5" style="top: 11.9%;left:32.2%;color:#59ee7b">{{ topData.productInStock[0] }}</div>
<div class="num1 num1_6" style="top: 11.9%;left:34.6%;color:#59ee7b">{{ topData.productInStock[1] }}</div>
@ -36,10 +36,10 @@
<div class="num1 num1_11" style="top: 11.9%;left:55.7%;color:#f60008">{{ topData.productOutStock[2] }}</div>
<div class="num1 num1_12" style="top: 11.9%;left:58.1%;color:#f60008">{{ topData.productOutStock[3] }}</div>
<div class="num1 num1_13" style="top: 11.9%;left:69.9%;color:#59ee7b">{{ topData.rawInStock[0] }}</div>
<div class="num1 num1_14" style="top: 11.9%;left:72.3%;color:#59ee7b">{{ topData.rawInStock[1] }}</div>
<div class="num1 num1_15" style="top: 11.9%;left:74.6%;color:#59ee7b">{{ topData.rawInStock[2] }}</div>
<div class="num1 num1_16" style="top: 11.9%;left:76.9%;color:#59ee7b">{{ topData.rawInStock[3] }}</div>
<div class="num1 num1_13" style="top: 11.9%;left:69.9%;color:#59ee7b">{{ topData.furawInStock[0] }}</div>
<div class="num1 num1_14" style="top: 11.9%;left:72.3%;color:#59ee7b">{{ topData.furawInStock[1] }}</div>
<div class="num1 num1_15" style="top: 11.9%;left:74.6%;color:#59ee7b">{{ topData.furawInStock[2] }}</div>
<div class="num1 num1_16" style="top: 11.9%;left:76.9%;color:#59ee7b">{{ topData.furawInStock[3] }}</div>
<div class="num1 num1_17" style="top: 11.9%;left:88.7%;color:#f60008">{{ topData.rawOutStock[0] }}</div>
<div class="num1 num1_18" style="top: 11.9%;left:91%;color:#f60008">{{ topData.rawOutStock[1] }}</div>
@ -303,7 +303,7 @@ export default {
}]
})
let total = e.data.productStocks.map(v => parseFloat(v.totalAmount)).reduce((a, b) => a + b, 0)
let total = e.data.wmsRawStocks.map(v => parseFloat(v.totalAmount)).reduce((a, b) => a + b, 0)
this.$refs.chart3.setData({
title: {
text: '原材料库存占比',
@ -375,7 +375,7 @@ export default {
{
type: 'pie',
name: '占比',
data: e.data.productStocks.map(v => {
data: e.data.wmsRawStocks.map(v => {
return {
name: v.materialName,
y: v.totalAmount,
@ -384,7 +384,7 @@ export default {
})
}]
})
let total1 = e.data.wmsRawStocks.map(v => parseFloat(v.totalAmount)).reduce((a, b) => a + b, 0)
let total1 = e.data.productStocks.map(v => parseFloat(v.totalAmount)).reduce((a, b) => a + b, 0)
this.$refs.chart4.setData({
title: {
text: '成品库存占比',
@ -456,7 +456,7 @@ export default {
{
type: 'pie',
name: '占比',
data: e.data.wmsRawStocks.map(v => {
data: e.data.productStocks.map(v => {
return {
name: v.materialName,
y: v.totalAmount,

@ -9,13 +9,13 @@
</div>
<div class="table1">
<div style="background-color: #094170aa">
<div class="scrollTableItem" style="color:#fff;font-weight: bold;width: 33%">
<div class="scrollTableItem" style="color:#fff;font-weight: bold;width: 15%">
库位
</div>
<div class="scrollTableItem" style="color:#fff;font-weight: bold;width: 33%">
<div class="scrollTableItem" style="color:#fff;font-weight: bold;width: 64%">
成品条码
</div>
<div class="scrollTableItem" style="color:#fff;font-weight: bold;width: 33%">
<div class="scrollTableItem" style="color:#fff;font-weight: bold;width: 10%">
数量
</div>
</div>
@ -31,17 +31,17 @@
>
<div :style='"background-color:" + ((index % 2 === 0)? "#053460aa":"#032d57aa") '>
<div
class="scrollTableItem" style="width: 33%"
class="scrollTableItem" style="width: 15%"
>
{{ item.locationCode }}
</div>
<div
class="scrollTableItem" style="width: 33%"
class="scrollTableItem" style="width: 64%"
>
{{ item.productBarcode }}
</div>
<div
class="scrollTableItem" style="width: 33%"
class="scrollTableItem" style="width: 10%"
>
{{ item.outstockAmount }}
</div>
@ -112,7 +112,7 @@ export default {
'库存总量统计',
'库位变化',
'入库时段统计',
'库位原理统计'
'库位分析'
],
titlePosition: [
{

@ -126,12 +126,12 @@
<dict-tag :options="dict.type.dms_alarm_level" :value="scope.row.alarmLevel"/>
</template>
</el-table-column>
<el-table-column label="通知方式" align="center" prop="noticeType" v-if="columns[4].visible">
<template slot-scope="scope">
<dict-tag :options="dict.type.dms_notice_type"
:value="scope.row.noticeType ? scope.row.noticeType.split(',') : []"/>
</template>
</el-table-column>
<!-- <el-table-column label="通知方式" align="center" prop="noticeType" v-if="columns[4].visible">-->
<!-- <template slot-scope="scope">-->
<!-- <dict-tag :options="dict.type.dms_notice_type"-->
<!-- :value="scope.row.noticeType ? scope.row.noticeType.split(',') : []"/>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="自动恢复标识" align="center" prop="recoverType" v-if="columns[5].visible">
<template slot-scope="scope">
<dict-tag :options="dict.type.dms_recover_type" :value="scope.row.recoverType"/>
@ -207,16 +207,16 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="通知方式" prop="noticeType">
<el-checkbox-group v-model="form.noticeType">
<el-checkbox
v-for="dict in dict.type.dms_notice_type"
:key="dict.value"
:label="dict.value">
{{ dict.label }}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
<!-- <el-form-item label="通知方式" prop="noticeType">-->
<!-- <el-checkbox-group v-model="form.noticeType">-->
<!-- <el-checkbox-->
<!-- v-for="dict in dict.type.dms_notice_type"-->
<!-- :key="dict.value"-->
<!-- :label="dict.value">-->
<!-- {{ dict.label }}-->
<!-- </el-checkbox>-->
<!-- </el-checkbox-group>-->
<!-- </el-form-item>-->
<el-form-item label="自动恢复标识" prop="recoverType">
<el-radio-group v-model="form.recoverType">
<el-radio

@ -162,12 +162,12 @@
<dict-tag :options="dict.type.dms_alarm_level" :value="scope.row.alarmLevel"/>
</template>
</el-table-column>
<el-table-column label="通知方式" align="center" prop="noticeType" v-if="columns[21].visible" width="100">
<template slot-scope="scope">
<dict-tag :options="dict.type.dms_notice_type"
:value="scope.row.noticeType ? scope.row.noticeType.split(',') : []"/>
</template>
</el-table-column>
<!-- <el-table-column label="通知方式" align="center" prop="noticeType" v-if="columns[21].visible" width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <dict-tag :options="dict.type.dms_notice_type"-->
<!-- :value="scope.row.noticeType ? scope.row.noticeType.split(',') : []"/>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="自动恢复标识" align="center" prop="recoverType" v-if="columns[22].visible">
<template slot-scope="scope">
<dict-tag :options="dict.type.dms_recover_type" :value="scope.row.recoverType"/>

@ -45,7 +45,7 @@
icon="el-icon-delete"
size="mini"
@click="handleUnallocateMaterials"
v-hasPermi="['wms:wmswarehouse:add']"
v-hasPermi="['qms:checkrule:checkRuleDetail']"
>删除
</el-button>
</el-form-item>
@ -99,7 +99,7 @@
size="mini"
:disabled = "allocateMaterialBtnDisable"
@click="submitForm"
v-hasPermi="['wms:wmswarehouse:add']"
v-hasPermi="['qms:checkrule:checkRuleDetail']"
>保存
</el-button>
</el-form-item>

Loading…
Cancel
Save