| | |
| | | return materialReleaseService.materialReleaseExcel(values,response); |
| | | } |
| | | |
| | | |
| | | //搅拌站 消耗列表 |
| | | @PostMapping("/materialRew") |
| | | public BasicResult materialRew(@RequestBody HashMap<String,Object> values) { |
| | | return materialReleaseService.materialRew(values); |
| | | } |
| | | } |
| 对比新文件 |
| | |
| | | package com.thhy.materials.modules.biz.concret.entity; |
| | | |
| | | import lombok.Data; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import lombok.ToString; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @Getter |
| | | @Setter |
| | | @ToString |
| | | public class TRawMaterial implements Serializable { |
| | | /** |
| | | * 搅拌id |
| | | */ |
| | | private Integer rawMaterialId; |
| | | |
| | | /** |
| | | * 盘次 |
| | | */ |
| | | private String piece; |
| | | |
| | | /** |
| | | * 原材料仓 |
| | | */ |
| | | private String storage; |
| | | |
| | | /** |
| | | * 原材料 |
| | | */ |
| | | private String material; |
| | | |
| | | /** |
| | | * 原材料规格 |
| | | */ |
| | | private String spec; |
| | | |
| | | /** |
| | | * 含水率*100、含固率*100... |
| | | */ |
| | | private String watfull; |
| | | |
| | | /** |
| | | * 配方用量 |
| | | */ |
| | | private String recamnt; |
| | | |
| | | /** |
| | | * 设定用量 |
| | | */ |
| | | private String planamnt; |
| | | |
| | | /** |
| | | * 实际用量 |
| | | */ |
| | | private String factamnt; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String flag; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String savestamp; |
| | | |
| | | /** |
| | | * 搅拌站接入主键 |
| | | */ |
| | | private Integer byId; |
| | | |
| | | /** |
| | | * This field was generated by MyBatis Generator. |
| | | * This field corresponds to the database table t_raw_material |
| | | * |
| | | * @mbg.generated Fri Nov 03 09:16:01 CST 2023 |
| | | */ |
| | | private static final long serialVersionUID = 1L; |
| | | } |
| 对比新文件 |
| | |
| | | package com.thhy.materials.modules.biz.concret.entity.dto; |
| | | |
| | | import com.thhy.materials.modules.biz.concret.entity.TRawMaterial; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class PieceDto implements Serializable { |
| | | |
| | | private Integer byId; |
| | | |
| | | |
| | | private List<TRawMaterial> rawMaterials; |
| | | |
| | | } |
| | |
| | | |
| | | import com.thhy.general.annotations.Idkey; |
| | | import com.thhy.materials.modules.biz.concret.entity.TMaterialRelease; |
| | | import com.thhy.materials.modules.biz.concret.entity.TRawMaterial; |
| | | import com.thhy.materials.modules.biz.concret.entity.TReleaseData; |
| | | import com.thhy.materials.modules.biz.concret.entity.dto.PieceDto; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | |
| | | void releaseDataDel(String materialReleaseId); |
| | | |
| | | void materialReleaseDel(String materialReleaseId); |
| | | |
| | | List<PieceDto> pieceList(HashMap<String, Object> values); |
| | | |
| | | List<TRawMaterial> materialRew(Integer byId); |
| | | } |
| | |
| | | BasicResult materialReleaseDel(String materialReleaseId); |
| | | |
| | | BasicResult materialReleaseExcel(HashMap<String, Object> values, HttpServletResponse response) throws FileNotFoundException; |
| | | |
| | | BasicResult materialRew(HashMap<String, Object> values); |
| | | } |
| | |
| | | import com.thhy.general.config.SysUserInfo; |
| | | import com.thhy.general.utils.UserInfoUtils; |
| | | import com.thhy.materials.modules.biz.concret.entity.TMaterialRelease; |
| | | import com.thhy.materials.modules.biz.concret.entity.TRawMaterial; |
| | | import com.thhy.materials.modules.biz.concret.entity.TReleaseData; |
| | | import com.thhy.materials.modules.biz.concret.entity.dto.DicetName; |
| | | import com.thhy.materials.modules.biz.concret.entity.dto.PieceDto; |
| | | import com.thhy.materials.modules.biz.concret.mapper.TMaterialReleaseMappper; |
| | | import com.thhy.materials.modules.biz.concret.service.TMaterialReleaseService; |
| | | import com.thhy.materials.modules.biz.weigh.mapper.WeighMapper; |
| | |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public BasicResult materialRew(HashMap<String, Object> values) { |
| | | Integer pageSize = Integer.valueOf(values.get("pageSize").toString()); |
| | | Integer pageNum = Integer.valueOf(values.get("pageNum").toString()); |
| | | PageHelper.startPage(pageNum,pageSize); |
| | | List<PieceDto> pieceDtos = materialReleaseMappper.pieceList(values); |
| | | for (PieceDto pieceDto : pieceDtos){ |
| | | List<TRawMaterial> rawMaterials = materialReleaseMappper.materialRew(pieceDto.getById()); |
| | | pieceDto.setRawMaterials(rawMaterials); |
| | | } |
| | | PageInfo<PieceDto> pieceDtoPageInfo = new PageInfo<>(pieceDtos); |
| | | return BasicResult.success(pieceDtoPageInfo); |
| | | } |
| | | } |
| | |
| | | import com.thhy.general.common.BasicResult; |
| | | import com.thhy.materials.modules.biz.helmet.service.HelmetService; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Map; |
| | |
| | | } |
| | | |
| | | |
| | | // 智能监控 |
| | | @PostMapping("/dataAIList") |
| | | public BasicResult dataAIList(@RequestBody Map<String,Object> values){ |
| | | return helmetService.dataAIList(values); |
| | | } |
| | | |
| | | //智能监控类型 |
| | | @GetMapping("dataAIType") |
| | | public BasicResult dataAIType(){ |
| | | return helmetService.dataAIType(); |
| | | } |
| | | |
| | | } |
| 对比新文件 |
| | |
| | | package com.thhy.materials.modules.biz.helmet.entity.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | @Data |
| | | public class TypeName implements Serializable { |
| | | |
| | | private Integer type; |
| | | |
| | | private String typeName; |
| | | |
| | | } |
| | |
| | | |
| | | import com.thhy.materials.modules.biz.helmet.entity.*; |
| | | import com.thhy.materials.modules.biz.helmet.entity.dto.ReportNumDto; |
| | | import com.thhy.materials.modules.biz.helmet.entity.dto.TypeName; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | List<TDataValue> dataValuesList(Map<String, Object> values); |
| | | |
| | | void dataBox(TDataAi tDataAi); |
| | | |
| | | List<TDataAi> dataAIList(Map<String, Object> values); |
| | | |
| | | List<TypeName> dataAIType(); |
| | | } |
| | |
| | | BasicResult dataValuesList(Map<String, Object> values); |
| | | |
| | | BasicResult dataBox(JSONObject result); |
| | | |
| | | BasicResult dataAIList(Map<String, Object> values); |
| | | |
| | | BasicResult dataAIType(); |
| | | } |
| | |
| | | import com.thhy.general.common.BasicResult; |
| | | import com.thhy.materials.modules.biz.helmet.entity.*; |
| | | import com.thhy.materials.modules.biz.helmet.entity.dto.ReportNumDto; |
| | | import com.thhy.materials.modules.biz.helmet.entity.dto.TypeName; |
| | | import com.thhy.materials.modules.biz.helmet.mapper.HelmetMapper; |
| | | import com.thhy.materials.modules.biz.helmet.service.HelmetService; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | helmetMapper.dataBox(tDataAi); |
| | | return BasicResult.success(); |
| | | } |
| | | |
| | | @Override |
| | | public BasicResult dataAIList(Map<String, Object> values) { |
| | | Integer pageNum = Integer.valueOf(values.get("pageNum").toString()); |
| | | Integer pageSize = Integer.valueOf(values.get("pageSize").toString()); |
| | | PageHelper.startPage(pageNum,pageSize); |
| | | List<TDataAi> tDataAis = helmetMapper.dataAIList(values); |
| | | PageInfo<TDataAi> tDataAiPageInfo = new PageInfo<>(tDataAis); |
| | | return BasicResult.success(tDataAiPageInfo); |
| | | } |
| | | |
| | | @Override |
| | | public BasicResult dataAIType() { |
| | | List<TypeName> typeNames = helmetMapper.dataAIType(); |
| | | return BasicResult.success(typeNames); |
| | | } |
| | | } |
| | |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <select id="dataAIList" resultType="com.thhy.materials.modules.biz.helmet.entity.TDataAi"> |
| | | select |
| | | sign_time as signTime, |
| | | box_name as boxName, |
| | | device_name as deviceName, |
| | | type_name as typeName, |
| | | `type` as `type`, |
| | | sign_avatar as signAvatar |
| | | from t_data_ai where |
| | | 1=1 |
| | | <if test="strTime!=null and strTime!='' and endTime!='' and endTime!=null "> |
| | | and sign_time between #{strTime} and #{endTime} |
| | | </if> |
| | | <if test="type!=null and type!='' "> |
| | | and `type` =#{type} |
| | | </if> |
| | | order by sign_time desc |
| | | </select> |
| | | <select id="dataAIType" resultType="com.thhy.materials.modules.biz.helmet.entity.dto.TypeName"> |
| | | select `type`, |
| | | type_name as typeName |
| | | from t_data_ai_type |
| | | order by `type` asc |
| | | </select> |
| | | </mapper> |
| | |
| | | is_use=2 |
| | | where material_release_id=#{materialReleaseId} |
| | | </update> |
| | | |
| | | <select id="pieceList" resultType="com.thhy.materials.modules.biz.concret.entity.dto.PieceDto"> |
| | | select by_id as byId from t_piece |
| | | where 1=1 |
| | | <if test="byId!=null and byId!='' "> |
| | | and by_id=#{byId} |
| | | </if> |
| | | ORDER BY by_id desc |
| | | </select> |
| | | <select id="materialRew" resultType="com.thhy.materials.modules.biz.concret.entity.TRawMaterial"> |
| | | select Storage as storage, |
| | | Material as material, |
| | | RecAmnt as recamnt, |
| | | PlanAmnt as planamnt, |
| | | FactAmnt as factamnt |
| | | from t_raw_material |
| | | where Piece=#{byId} |
| | | </select> |
| | | </mapper> |