change - 吸附内胆数据监控平台产量、库存统计

master
wenjy 2 years ago
parent fc699e81aa
commit 314f4b8eaf

@ -98,7 +98,7 @@ public class AdsorptionTankController {
@GetMapping("/getMaterialStoreJson") @GetMapping("/getMaterialStoreJson")
@ResponseBody @ResponseBody
public String getMesMaterialStoreStatisticsJson(){ public String getMesMaterialStoreStatisticsJson(){
List<MesMaterialStoreStatistics> mesMaterialStoreStatisticsList = iMesProductionDataService.getMesMaterialStoreStatisticsList("L001"); List<MesMaterialStoreStatistics> mesMaterialStoreStatisticsList = iMesProductionDataService.getMesMaterialStoreStatisticsList("1001");
return JSONArray.toJSONString(mesMaterialStoreStatisticsList); return JSONArray.toJSONString(mesMaterialStoreStatisticsList);
} }

@ -20,11 +20,11 @@ import java.io.Serializable;
public class MesMaterialProductionStatistics implements Serializable { public class MesMaterialProductionStatistics implements Serializable {
/** 物料名称 */ /** 物料名称 */
@TableField("materialname") @TableField("name")
private String xValue; private String xValue;
/** 产量数 */ /** 产量数 */
@TableField("productionamount") @TableField("value")
private String yValue; private String yValue;
/** 工位编号 */ /** 工位编号 */

@ -20,15 +20,15 @@ import java.io.Serializable;
public class MesMaterialStoreStatistics implements Serializable { public class MesMaterialStoreStatistics implements Serializable {
/** 物料名称 */ /** 物料名称 */
@TableField("MATERIALNAME") @TableField("materialName")
private String materialName; private String materialName;
/** 内胆库库存 */ /** 内胆库库存 */
@TableField("LINERSTOREAMOUNT") @TableField("lineStoreAmount")
private String lineStoreAmount; private String lineStoreAmount;
/** 箱壳库库存 */ /** 箱壳库库存 */
@TableField("HULLSTOREAMOUNT") @TableField("hullStoreAmount")
private String hullStoreAmount; private String hullStoreAmount;
/** 工位编号 */ /** 工位编号 */

@ -2,9 +2,14 @@ package com.productionboard.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.productionboard.entity.MesProduction.MesMaterialProductionStatistics; import com.productionboard.entity.MesProduction.MesMaterialProductionStatistics;
import com.productionboard.entity.MesProduction.MesTeamStatistics;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.List;
/** /**
* @author WenJY * @author WenJY
* @date 20220609 17:02 * @date 20220609 17:02
@ -12,4 +17,7 @@ import org.springframework.stereotype.Repository;
@Mapper @Mapper
@Repository @Repository
public interface MesMaterialProductionStatisticsMapper extends BaseMapper<MesMaterialProductionStatistics> { public interface MesMaterialProductionStatisticsMapper extends BaseMapper<MesMaterialProductionStatistics> {
@Select("select * from table ( absorb_xfnd_xhcl(#{in_id}) )")
List<MesMaterialProductionStatistics> getMesMaterialProductionStatisticsList(@Param("in_id") Integer in_id);
} }

@ -2,9 +2,14 @@ package com.productionboard.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.productionboard.entity.MesProduction.MesMaterialStoreStatistics; import com.productionboard.entity.MesProduction.MesMaterialStoreStatistics;
import com.productionboard.entity.MesProduction.MesTeamStatistics;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.List;
/** /**
* MES * MES
* @author WenJY * @author WenJY
@ -13,4 +18,14 @@ import org.springframework.stereotype.Repository;
@Mapper @Mapper
@Repository @Repository
public interface MesMaterialStoreStatisticsMapper extends BaseMapper<MesMaterialStoreStatistics>{ public interface MesMaterialStoreStatisticsMapper extends BaseMapper<MesMaterialStoreStatistics>{
/**
*
* @author WenJY
* @date 2022-10-01 17:27
* @param in_id
* @return java.util.List<com.productionboard.entity.MesProduction.MesTeamStatistics>
*/
@Select("select materialName,LINERSTOREAMOUNT as lineStoreAmount,hullStoreAmount from table ( scada_absorb_kctj(#{in_id}) )")
List<MesMaterialStoreStatistics> getAdsorptionTankStoreStatistics(@Param("in_id") Integer in_id);
} }

@ -19,6 +19,13 @@ import java.util.List;
@Repository @Repository
public interface MesTeamStatisticsMapper extends BaseMapper<MesTeamStatistics> { public interface MesTeamStatisticsMapper extends BaseMapper<MesTeamStatistics> {
/**
*
* @author WenJY
* @date 2022-10-01 17:27
* @param in_id
* @return java.util.List<com.productionboard.entity.MesProduction.MesTeamStatistics>
*/
@Select("select * from table ( scada_xfnd_bztj(#{in_id}) )") @Select("select * from table ( scada_xfnd_bztj(#{in_id}) )")
List<MesTeamStatistics> getAdsorptionTankTeamStatistics(@Param("in_id") Integer in_id); List<MesTeamStatistics> getAdsorptionTankTeamStatistics(@Param("in_id") Integer in_id);
} }

@ -9,6 +9,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
@ -46,7 +47,16 @@ public class MesProductionDataServiceImpl implements IMesProductionDataService {
*/ */
@Override @Override
public List<MesTeamStatistics> getMesTeamStatisticsList(String locationNumber) { public List<MesTeamStatistics> getMesTeamStatisticsList(String locationNumber) {
List<MesTeamStatistics> adsorptionTankTeamStatistics = teamStatisticsMapper.getAdsorptionTankTeamStatistics(this.in_id); List<MesTeamStatistics> adsorptionTankTeamStatistics = new ArrayList<>();
switch (locationNumber) {
case "1001":
adsorptionTankTeamStatistics = teamStatisticsMapper.getAdsorptionTankTeamStatistics(this.in_id);
break;
case "1003":
break;
default:
break;
}
return adsorptionTankTeamStatistics; return adsorptionTankTeamStatistics;
} }
@ -75,9 +85,16 @@ public class MesProductionDataServiceImpl implements IMesProductionDataService {
*/ */
@Override @Override
public List<MesMaterialProductionStatistics> getMesMaterialProductionStatisticsList(String locationNumber) { public List<MesMaterialProductionStatistics> getMesMaterialProductionStatisticsList(String locationNumber) {
QueryWrapper<MesMaterialProductionStatistics> wrapper = new QueryWrapper<>(); List<MesMaterialProductionStatistics> mesMaterialProductionStatistics = new ArrayList<>();
wrapper.eq("POSIONID",locationNumber); switch (locationNumber) {
List<MesMaterialProductionStatistics> mesMaterialProductionStatistics = materialProductionStatisticsMapper.selectList(wrapper); case "1001":
mesMaterialProductionStatistics = materialProductionStatisticsMapper.getMesMaterialProductionStatisticsList(this.in_id);
break;
case "1003":
break;
default:
break;
}
return mesMaterialProductionStatistics; return mesMaterialProductionStatistics;
} }
@ -90,9 +107,19 @@ public class MesProductionDataServiceImpl implements IMesProductionDataService {
*/ */
@Override @Override
public List<MesMaterialStoreStatistics> getMesMaterialStoreStatisticsList(String locationNumber) { public List<MesMaterialStoreStatistics> getMesMaterialStoreStatisticsList(String locationNumber) {
QueryWrapper<MesMaterialStoreStatistics> wrapper = new QueryWrapper<>();
wrapper.eq("POSIONID",locationNumber); List<MesMaterialStoreStatistics> mesMaterialStoreStatistics = new ArrayList<>();
List<MesMaterialStoreStatistics> mesMaterialStoreStatistics = materialStoreStatisticsMapper.selectList(wrapper);
switch (locationNumber) {
case "1001":
mesMaterialStoreStatistics = materialStoreStatisticsMapper.getAdsorptionTankStoreStatistics(this.in_id);
break;
case "1003":
break;
default:
break;
}
return mesMaterialStoreStatistics; return mesMaterialStoreStatistics;
} }

@ -13,3 +13,5 @@ mybatis-plus:
server: server:
port: 6069 port: 6069
in_id: 1
Loading…
Cancel
Save