Merge branch 'master' of http://111.30.93.211:10101/r/supipe
| | |
| | | RING_NUM_IS_REPEAT("09934","环号已存在"), |
| | | |
| | | RING_NOT_DIS("09935","环号必须为整数,最多5位"), |
| | | |
| | | RING_NOT_COMPLETE("09936","尚未成环"), |
| | | ; |
| | | |
| | | |
| | |
| | | import com.thhy.materials.modules.biz.concret.entity.dto.DicetName; |
| | | import com.thhy.materials.modules.biz.concret.entity.dto.TMinxingPlant; |
| | | import com.thhy.materials.modules.biz.concret.entity.dto.WeighDto; |
| | | import com.thhy.materials.modules.biz.weigh.entity.TWeighbridge; |
| | | import com.thhy.materials.modules.biz.weigh.mapper.WeighMapper; |
| | | import com.thhy.materials.modules.biz.weigh.service.WeighService; |
| | | import org.redisson.api.RLock; |
| | |
| | | |
| | | } |
| | | |
| | | //苏州项目------- 地磅入库 记录,及库存修改 |
| | | @Scheduled(fixedRate = 2000000) // 每隔3秒执行一次任务 |
| | | public void weighbridge() { |
| | | //查询搅拌 所有类型 |
| | | List<DicetName> dictList = weighService.dictList(); |
| | | List<TWeighbridge> tWeighbridges = weighMapper.weighbridgeListType(); |
| | | for (DicetName dicetName : dictList){ |
| | | for (TWeighbridge weighbridge :tWeighbridges){ |
| | | if(dicetName.getDictName().equals(weighbridge.getMatname())){ |
| | | //开始的库存 |
| | | Double materialValue = weighMapper.materialStockValue(dicetName.getDictId()); |
| | | //净重 |
| | | String jweight = weighbridge.getJweight(); |
| | | HashMap<String, Object> hashMap = new HashMap<>(); |
| | | hashMap.put("id",""); |
| | | hashMap.put("type",1); |
| | | hashMap.put("opType",1); |
| | | hashMap.put("materialName",dicetName.getDictId()); |
| | | hashMap.put("materialValue",Double.valueOf(jweight)); |
| | | hashMap.put("beforeStock",materialValue); |
| | | BigDecimal b1 = new BigDecimal(jweight); |
| | | BigDecimal b2 = new BigDecimal(materialValue); |
| | | double v1 = b1.add(b2).doubleValue(); |
| | | hashMap.put("afterStock",v1); |
| | | hashMap.put("companyId","031e3dd577e8ed28e96aa69b"); |
| | | RLock lock = redissonclient.getLock("materlock"); |
| | | if(!lock.isLocked()) { |
| | | lock.lock(10, TimeUnit.SECONDS); |
| | | //插入记录表//苏州项目(入库计入增加) |
| | | weighMapper.materialStockRecordIns(hashMap); |
| | | //更改记录值 |
| | | weighMapper.materialStockRecordUp(dicetName.getDictId(),b1.add(b2).doubleValue()); |
| | | lock.unlock(); |
| | | } |
| | | |
| | | weighMapper.weighbridgeUpdateType(weighbridge.getWeighbridgeId()); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | import com.thhy.materials.modules.biz.weigh.dto.QueryWeighDto; |
| | | import com.thhy.materials.modules.biz.weigh.entity.WeighVo; |
| | | import com.thhy.materials.modules.biz.weigh.service.WeighService; |
| | | import org.omg.CORBA.StringHolder; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | 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 java.util.Map; |
| | | |
| | | /** |
| | | * @Author QiuYuHao |
| | |
| | | PageInfo<WeighVo> weighVoPageInfo = new PageInfo<>(weighService.findAll(queryWeighDto)); |
| | | return BasicResult.success(weighVoPageInfo); |
| | | } |
| | | |
| | | @PostMapping("/weighbridgeList") |
| | | public BasicResult weighbridgeList(@RequestBody Map<String,Object> values){ |
| | | return weighService.weighbridgeList(values); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.thhy.materials.modules.biz.weigh.entity; |
| | | |
| | | import lombok.Data; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import lombok.ToString; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @Getter |
| | | @Setter |
| | | @ToString |
| | | public class TWeighbridge implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | private Integer weighbridgeId; |
| | | |
| | | /** |
| | | * 数据id |
| | | */ |
| | | private String id; |
| | | |
| | | /** |
| | | * 过磅编号 |
| | | */ |
| | | private String code; |
| | | |
| | | /** |
| | | * 业务所属机构 |
| | | */ |
| | | private String orgname; |
| | | |
| | | /** |
| | | * 供应单位名称 |
| | | */ |
| | | private String supplyorgname; |
| | | |
| | | /** |
| | | * 运输车牌号 |
| | | */ |
| | | private String carnumber; |
| | | |
| | | /** |
| | | * 运输司机 |
| | | */ |
| | | private String drivername; |
| | | |
| | | /** |
| | | * 原料名称 |
| | | */ |
| | | private String matname; |
| | | |
| | | /** |
| | | * 原材料型号 |
| | | */ |
| | | private String matmodel; |
| | | |
| | | /** |
| | | * 过毛时间 |
| | | */ |
| | | private String mpoundtime; |
| | | |
| | | /** |
| | | * 过磅毛重 千克 kg |
| | | */ |
| | | private String mpoundweight; |
| | | |
| | | /** |
| | | * 过毛人 |
| | | */ |
| | | private String mpoundname; |
| | | |
| | | /** |
| | | * 皮重时间 |
| | | */ |
| | | private String ppoundtime; |
| | | |
| | | /** |
| | | * 皮重 |
| | | */ |
| | | private String ppoundweight; |
| | | |
| | | /** |
| | | * 过皮人 |
| | | */ |
| | | private String ppoundname; |
| | | |
| | | /** |
| | | * 过磅净重 |
| | | */ |
| | | private String jpoundweight; |
| | | |
| | | /** |
| | | * 扣重 |
| | | */ |
| | | private String buckleweight; |
| | | |
| | | /** |
| | | * 毛重 |
| | | */ |
| | | private String mweight; |
| | | |
| | | /** |
| | | * 皮重 |
| | | */ |
| | | private String pweight; |
| | | |
| | | /** |
| | | * 净重 |
| | | */ |
| | | private String jweight; |
| | | |
| | | /** |
| | | * 入库仓名称 |
| | | */ |
| | | private String warename; |
| | | |
| | | /** |
| | | * 过磅图片,最多会有四张图片路径,逗号隔开 |
| | | */ |
| | | private String fileimage; |
| | | |
| | | /** |
| | | * 1未同步2已同步 |
| | | */ |
| | | private Integer types; |
| | | |
| | | /** |
| | | * This field was generated by MyBatis Generator. |
| | | * This field corresponds to the database table t_weighbridge |
| | | * |
| | | * @mbg.generated Fri Nov 24 11:06:42 CST 2023 |
| | | */ |
| | | private static final long serialVersionUID = 1L; |
| | | } |
| | |
| | | import com.thhy.materials.modules.biz.concret.entity.dto.WeighDto; |
| | | import com.thhy.materials.modules.biz.video.entity.TVideoNo; |
| | | import com.thhy.materials.modules.biz.weigh.dto.QueryWeighDto; |
| | | import com.thhy.materials.modules.biz.weigh.entity.TWeighbridge; |
| | | import com.thhy.materials.modules.biz.weigh.entity.WeighVo; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | Integer netWeighNew(Integer byId); |
| | | |
| | | void netWeighUpdateNew(@Param("byId") Integer byId,@Param("netWeight") double netWeight); |
| | | |
| | | List<TWeighbridge> weighbridgeList(Map<String, Object> values); |
| | | |
| | | List<TWeighbridge> weighbridgeListType(); |
| | | |
| | | Double materialStockValue(String dictId); |
| | | |
| | | void materialStockRecordIns(HashMap<String, Object> hashMap); |
| | | |
| | | void weighbridgeUpdateType(Integer weighbridgeId); |
| | | } |
| | |
| | | List<WeighDto> findAlltaskNew(Integer byId, String dictName); |
| | | |
| | | List<WeighDto> findAlltaskAllNew(String dictName); |
| | | |
| | | BasicResult weighbridgeList(Map<String, Object> values); |
| | | |
| | | } |
| | |
| | | package com.thhy.materials.modules.biz.weigh.service.impl; |
| | | |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.thhy.general.common.BasicResult; |
| | | import com.thhy.materials.modules.biz.concret.entity.dto.DicetName; |
| | | import com.thhy.materials.modules.biz.concret.entity.dto.TMinxingPlant; |
| | | import com.thhy.materials.modules.biz.concret.entity.dto.WeighDto; |
| | | import com.thhy.materials.modules.biz.weigh.dto.QueryWeighDto; |
| | | import com.thhy.materials.modules.biz.weigh.entity.TWeighbridge; |
| | | import com.thhy.materials.modules.biz.weigh.entity.WeighVo; |
| | | import com.thhy.materials.modules.biz.weigh.mapper.WeighMapper; |
| | | import com.thhy.materials.modules.biz.weigh.service.WeighService; |
| | |
| | | List<WeighDto> WeighVo= weighMapper.findAlltaskAllNew(dictName); |
| | | return WeighVo; |
| | | } |
| | | |
| | | @Override |
| | | public BasicResult weighbridgeList(Map<String, Object> values) { |
| | | Integer pageSize = Integer.valueOf(values.get("pageSize").toString()); |
| | | Integer pageNum = Integer.valueOf(values.get("pageNum").toString()); |
| | | PageHelper.startPage(pageNum,pageSize); |
| | | List<TWeighbridge> weighbridges = weighMapper.weighbridgeList(values); |
| | | PageInfo<TWeighbridge> tWeighbridgePageInfo = new PageInfo<>(weighbridges); |
| | | return BasicResult.success(tWeighbridgePageInfo); |
| | | } |
| | | } |
| | |
| | | where by_id=#{byId} |
| | | </update> |
| | | |
| | | <select id="weighbridgeList" resultType="com.thhy.materials.modules.biz.weigh.entity.TWeighbridge"> |
| | | select |
| | | weighbridge_id as weighbridgeId, |
| | | id, |
| | | code, |
| | | orgName, |
| | | supplyOrgName, |
| | | carNumber, |
| | | driverName, |
| | | matName, |
| | | matModel, |
| | | mPoundTime, |
| | | mPoundWeight, |
| | | mPoundName, |
| | | pPoundTime, |
| | | pPoundWeight, |
| | | pPoundName, |
| | | jPoundWeight, |
| | | buckleWeight, |
| | | mWeight, |
| | | pWeight, |
| | | jWeight, |
| | | wareName, |
| | | fileImage, |
| | | types |
| | | from t_weighbridge where |
| | | 1=1 |
| | | <if test="carNumber!=null and carNumber!='' "> |
| | | and carNumber like concat('%',#{carNumber},'%') |
| | | </if> |
| | | <if test="matName!=null and matName!='' "> |
| | | and matName like concat('%',#{matName},'%') |
| | | </if> |
| | | order by weighbridge_id desc |
| | | </select> |
| | | |
| | | <select id="weighbridgeListType" resultType="com.thhy.materials.modules.biz.weigh.entity.TWeighbridge"> |
| | | select |
| | | weighbridge_id as weighbridgeId, |
| | | id, |
| | | code, |
| | | orgName, |
| | | supplyOrgName, |
| | | carNumber, |
| | | driverName, |
| | | matName, |
| | | matModel, |
| | | mPoundTime, |
| | | mPoundWeight, |
| | | mPoundName, |
| | | pPoundTime, |
| | | pPoundWeight, |
| | | pPoundName, |
| | | jPoundWeight, |
| | | buckleWeight, |
| | | mWeight, |
| | | pWeight, |
| | | jWeight, |
| | | wareName, |
| | | fileImage, |
| | | types |
| | | from t_weighbridge where |
| | | types=1 |
| | | </select> |
| | | <select id="materialStockValue" resultType="java.lang.Double"> |
| | | select material_value as materialValue |
| | | from t_material_stock where material_name=#{dictId} |
| | | </select> |
| | | |
| | | |
| | | <insert id="materialStockRecordIns" > |
| | | insert into t_material_stock_record |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | id, |
| | | <if test="createDate != null"> |
| | | create_date, |
| | | </if> |
| | | <if test="type != null"> |
| | | type, |
| | | </if> |
| | | <if test="opType != null"> |
| | | op_type, |
| | | </if> |
| | | <if test="materialName != null"> |
| | | material_name, |
| | | </if> |
| | | <if test="materialValue != null"> |
| | | material_value, |
| | | </if> |
| | | <if test="beforeStock != null"> |
| | | before_stock, |
| | | </if> |
| | | <if test="afterStock != null"> |
| | | after_stock, |
| | | </if> |
| | | <if test="companyId != null"> |
| | | company_id, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | REPLACE(UUID(),'-',''), |
| | | <if test="createDate != null"> |
| | | #{createDate,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="type != null"> |
| | | #{type,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="opType != null"> |
| | | #{opType,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="materialName != null"> |
| | | #{materialName,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="materialValue != null"> |
| | | #{materialValue,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="beforeStock != null"> |
| | | #{beforeStock,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="afterStock != null"> |
| | | #{afterStock,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="companyId != null"> |
| | | #{companyId}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | <update id="weighbridgeUpdateType" > |
| | | update t_weighbridge set |
| | | types=2 |
| | | where weighbridge_id=#{weighbridgeId} |
| | | </update> |
| | | </mapper> |
| | |
| | | private String waterCultivatedId; |
| | | |
| | | private String companyId; |
| | | |
| | | private Integer outWater; |
| | | |
| | | private Date outTime; |
| | | } |
| | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author zhang_xiao_bo |
| | |
| | | return BasicResult.success(); |
| | | } |
| | | |
| | | @RequestMapping("updateDateInfo") |
| | | public BasicResult updateDateInfo(@RequestBody PipeInfo pipeInfo){ |
| | | Map<String, Object> map = pipeInfoService.updateDateInfo(pipeInfo); |
| | | return BasicResult.success(map); |
| | | } |
| | | |
| | | @RequestMapping("updatePipeDate") |
| | | public BasicResult updatePipeDate(@RequestBody PipeDateDto pipeDateDto){ |
| | | pipeInfoService.updatePipeDate(pipeDateDto); |
| | | return BasicResult.success(); |
| | | } |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.thhy.mobile.modules.biz.pipeinfo.entity; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class PipeDateDto implements Serializable { |
| | | |
| | | private String pipeNum; |
| | | |
| | | private String ringNum; |
| | | |
| | | private Date inModTime; |
| | | |
| | | private Date outModTime; |
| | | |
| | | private Date pouringTime; |
| | | |
| | | private Date placingInTime; |
| | | |
| | | private Date placingOutTime; |
| | | |
| | | private Date checkTime; |
| | | |
| | | private Date inWaterTime; |
| | | |
| | | private Date outWaterTime; |
| | | |
| | | private Date inRepoTime; |
| | | } |
| | |
| | | |
| | | private Integer createFlag; |
| | | |
| | | private Date outModTime; |
| | | |
| | | private Date placingInTime; |
| | | |
| | | private Date placingOutTime; |
| | | |
| | | public PipeInfo() {} |
| | | |
| | | public PipeInfo(Mould mould, SteelProduce steelProduce) { |
| | |
| | | package com.thhy.mobile.modules.biz.pipeinfo.mapper; |
| | | |
| | | import com.thhy.mobile.modules.biz.checkhistory.entity.*; |
| | | import com.thhy.mobile.modules.biz.cultivated.entity.PipeCultivated; |
| | | import com.thhy.mobile.modules.biz.cultivated.entity.PipeIntoListVo; |
| | | import com.thhy.mobile.modules.biz.mouldcheck.entity.Mould; |
| | | import com.thhy.mobile.modules.biz.mouldcheck.entity.MouldFree; |
| | | import com.thhy.mobile.modules.biz.mouldcheck.entity.RingCompleteCheck; |
| | | import com.thhy.mobile.modules.biz.pipecheckrecord.entity.MaterialStockRecord; |
| | | import com.thhy.mobile.modules.biz.pipeinfo.entity.*; |
| | | import com.thhy.mobile.modules.biz.repo.entity.RepoRecord; |
| | | import com.thhy.mobile.modules.biz.steelproduce.entity.ProduceDto; |
| | | import com.thhy.mobile.modules.biz.steelproduce.entity.ProduceMonthVo; |
| | | import com.thhy.mobile.modules.biz.temdevice.entity.DeviceInfo; |
| | |
| | | int queryMaxNumBySteelProduce(); |
| | | |
| | | int countByRingNum(String ringNum); |
| | | |
| | | Boolean compelteByRingNumAndPro(@Param("ringNum")String ringNum,@Param("proId")String proId); |
| | | |
| | | List<PipeIntoListVo> queryByRingNumAndPro(@Param("ringNum") String ringNum,@Param("proId") String proId); |
| | | |
| | | PipeCultivated queryWaterTimeByPipeNum(String pipeNum); |
| | | |
| | | RepoRecord queryRepoDate(String pipeNum); |
| | | |
| | | void updatePipeDateByNum(PipeDateDto pipeDateDto); |
| | | |
| | | void updateInWaterTime(PipeCultivated pipeCultivated); |
| | | |
| | | void updateOutWaterTime(PipeCultivated pipeCultivated); |
| | | |
| | | void updateInRepoTime(RepoRecord repoRecord); |
| | | } |
| | |
| | | import java.io.Serializable; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 服务类 |
| | |
| | | List<MaterialInfo> materialTotalStock(String companyId); |
| | | |
| | | void updateRingNum(PipeInfo pipeInfo); |
| | | |
| | | Map<String,Object> updateDateInfo(PipeInfo pipeInfo); |
| | | |
| | | void updatePipeDate(PipeDateDto pipeDateDto); |
| | | } |
| | |
| | | import com.thhy.general.common.BasicStatus; |
| | | import com.thhy.general.config.SysUserInfo; |
| | | import com.thhy.general.exception.BasicException; |
| | | import com.thhy.general.utils.DeepCopyUtils; |
| | | import com.thhy.general.utils.UserInfoUtils; |
| | | import com.thhy.mobile.modules.biz.cultivated.entity.PipeCultivated; |
| | | import com.thhy.mobile.modules.biz.cultivated.entity.PipeIntoListVo; |
| | | import com.thhy.mobile.modules.biz.pipecheckrecord.entity.PipeCheckRecord; |
| | | import com.thhy.mobile.modules.biz.pipecheckrecord.mapper.PipeCheckRecordMapper; |
| | | import com.thhy.mobile.modules.biz.pipeinfo.entity.*; |
| | | import com.thhy.mobile.modules.biz.pipeinfo.mapper.PipeInfoMapper; |
| | | import com.thhy.mobile.modules.biz.pipeinfo.service.PipeInfoService; |
| | | import com.thhy.mobile.modules.biz.repo.entity.RepoRecord; |
| | | import com.thhy.mobile.modules.biz.steelproduce.entity.ProduceDto; |
| | | import com.thhy.mobile.modules.biz.steelproduce.entity.ProduceMonthVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | import java.math.BigDecimal; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 服务实现类 |
| | |
| | | PipeInfo pipeInfo1 = pipeInfoMapper.queryByPipeNum(pipeInfo.getPipeNum()); |
| | | pipeInfoMapper.updateRingNum(pipeInfo1.getRingNum(), pipeInfo.getRingNum()); |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> updateDateInfo(PipeInfo pipeInfo) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | PipeInfo pinfos = pipeInfoMapper.queryByPipeNum(pipeInfo.getPipeNum()); |
| | | |
| | | Boolean result = pipeInfoMapper.compelteByRingNumAndPro(pinfos.getRingNum(), pinfos.getProId()); |
| | | if(result==null||!result){ |
| | | throw new BasicException(BasicStatus.RING_NOT_COMPLETE); |
| | | } |
| | | List<PipeIntoListVo> intoListVos = pipeInfoMapper.queryByRingNumAndPro(pinfos.getRingNum(),pinfos.getProId()); |
| | | |
| | | PipeInfo pinfo = pipeInfoMapper.queryByPipeNum(intoListVos.get(0).getPipeNum()); |
| | | if(pinfo.getCheckResult().equals(0)){ |
| | | //水养 |
| | | //PipeCultivated pipeCultivated = pipeInfoMapper.queryWaterTimeByPipeNum(pipeInfo.getPipeNum()); |
| | | |
| | | } |
| | | |
| | | map.put("inModTime",pinfo.getIntoModTime()); |
| | | map.put("outModTime",pinfo.getOutModTime()); |
| | | map.put("placingInTime",pinfo.getPlacingInTime()); |
| | | map.put("placingOutTime",pinfo.getPlacingOutTime()); |
| | | map.put("pouringTime",pinfo.getPouringTime()); |
| | | |
| | | map.put("checkTime",pinfo.getCheckTime()); |
| | | |
| | | PipeCultivated pipeCultivated = pipeInfoMapper.queryWaterTimeByPipeNum(pipeInfo.getPipeNum()); |
| | | map.put("inWaterFlag",false); |
| | | map.put("OutWaterFlag",false); |
| | | map.put("inRepoFlag",false); |
| | | if(pipeCultivated!=null){ |
| | | map.put("inWaterFlag",true); |
| | | map.put("inWaterTime",pipeCultivated.getCreateTime()); |
| | | |
| | | if(pipeCultivated.getOutWater()==2){ |
| | | map.put("OutWaterFlag",true); |
| | | map.put("OutWaterTime",pipeCultivated.getOutTime()); |
| | | RepoRecord repoRecord = pipeInfoMapper.queryRepoDate(pipeInfo.getPipeNum()); |
| | | if(repoRecord!=null){ |
| | | map.put("inRepoFlag",true); |
| | | map.put("inRepoTime",repoRecord.getCreateTime()); |
| | | } |
| | | return map; |
| | | }else{ |
| | | return map; |
| | | } |
| | | }else{ |
| | | return map; |
| | | } |
| | | } |
| | | |
| | | @Transactional |
| | | @Override |
| | | public void updatePipeDate(PipeDateDto pipeDateDto) { |
| | | PipeInfo pinfo = pipeInfoMapper.queryByPipeNum(pipeDateDto.getPipeNum()); |
| | | |
| | | Boolean result = pipeInfoMapper.compelteByRingNumAndPro(pinfo.getRingNum(), pinfo.getProId()); |
| | | if(result==null||!result){ |
| | | throw new BasicException(BasicStatus.RING_NOT_COMPLETE); |
| | | } |
| | | List<PipeIntoListVo> intoListVos = pipeInfoMapper.queryByRingNumAndPro(pinfo.getRingNum(),pinfo.getProId()); |
| | | |
| | | for(int i=0;i<intoListVos.size();i++){ |
| | | PipeDateDto pd = createNewDate(pipeDateDto,i); |
| | | pd.setPipeNum(intoListVos.get(i).getPipeNum()); |
| | | pipeInfoMapper.updatePipeDateByNum(pd); |
| | | //入模 |
| | | } |
| | | PipeCultivated pipeCultivated = pipeInfoMapper.queryWaterTimeByPipeNum(pipeDateDto.getPipeNum()); |
| | | if (pipeCultivated!=null) { |
| | | pipeCultivated.setCreateTime(pipeDateDto.getInWaterTime()); |
| | | pipeInfoMapper.updateInWaterTime(pipeCultivated); |
| | | if(pipeCultivated.getOutWater()==2){ |
| | | pipeCultivated.setOutTime(pipeDateDto.getOutWaterTime()); |
| | | pipeInfoMapper.updateOutWaterTime(pipeCultivated); |
| | | } |
| | | } |
| | | |
| | | RepoRecord repoRecord = pipeInfoMapper.queryRepoDate(pipeDateDto.getPipeNum()); |
| | | |
| | | if (repoRecord!=null) { |
| | | repoRecord.setCreateTime(pipeDateDto.getInRepoTime()); |
| | | pipeInfoMapper.updateInRepoTime(repoRecord); |
| | | } |
| | | } |
| | | |
| | | public PipeDateDto createNewDate(PipeDateDto pipeDateDto,int index){ |
| | | PipeDateDto pd = new PipeDateDto(); |
| | | if(index==0){ |
| | | DeepCopyUtils.copy(pipeDateDto,pd); |
| | | }else{ |
| | | pd.setInModTime(addMiu(pipeDateDto.getInModTime(),5*index)); |
| | | pd.setOutModTime(addMiu(pipeDateDto.getOutModTime(),5*index)); |
| | | pd.setPouringTime(addMiu(pipeDateDto.getPouringTime(),5*index)); |
| | | pd.setCheckTime(addMiu(pipeDateDto.getCheckTime(),5*index)); |
| | | pd.setPlacingInTime(addMiu(pipeDateDto.getPlacingInTime(),5*index)); |
| | | pd.setPlacingOutTime(addMiu(pipeDateDto.getPlacingOutTime(),5*index)); |
| | | if (pipeDateDto.getInRepoTime()!=null) { |
| | | pd.setInRepoTime(addMiu(pipeDateDto.getInRepoTime(),5*index)); |
| | | } |
| | | if (pipeDateDto.getInWaterTime()!=null) { |
| | | pd.setInWaterTime(addMiu(pipeDateDto.getInWaterTime(),5*index)); |
| | | } |
| | | if (pipeDateDto.getOutWaterTime()!=null) { |
| | | pd.setOutWaterTime(addMiu(pipeDateDto.getOutWaterTime(),5*index)); |
| | | } |
| | | } |
| | | return pd; |
| | | } |
| | | |
| | | public Date addMiu(Date oldTime,int amount){ |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(oldTime); |
| | | calendar.add(Calendar.MINUTE,amount); |
| | | return calendar.getTime(); |
| | | } |
| | | } |
| | |
| | | <select id="countByRingNum" resultType="int"> |
| | | select count(pipe_id) from t_pipe_info where ring_num = #{ringNum} |
| | | </select> |
| | | |
| | | <select id="compelteByRingNumAndPro" resultType="boolean"> |
| | | select (a.pipeBlock=b.proBlock) as result from |
| | | ( |
| | | select GROUP_CONCAT(block_num order by sd.dict_value) as pipeBlock,tpi.pro_id |
| | | from t_pipe_info tpi |
| | | left join sys_dict sd on sd.dict_id = tpi.block_num |
| | | where tpi.ring_num = #{ringNum} and tpi.pro_id = #{proId} and tpi.check_result = 1 |
| | | group by tpi.ring_num,tpi.pro_id |
| | | ) a |
| | | left join |
| | | ( |
| | | select GROUP_CONCAT(block_num order by sd1.dict_value) as proBlock,spb.pro_id |
| | | from sys_pro_blok spb |
| | | left join sys_dict sd1 on sd1.dict_id = spb.block_num |
| | | where spb.pro_id = #{proId} |
| | | group by spb.pro_id |
| | | ) b on a.pro_id = b.pro_id |
| | | </select> |
| | | |
| | | <select id="queryByRingNumAndPro" resultType="com.thhy.mobile.modules.biz.cultivated.entity.PipeIntoListVo"> |
| | | select t.ring_num as ringNum,t.pipe_num as pipeNum,t.check_time as checkTime,sd.dict_name as blockNum,sp.pro_name as proName |
| | | from t_pipe_info t |
| | | left join sys_dict sd on sd.dict_id = t.block_num |
| | | left join sys_project sp on sp.pro_id = t.pro_id |
| | | where t.ring_num = #{ringNum} and t.pro_id = #{proId} |
| | | order by t.pipe_num |
| | | </select> |
| | | |
| | | <select id="queryWaterTimeByPipeNum" resultType="com.thhy.mobile.modules.biz.cultivated.entity.PipeCultivated"> |
| | | select pc.id,pc.ring_num as ringNum,pc.create_time as createTime,pc.out_time as outTime,pc.out_water as outWater |
| | | from t_pipe_cultivated_pi pcp |
| | | left join t_pipe_cultivated pc on pcp.cultivated_id = pc.id |
| | | where pipe_num = #{pipeNum} |
| | | </select> |
| | | |
| | | <select id="queryRepoDate" resultType="com.thhy.mobile.modules.biz.repo.entity.RepoRecord"> |
| | | select rr.create_time as createTime,rr.record_id as recordId,rrp.out_repo as outRepo,rrp.out_repo_time as outRepoTime |
| | | from t_repo_record_pipe rrp |
| | | left join t_repo_record rr on rrp.record_id = rr.record_id |
| | | where rrp.pipe_num = #{pipeNum} |
| | | </select> |
| | | |
| | | <update id="updatePipeDateByNum"> |
| | | update t_pipe_info |
| | | <set> |
| | | <if test="checkTime != null"> |
| | | check_time=#{checkTime}, |
| | | </if> |
| | | <if test="inModTime != null"> |
| | | into_mod_time=#{inModTime}, |
| | | </if> |
| | | <if test="outModTime != null"> |
| | | out_mod_time=#{outModTime}, |
| | | </if> |
| | | <if test="pouringTime != null"> |
| | | pouring_time=#{pouringTime}, |
| | | </if> |
| | | <if test="placingInTime != null"> |
| | | placing_in_time=#{placingInTime}, |
| | | </if> |
| | | <if test="placingOutTime != null"> |
| | | placing_out_time=#{placingOutTime}, |
| | | </if> |
| | | <if test="inRepoTime != null"> |
| | | in_repo_time = #{inRepoTime}, |
| | | </if> |
| | | </set> |
| | | where pipe_num=#{pipeNum} |
| | | </update> |
| | | |
| | | <update id="updateInWaterTime"> |
| | | update t_pipe_cultivated set create_time = #{createTime} where id =#{id} |
| | | </update> |
| | | |
| | | <update id="updateOutWaterTime"> |
| | | update t_pipe_cultivated set out_time = #{outTime} where id =#{id} |
| | | </update> |
| | | |
| | | <update id="updateInRepoTime"> |
| | | update t_repo_record set create_time = #{createTime} where record_id =#{recordId} |
| | | </update> |
| | | </mapper> |
对比新文件 |
| | |
| | | package com.thhy.screen.config; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.nacos.api.utils.StringUtils; |
| | | import com.thhy.screen.modules.biz.audio.entity.AudioGroup; |
| | | import com.thhy.screen.modules.biz.bigscreen.mapper.BigScreenMapper; |
| | | import com.thhy.screen.utils.AudioUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.ApplicationArguments; |
| | | import org.springframework.boot.ApplicationRunner; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Configuration |
| | | public class StartListener implements ApplicationRunner { |
| | | |
| | | @Autowired |
| | | private BigScreenMapper screenMapper; |
| | | |
| | | @Override |
| | | public void run(ApplicationArguments args) throws Exception { |
| | | String result = AudioUtils.getGroups(); |
| | | if(StringUtils.isEmpty(result)){ |
| | | return; |
| | | } |
| | | JSONObject groupJSON = JSON.parseObject(result); |
| | | List<AudioGroup> groupList = JSON.parseArray(groupJSON.getString("Groups"),AudioGroup.class); |
| | | for(AudioGroup ag : groupList){ |
| | | screenMapper.insertAudioGroup(ag); |
| | | } |
| | | } |
| | | } |
| | |
| | | if(mess.contains("{")){ |
| | | mess = mess.substring(mess.indexOf("{"),mess.indexOf("}")+1); |
| | | } |
| | | logger.info("服务器处理消息: {}", mess); |
| | | AgvStateHistory agvStateHistory = JSON.parseObject(mess, AgvStateHistory.class); |
| | | historyMapper.insert(agvStateHistory); |
| | | |
对比新文件 |
| | |
| | | package com.thhy.screen.modules.biz.audio.controller; |
| | | |
| | | import com.thhy.general.common.BasicResult; |
| | | import com.thhy.screen.modules.biz.audio.entity.AudioDto; |
| | | import com.thhy.screen.modules.biz.audio.entity.AudioGroup; |
| | | import com.thhy.screen.modules.biz.audio.service.AudioService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @RequestMapping("audio") |
| | | public class AudioController { |
| | | |
| | | @Autowired |
| | | private AudioService audioService; |
| | | |
| | | @RequestMapping("groups") |
| | | public BasicResult groups(){ |
| | | List<AudioGroup> groupList = audioService.queryGroups(); |
| | | return BasicResult.success(groupList); |
| | | } |
| | | |
| | | @RequestMapping("playMusic") |
| | | public BasicResult playMusic(@RequestBody AudioDto AudioDto){ |
| | | audioService.playMusic(AudioDto); |
| | | return BasicResult.success(); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.thhy.screen.modules.biz.audio.entity; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | public class AudioDto implements Serializable { |
| | | |
| | | private String groupIds; |
| | | } |
对比新文件 |
| | |
| | | package com.thhy.screen.modules.biz.audio.entity; |
| | | |
| | | import com.alibaba.fastjson.annotation.JSONField; |
| | | import com.thhy.general.annotations.Idkey; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | public class AudioGroup implements Serializable { |
| | | |
| | | @Idkey |
| | | private String id; |
| | | |
| | | @JSONField(name = "ID") |
| | | private String groupId; |
| | | |
| | | @JSONField(name = "Name") |
| | | private String groupName; |
| | | } |
对比新文件 |
| | |
| | | package com.thhy.screen.modules.biz.audio.service; |
| | | |
| | | import com.thhy.screen.modules.biz.audio.entity.AudioDto; |
| | | import com.thhy.screen.modules.biz.audio.entity.AudioGroup; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface AudioService { |
| | | |
| | | List<AudioGroup> queryGroups(); |
| | | |
| | | void playMusic(AudioDto audioDto); |
| | | } |
对比新文件 |
| | |
| | | package com.thhy.screen.modules.biz.audio.service.impl; |
| | | |
| | | import com.thhy.screen.modules.biz.audio.entity.AudioDto; |
| | | import com.thhy.screen.modules.biz.audio.entity.AudioGroup; |
| | | import com.thhy.screen.modules.biz.audio.service.AudioService; |
| | | import com.thhy.screen.modules.biz.bigscreen.mapper.BigScreenMapper; |
| | | import com.thhy.screen.utils.AudioUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class AudioServiceImpl implements AudioService { |
| | | |
| | | @Autowired |
| | | private BigScreenMapper screenMapper; |
| | | |
| | | @Override |
| | | public List<AudioGroup> queryGroups() { |
| | | return screenMapper.queryGroups(); |
| | | } |
| | | |
| | | @Override |
| | | public void playMusic(AudioDto audioDto) { |
| | | String groupIds = audioDto.getGroupIds(); |
| | | String[] groupIdArray = new String[]{groupIds}; |
| | | AudioUtils.playMusic(groupIdArray); |
| | | return; |
| | | } |
| | | } |
| | |
| | | package com.thhy.screen.modules.biz.bigscreen.mapper; |
| | | |
| | | import com.thhy.screen.modules.biz.audio.entity.AudioGroup; |
| | | import com.thhy.screen.modules.biz.bigscreen.entity.*; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.stereotype.Component; |
| | |
| | | HashMap<String,Object> displayText(); |
| | | |
| | | List<HashMap<String,Object>> monthRingNumByPro(@Param("companyId") String companyId,@Param("proId") String proId); |
| | | |
| | | void insertAudioGroup(AudioGroup audioGroup); |
| | | |
| | | List<AudioGroup> queryGroups(); |
| | | } |
对比新文件 |
| | |
| | | package com.thhy.screen.utils; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.thhy.screen.modules.biz.audio.entity.AudioGroup; |
| | | |
| | | import java.util.List; |
| | | |
| | | public class AudioUtils { |
| | | |
| | | public static void main(String[] args) { |
| | | //getGroups(); |
| | | |
| | | } |
| | | |
| | | public static void login(){ |
| | | |
| | | } |
| | | |
| | | public static String getGroups(){ |
| | | String result = HttpUtils.post("GetGroups",new JSONObject()); |
| | | System.out.println(result); |
| | | return result; |
| | | } |
| | | |
| | | public static String playMusic(String[] groupIds){ |
| | | JSONObject jsonObject = new JSONObject(); |
| | | String[] ms = new String[]{"https://szpipe.thhy-tj.com/jingbao.mp3"}; |
| | | int[] groupIdArray = new int[groupIds.length]; |
| | | for(int i =0;i<groupIds.length;i++){ |
| | | groupIdArray[i] = Integer.parseInt(groupIds[i]); |
| | | } |
| | | jsonObject.put("Files",ms); |
| | | jsonObject.put("TextCode",1); |
| | | jsonObject.put("GroupIds",groupIdArray); |
| | | String result = HttpUtils.post("playMp3",jsonObject); |
| | | System.out.println(result); |
| | | return result; |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.thhy.screen.utils; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.thhy.general.common.BasicMessage; |
| | | import com.thhy.general.exception.BasicException; |
| | | |
| | | import java.io.*; |
| | | import java.net.HttpURLConnection; |
| | | import java.net.URL; |
| | | import java.util.Map; |
| | | |
| | | public class HttpUtils { |
| | | |
| | | private static String BaseHost = "http://150.158.37.69:8080/api/"; |
| | | |
| | | private static String token = ""; |
| | | |
| | | public static String post(String apiPath, JSONObject paramJson, PageInfo pageInfo){ |
| | | HttpURLConnection connection=null; |
| | | try { |
| | | URL url = new URL(BaseHost+apiPath); |
| | | connection = (HttpURLConnection) url.openConnection(); |
| | | connection.setConnectTimeout(3000); |
| | | connection.setReadTimeout(3000); |
| | | connection.setRequestMethod("POST"); |
| | | connection.setDoInput(true); |
| | | connection.setDoOutput(false); |
| | | connection.setRequestProperty("content-type","application/json;charset=UTF-8"); |
| | | if(!apiPath.equals("/api/getToken")){ |
| | | connection.setRequestProperty("userToken",""); |
| | | } |
| | | /*if(pageInfo.isPage()){ |
| | | connection.setRequestProperty("pageNum",pageInfo.getPageNo()+""); |
| | | connection.setRequestProperty("pageSize",pageInfo.getPageSize()+""); |
| | | }*/ |
| | | connection.connect(); |
| | | |
| | | DataOutputStream dos=new DataOutputStream(connection.getOutputStream()); |
| | | dos.write(paramJson.toJSONString().getBytes("UTF-8")); |
| | | //dos.writeBytes(paramJson.toJSONString()); |
| | | int responseCode = connection.getResponseCode(); |
| | | if (responseCode != HttpURLConnection.HTTP_OK) { |
| | | throw new BasicException(new BasicMessage("19901","网络连接失败")); |
| | | } |
| | | String result = getStringByStream(connection.getInputStream()); |
| | | if (result == null) { |
| | | throw new BasicException(new BasicMessage("19901","网络连接失败")); |
| | | }else{ |
| | | return result; |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new BasicException(new BasicMessage("19901","网络连接失败")); |
| | | } |
| | | } |
| | | |
| | | public static String post(String apiPath, JSONObject paramJson){ |
| | | HttpURLConnection connection=null; |
| | | try { |
| | | URL url = new URL(BaseHost+apiPath); |
| | | connection = (HttpURLConnection) url.openConnection(); |
| | | connection.setConnectTimeout(3000); |
| | | connection.setReadTimeout(3000); |
| | | connection.setRequestMethod("POST"); |
| | | connection.setDoInput(true); |
| | | connection.setDoOutput(true); |
| | | connection.setRequestProperty("content-type","application/json;charset=UTF-8"); |
| | | if(!apiPath.equals("/api/getToken")){ |
| | | connection.setRequestProperty("userToken",""); |
| | | } |
| | | connection.connect(); |
| | | |
| | | DataOutputStream dos=new DataOutputStream(connection.getOutputStream()); |
| | | dos.write(paramJson.toJSONString().getBytes("UTF-8")); |
| | | //dos.writeBytes(paramJson.toJSONString()); |
| | | int responseCode = connection.getResponseCode(); |
| | | if (responseCode != HttpURLConnection.HTTP_OK) { |
| | | throw new BasicException(new BasicMessage("19901","网络连接失败")); |
| | | } |
| | | String result = getStringByStream(connection.getInputStream()); |
| | | if (result == null) { |
| | | throw new BasicException(new BasicMessage("19901","网络连接失败")); |
| | | }else{ |
| | | return result; |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new BasicException(new BasicMessage("19901","网络连接失败")); |
| | | } |
| | | } |
| | | |
| | | private static String getStringByStream(InputStream inputStream){ |
| | | Reader reader; |
| | | try { |
| | | reader=new InputStreamReader(inputStream,"UTF-8"); |
| | | char[] rawBuffer=new char[512]; |
| | | StringBuffer buffer=new StringBuffer(); |
| | | int length; |
| | | while ((length=reader.read(rawBuffer))!=-1){ |
| | | buffer.append(rawBuffer,0,length); |
| | | } |
| | | return buffer.toString(); |
| | | } catch (UnsupportedEncodingException e) { |
| | | e.printStackTrace(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | public static String get(String api, Map<String,Object> map){ |
| | | HttpURLConnection connection = null; |
| | | try { |
| | | |
| | | StringBuilder urlParam = new StringBuilder(); |
| | | for(String key : map.keySet()){ |
| | | urlParam.append(key+"="+map.get(key).toString()+"&"); |
| | | } |
| | | String param = urlParam.toString(); |
| | | if(param.contains("&")){ |
| | | param = param.substring(0,param.length()-1); |
| | | } |
| | | URL url = new URL(BaseHost+api+"?"+param); |
| | | connection = (HttpURLConnection) url.openConnection(); |
| | | connection.setConnectTimeout(3000); |
| | | connection.setReadTimeout(3000); |
| | | connection.setRequestMethod("GET"); |
| | | if(!api.equals("/api/getToken")){ |
| | | connection.setRequestProperty("authorization",""); |
| | | } |
| | | |
| | | //dos.writeBytes(paramJson.toJSONString()); |
| | | int responseCode = connection.getResponseCode(); |
| | | if (responseCode != HttpURLConnection.HTTP_OK) { |
| | | return null; |
| | | } |
| | | String result = getStringByStream(connection.getInputStream()); |
| | | return result; |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | ) x on x.`month` = DATE_FORMAT(m.`month`,'%Y-%m') |
| | | </select> |
| | | |
| | | <insert id="insertAudioGroup"> |
| | | INSERT INTO |
| | | <trim suffix=")" prefix="(" suffixOverrides=","> |
| | | <if test="id != null and id !=null"> |
| | | id, |
| | | </if> |
| | | <if test="groupId != null"> |
| | | group_id, |
| | | </if> |
| | | <if test="groupName != null and groupName !=null"> |
| | | group_name, |
| | | </if> |
| | | </trim> |
| | | <trim suffix=")" prefix=" values(" suffixOverrides=","> |
| | | <if test="id != null and id !=null"> |
| | | #{id}, |
| | | </if> |
| | | <if test="groupId != null"> |
| | | #{groupId}, |
| | | </if> |
| | | <if test="groupName != null and groupName !=null"> |
| | | #{groupName}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <select id="queryGroups" resultType="com.thhy.screen.modules.biz.audio.entity.AudioGroup"> |
| | | select id,group_id as groupId,group_name as groupName from t_audio_groups |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | if (auditStatus != null){ |
| | | switch (auditStatus){ |
| | | case 0: |
| | | name = "未审核"; |
| | | name = "待审核"; |
| | | break; |
| | | case 1: |
| | | name = "已审核"; |
| | |
| | | public String getLevelName() { |
| | | String name = ""; |
| | | if (level != null){ |
| | | switch (level){ |
| | | switch (level){ |
| | | case 1: |
| | | name = "一般隐患"; |
| | | break; |
| | |
| | | */ |
| | | //查询列表接口 |
| | | searchWeighRecordsList: (params) => |
| | | axios.post('/materials/weigh/queryAllWeigh', params), |
| | | axios.post('/materials/weigh/weighbridgeList', params), |
| | | |
| | | |
| | | /** |
对比新文件 |
| | |
| | | <template> |
| | | <div class="main"> |
| | | <div class="main_header"> |
| | | <div class="header_item"> |
| | | <span class="header_label">车牌号:</span> |
| | | <el-input v-model="search.carNumber" :size="size" clearable placeholder="请输入车牌号"></el-input> |
| | | </div> |
| | | <div class="header_item"> |
| | | <span class="header_label">原材料名称:</span> |
| | | <el-input v-model="search.matName" :size="size" clearable placeholder="请输入原材料名称"></el-input> |
| | | </div> |
| | | <div class="header_item"> |
| | | <span class="header_label">时间范围:</span> |
| | | <el-date-picker |
| | | v-model="search.time" |
| | | type="daterange" |
| | | :default-time="['00:00:00','23:59:59']" |
| | | clearable |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | range-separator="-" |
| | | start-placeholder="起始时间" |
| | | end-placeholder="结束时间"> |
| | | </el-date-picker> |
| | | </div> |
| | | <div class="header_item"> |
| | | <el-button icon="el-icon-search" v-if="showButton('search')" @click="searchButtonInfo(true)">查询</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="main_content"> |
| | | <el-table |
| | | v-loading="loading" |
| | | :data="dataList" |
| | | height="100%"> |
| | | <el-table-column align="center" label="序号" width="60"> |
| | | <template #default="scope"> |
| | | <span>{{(pageNum - 1) * pageSize + scope.$index + 1}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="code" label="过磅编号" align="center" width="120"></el-table-column> |
| | | <el-table-column prop="orgname" label="业务所属机构" align="center" width="200"></el-table-column> |
| | | <el-table-column prop="supplyorgname" label="供应单位名称" align="center" width="200"></el-table-column> |
| | | <el-table-column prop="carnumber" label="车牌号" align="center"></el-table-column> |
| | | <el-table-column prop="drivername" label="运输司机" align="center" ></el-table-column> |
| | | <el-table-column prop="matname" label="原料名称" align="center"></el-table-column> |
| | | <el-table-column prop="matmodel" label="原材料型号" align="center" width="150"></el-table-column> |
| | | <el-table-column prop="mpoundtime" label="过毛时间" align="center"></el-table-column> |
| | | <el-table-column prop="mpoundweight" label="毛重" align="center"></el-table-column> |
| | | <el-table-column prop="mpoundname" label="过毛人" align="center"></el-table-column> |
| | | <el-table-column prop="ppoundtime" label="皮重时间" align="center"></el-table-column> |
| | | <el-table-column prop="ppoundname" label="过皮人" align="center"></el-table-column> |
| | | <el-table-column prop="jpoundweight" label="过磅净重" align="center"></el-table-column> |
| | | <el-table-column prop="buckleweight" label="扣重" align="center"></el-table-column> |
| | | <el-table-column prop="mweight" label="毛重" align="center"></el-table-column> |
| | | <el-table-column prop="pweight" label="皮重" align="center"></el-table-column> |
| | | <el-table-column prop="jweight" label="净重" align="center"></el-table-column> |
| | | <el-table-column prop="warename" label="入库仓名称" align="center" width="100"></el-table-column> |
| | | <el-table-column prop="types" label="同步状态" align="center" width="100"> |
| | | <template #default="{row}"> |
| | | <div>{{row.types===1?'未同步':row.types===2?'已同步':''}}</div> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div class="main_footer"> |
| | | <el-pagination |
| | | background |
| | | @current-change="changePageNum" |
| | | @size-change="changePageSize" |
| | | :current-page="pageNum" |
| | | :page-sizes="[10, 20, 50, 100]" |
| | | :page-size="pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="total"> |
| | | </el-pagination> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { buttonPinia } from '../../pinia/index'; |
| | | import { changeSize } from '../../plugins/public'; // 导入节流、动态切换组件尺寸方法 |
| | | export default { |
| | | data() { |
| | | return { |
| | | size: changeSize(), // 组件尺寸 |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | search:{},//查询条件 |
| | | total: 0, |
| | | loading: false, |
| | | dataList: [], //进场称重列表 |
| | | } |
| | | }, |
| | | watch: { |
| | | asyncVisible(bol) { |
| | | if(!bol) { |
| | | this.ruleForm = {}; |
| | | this.$refs.ruleForm.resetFields(); |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | const that = this; |
| | | // 根据窗口大小动态修改组件尺寸 |
| | | window.onresize = () => { |
| | | that.size = changeSize(); |
| | | } |
| | | that.searchButtonInfo(true); |
| | | }, |
| | | methods: { |
| | | // 查询按钮列表信息 |
| | | searchButtonInfo(bol) { |
| | | if(bol) { |
| | | this.pageNum = 1; |
| | | } |
| | | let params = Object.assign({},this.search,{ |
| | | pageNum: this.pageNum, |
| | | pageSize: this.pageSize |
| | | }) |
| | | params.startTime = this.search.time&&this.search.time[0] |
| | | params.endTime = this.search.time&&this.search.time[1] |
| | | delete params.time |
| | | this.loading = true; |
| | | this.$api.Materials.searchWeighRecordsList(params).then((res) => { |
| | | if(res.statusMsg === 'ok') { |
| | | this.total = res.data.total; |
| | | this.dataList = res.data.list; |
| | | } |
| | | this.loading = false; |
| | | }) |
| | | }, |
| | | // 判断按钮权限信息 |
| | | showButton(str) { |
| | | const pinia = buttonPinia(); |
| | | return pinia.$state.buttonInfo.includes(str); |
| | | }, |
| | | // 切换页数 |
| | | changePageNum(page) { |
| | | this.pageNum = page; |
| | | this.searchButtonInfo(); |
| | | }, |
| | | // 切换每页条数 |
| | | changePageSize(size) { |
| | | this.pageSize = size; |
| | | this.searchButtonInfo(); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import '../../style/layout-main.scss'; |
| | | /deep/.el-color-picker__trigger{ |
| | | border-color:#1C4390; |
| | | } |
| | | /deep/.el-color-picker__color{ |
| | | border-color:#1C4390; |
| | | } |
| | | </style> |
| | |
| | | </div> |
| | | <div class="mixing_rows"> |
| | | <div class="mixing_rows_titles">检验状态:</div> |
| | | <div class="mixing_rows_datas" :class="{'standardStyle':mixingList.status===1,'notStandardStyle':mixingList.status!==1}">{{mixingList&&mixingList.status===1?'合格':'待检'}}</div> |
| | | <div class="mixing_rows_datas" :class="{'standardStyle':mixingList.status===1,'notStandardStyle':mixingList.status!==1}">{{mixingList&&mixingList.status===1?'合格':mixingList&&mixingList.status===2?'待检':''}}</div> |
| | | </div> |
| | | <div class="mixing_rows"> |
| | | <div class="mixing_rows_titles">报告编号:</div> |
| | |
| | | } |
| | | this.$api.Infos.showHmixings(params).then(res=>{ |
| | | if(res.statusMsg==='ok'){ |
| | | this.mixingList = res.data |
| | | this.mixingList = res.data===null?[]:res.data |
| | | }else{ |
| | | this.$message.warning('请检查网络或联系管理员!!!') |
| | | } |