| | |
| | | } |
| | | |
| | | }else { |
| | | locNo = param.getName()+"-" +String.format("%02d", r) + String.format("%02d", b) + String.format("%02d", l); |
| | | locNo = param.getName()+String.format("%02d", r) + String.format("%02d", b) + String.format("%02d", l); |
| | | } |
| | | |
| | | //客户要求格式位A-01-01-01 |
| | |
| | | import com.core.common.R; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.GlobleParameter; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.utils.PlaExcelListener; |
| | | import com.zy.asrs.utils.SaasUtils; |
| | |
| | | System.out.println(plas.toString()); |
| | | plas.forEach(pla -> { |
| | | Pla plaSave = plaService.selectById(pla.getId()); |
| | | pla.setModifyTime(new Date()); |
| | | plaService.updateById(pla); |
| | | |
| | | PlaLog plaLog = new PlaLog(); |
| | | BeanUtils.copyProperties(plaSave,plaLog); |
| | | plaLog.setId(null); |
| | | plaLog.setCreateTime(new Date()); |
| | | plaLogService.insert(plaLog); |
| | | plaService.updateById(pla); |
| | | |
| | | }); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/pla/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestBody List<Pla> plas) { |
| | | System.out.println(plas.toString()); |
| | | plas.forEach(pla -> { |
| | | if(!pla.getStatus().equals(GlobleParameter.PLA_STATUS_00) || pla.getStatus().equals(GlobleParameter.PLA_STATUS_0)){ |
| | | throw new CoolException("非待入库的数据无法被删除"); |
| | | } |
| | | Pla plaSave = plaService.selectById(pla.getId()); |
| | | pla.setModifyTime(new Date()); |
| | | plaService.deleteById(pla.getId()); |
| | | |
| | | PlaLog plaLog = new PlaLog(); |
| | | BeanUtils.copyProperties(plaSave,plaLog); |
| | | plaLog.setId(null); |
| | | plaLog.setCreateTime(new Date()); |
| | | plaLogService.insert(plaLog); |
| | | |
| | | }); |
| | | return R.ok(); |
| | | } |
| | |
| | | } |
| | | pla.setQtyAnfme(pla.getQtyAnfme() + pla.getOrderWeight()); |
| | | pla.setHandlerBy(getUser().getUsername()); |
| | | pla.setStatus("待出库"); |
| | | pla.setStatus(GlobleParameter.PLA_STATUS_2); |
| | | pla.setPakoutTime(pla.getPakoutTime().split("\\(")[0]); |
| | | //生成此次作业信息 |
| | | PlaQty plaQty = new PlaQty(); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/pla/viladate/auth") |
| | | @ManagerAuth |
| | | public R viladate(@RequestBody List<Pla> plas) { |
| | | plaService.viladate(plas,getUser()); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/pla/rework/auth") |
| | | @ManagerAuth |
| | | public R rework(@RequestBody List<Pla> plas) { |
| | |
| | | |
| | | //重量 |
| | | @TableField("weight") |
| | | @ExcelProperty(value = "重量") |
| | | @ExcelProperty(value = "重量KG") |
| | | private Double weight; |
| | | |
| | | @ApiModelProperty(value= "单位") |
| | | @ExcelProperty(value = "单位") |
| | | //@ExcelProperty(value = "单位") |
| | | @TableField("unit") |
| | | private String unit; |
| | | |
| | |
| | | |
| | | //熔指 |
| | | @TableField("finger_melting") |
| | | @ExcelProperty(value = "熔指") |
| | | @ExcelProperty(value = "熔指,g/10min") |
| | | private Double fingerMelting; |
| | | |
| | | //水分 |
| | | @TableField("water") |
| | | @ExcelProperty(value = "水分") |
| | | @ExcelProperty(value = "水分,ppm") |
| | | private Double water; |
| | | |
| | | //熔点 |
| | | @TableField("fusing_point") |
| | | @ExcelProperty(value = "熔点") |
| | | @ExcelProperty(value = "熔点,℃") |
| | | private Double fusingPoint; |
| | | |
| | | //挥发份1 |
| | | @TableField("vadf1") |
| | | @ExcelProperty(value = "挥发份1") |
| | | @ExcelProperty(value = "挥发段,%") |
| | | private Double vadf1; |
| | | |
| | | //挥发份2 |
| | | @TableField("vadf2") |
| | | @ExcelProperty(value = "挥发份2") |
| | | @ExcelProperty(value = "分解段,%") |
| | | private Double vadf2; |
| | | |
| | | //黄度 |
| | |
| | | |
| | | //不透明度 |
| | | @TableField("opacity") |
| | | @ExcelProperty(value = "不透明度") |
| | | @ExcelProperty(value = "不透明度,%") |
| | | private Double opacity; |
| | | |
| | | //L值 |
| | | @TableField("l") |
| | | @ExcelProperty(value = "l值") |
| | | @ExcelProperty(value = "L*") |
| | | private Double l; |
| | | |
| | | //a值 |
| | | @TableField("a") |
| | | @ExcelProperty(value = "a值") |
| | | @ExcelProperty(value = "a*") |
| | | private Double a; |
| | | |
| | | //b值 |
| | | @TableField("b") |
| | | @ExcelProperty(value = "b值") |
| | | @ExcelProperty(value = "b*") |
| | | private Double b; |
| | | |
| | | //填充 |
| | | @TableField("fill_in") |
| | | @ExcelProperty(value = "填充") |
| | | @ExcelProperty(value = "填充,%") |
| | | private Double fillIn; |
| | | |
| | | @ExcelProperty(value = "拉伸强度,MPa") |
| | | private String str1; |
| | | |
| | | @ExcelProperty(value = "断裂伸长率,%") |
| | | private String str2; |
| | | |
| | | @ExcelProperty(value = "缺口冲击,KJ/m2") |
| | | private String str3; |
| | | |
| | | @ExcelProperty(value = "维卡,℃") |
| | | private String str4; |
| | | |
| | | @ExcelProperty(value = "半结晶时间,min") |
| | | private String str5; |
| | | |
| | | @ExcelProperty(value = "结晶度.%") |
| | | private String str6; |
| | | |
| | | // @ExcelProperty(value = "填充") |
| | | private String str7; |
| | | // |
| | | // @ExcelProperty(value = "填充") |
| | | private String str8; |
| | | |
| | | |
| | | //质量状态 |
| | | @TableField("mass_state") |
| | | @ExcelProperty(value = "质量状体") |
| | | @ExcelProperty(value = "质量状态") |
| | | private String massState; |
| | | |
| | | //质量问题 |
| | |
| | | package com.zy.asrs.entity.param; |
| | | |
| | | public class GlobleParameter { |
| | | public static final String PLA_STATUS_00 = "暂入库"; |
| | | public static final String PLA_STATUS_0 = "待入库"; |
| | | public static final String PLA_STATUS_1 = "已入库"; |
| | | public static final String PLA_STATUS_2 = "待出库"; |
| | |
| | | |
| | | void returned(List<PlaQty> plaQties, User user); |
| | | |
| | | void viladate(List<Pla> plas, User user); |
| | | } |
| | |
| | | throw new CoolException("系统未检测到该包物料信息,请重新录入"); |
| | | } |
| | | |
| | | if(Cools.eq(GlobleParameter.PLA_STATUS_1,pla.getStatus())){ |
| | | throw new CoolException("该物料已入库"); |
| | | if(!pla.getStatus().equals(GlobleParameter.PLA_STATUS_0)){ |
| | | throw new CoolException("该物料状态不为待入库,无法入库"); |
| | | } |
| | | |
| | | pla.setStatus(GlobleParameter.PLA_STATUS_1); |
| | | pla.setModifyTime(new Date()); |
| | | pla.setPakinTime(new Date()); |
| | |
| | | pla.setWeightAnfme(pla.getWeightAnfme() - anfme); |
| | | pla.setQtyAnfme(pla.getQtyAnfme() - anfme); |
| | | if(pla.getWeightAnfme() <= 0){ |
| | | pla.setStatus("全部出库"); |
| | | pla.setStatus(GlobleParameter.PLA_STATUS_4); |
| | | }else { |
| | | pla.setStatus("部分出库"); |
| | | pla.setStatus(GlobleParameter.PLA_STATUS_3); |
| | | } |
| | | plaService.updateById(pla); |
| | | SaasUtils.insertLog(1,locNo,batch+","+packageNo,anfme,null); |
| | |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.core.common.Cools; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.OrderDetl; |
| | | import com.zy.asrs.entity.Pla; |
| | | import com.zy.asrs.entity.PlaQty; |
| | |
| | | Pla pla = this.selectByBatchAndPackageNo(plaQty.getBatch(), plaQty.getPackageNo()); |
| | | //pla.setStatus(GlobleParameter.PLA_STATUS_0); |
| | | |
| | | pla.setWeightAnfme(plaQty.getOrderWeight()); |
| | | pla.setWeightAnfme(pla.getWeightAnfme() + plaQty.getOrderWeight()); |
| | | pla.setStatus(GlobleParameter.PLA_STATUS_1); |
| | | this.updateById(pla); |
| | | |
| | |
| | | |
| | | }); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void viladate(List<Pla> plas, User user) { |
| | | plas.forEach(pla -> { |
| | | if(!pla.getStatus().equals(GlobleParameter.PLA_STATUS_00)){ |
| | | throw new CoolException("选中的数据不是暂入库状态,请核对状态"); |
| | | } |
| | | pla = this.selectById(pla.getId()); |
| | | pla.setStatus(GlobleParameter.PLA_STATUS_0); |
| | | this.updateById(pla); |
| | | }); |
| | | } |
| | | } |
| | |
| | | pla = excel; |
| | | pla.setStep(2); |
| | | pla.setCreateTime(new Date()); |
| | | pla.setStatus(GlobleParameter.PLA_STATUS_0); |
| | | pla.setModifyTime(new Date()); |
| | | pla.setStatus(GlobleParameter.PLA_STATUS_00); |
| | | if (!plaService.insert(pla)) { |
| | | throw new CoolException("保存商品信息失败,商品编码:" + excel.getMatnr()); |
| | | } |
| | | total++; |
| | | }else if (pla.getStatus().equals(GlobleParameter.PLA_STATUS_0)){ |
| | | }else if (pla.getStatus().equals(GlobleParameter.PLA_STATUS_00)){ |
| | | excel.setId(pla.getId()); |
| | | excel.setCreateTime(pla.getCreateTime()); |
| | | excel.setModifyTime(pla.getModifyTime()); |
| | | excel.setModifyTime(new Date()); |
| | | excel.setStep(2); |
| | | excel.setStatus(GlobleParameter.PLA_STATUS_0); |
| | | excel.setStatus(GlobleParameter.PLA_STATUS_00); |
| | | BeanUtils.copyProperties(excel,pla); |
| | | plaService.updateById(pla); |
| | | total++; |
| | |
| | | ,{field: 'a', align: 'center',title: 'a值', hide:true,edit:true} |
| | | ,{field: 'b', align: 'center',title: 'b值', hide:true,edit:true} |
| | | ,{field: 'fillIn', align: 'center',title: '填充(%)',hide:true,edit:true} |
| | | ,{field: 'str1', align: 'center',title: '拉伸强度MPa',hide:true,edit:true} |
| | | ,{field: 'str2', align: 'center',title: '断裂伸长率%',hide:true,edit:true} |
| | | ,{field: 'str3', align: 'center',title: '缺口冲击KJ/m2',hide:true,edit:true} |
| | | ,{field: 'str4', align: 'center',title: '维卡℃',hide:true,edit:true} |
| | | ,{field: 'str5', align: 'center',title: '半结晶时间min',hide:true,edit:true} |
| | | ,{field: 'str6', align: 'center',title: '结晶度%',hide:true,edit:true} |
| | | ,{field: 'massState', align: 'center',title: '质量状态',edit:true} |
| | | ,{field: 'problem', align: 'center',title: '备注',edit:true} |
| | | ,{field: 'stash', align: 'center',title: '仓库',edit:true} |
| | |
| | | return "<span style='color: black'>部分出库</span>" |
| | | }else if(data.status === "全部出库"){ |
| | | return "<span style='color: gray'>全部出库</span>" |
| | | }else if(data.status === "暂入库"){ |
| | | return "<span style='color: purple'>暂入库</span>" |
| | | } |
| | | } |
| | | |
| | |
| | | }); |
| | | } |
| | | break; |
| | | |
| | | case "deleteData": |
| | | var data = checkStatus.data; |
| | | if (data.length === 0){ |
| | | layer.msg('请选择数据'); |
| | | } else { |
| | | layer.confirm('确定删除'+(data.length===1?'此':data.length)+'条数据吗', function(){ |
| | | $.ajax({ |
| | | url: baseUrl+"/pla/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(data), |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | traditional:true, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | layer.closeAll(); |
| | | tableReload(false); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | break; |
| | | case "viladate": |
| | | var data = checkStatus.data; |
| | | if (data.length === 0){ |
| | | layer.msg('请选择数据'); |
| | | } else { |
| | | layer.confirm('确定校验'+(data.length===1?'此':data.length)+'条数据吗', function(){ |
| | | $.ajax({ |
| | | url: baseUrl+"/pla/viladate/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(data), |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | traditional:true, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | layer.closeAll(); |
| | | tableReload(false); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | } |
| | | }) |
| | | |
| | |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-sm layui-btn-danger" id="btn-delete" lay-event="deleteData" style="display: none">删除</button> |
| | | <button class="layui-btn layui-btn-sm layui-btn-danger" id="btn-update" lay-event="updateData" style="display: none">修改</button> |
| | | <button class="layui-btn layui-btn-sm layui-btn-danger" id="btn-viladate" lay-event="viladate" style="display: none">校验</button> |
| | | |
| | | <!-- 商品/物料 数据中心 --> |
| | | <div class="dropdown-menu" style="float: right"> |
| | | <button class="layui-btn layui-btn-primary layui-border-black icon-btn layui-btn-sm"> 数据同步 <i class="layui-icon layui-icon-drop"></i></button> |
| | |
| | | table.reload('productionInfoTable',{ |
| | | data: dataOld |
| | | }) |
| | | parent.layer.closeAll(); |
| | | } else if (res.code === 403){ |
| | | |
| | | }else { |
| | |
| | | }); |
| | | |
| | | function tableReload(child) { |
| | | debugger |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | |
| | | } |
| | | |
| | | for (var i in checkData){ |
| | | checkData[i].type = 'sellOut'; |
| | | checkData[i].orderNo = $('#orderNoV').val(); |
| | | checkData[i].customer = $('#customer').val(); |
| | | checkData[i].phone = $('#phone').val(); |
| | |
| | | <form id="detail" class="layui-form" style="text-align: center"> |
| | | |
| | | <div class="layui-inline" style="width:80%;"> |
| | | <label class="layui-form-label"><span class="not-null">*</span>换包装:</label> |
| | | <label class="layui-form-label">换包装:</label> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="packageType" class="layui-input" type="text" style="display: none" lay-verify="required"> |
| | | <input id="packageType" class="layui-input" type="text" style="display: none"> |
| | | <input id="packageTypeV" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="configTypeQueryByPackageType" data-value="packageType" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:80%;"> |
| | | <label class="layui-form-label"><span class="not-null">*</span>换托盘:</label> |
| | | <label class="layui-form-label">换托盘:</label> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="zpalletType" class="layui-input" type="text" style="display: none" lay-verify="required"> |
| | | <input id="zpalletType" class="layui-input" type="text" style="display: none"> |
| | | <input id="zpalletTypeV" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="configTypeQueryByzpalletType" data-value="zpalletType" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:80%;"> |
| | | <label class="layui-form-label"><span class="not-null">*</span>缠膜:</label> |
| | | <label class="layui-form-label">缠膜:</label> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="filmWrap" class="layui-input" type="text" style="display: none" lay-verify="required"> |
| | | <input id="filmWrap" class="layui-input" type="text" style="display: none" > |
| | | <input id="filmWrapV" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="configTypeQueryByfilmWrap" data-value="filmWrap" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | |
| | | form.on('submit(save)', function () { |
| | | |
| | | for(var i in checkData){ |
| | | checkData[i].packageType = $('#packageTypeV').val(); |
| | | checkData[i].zpalletType = $('#zpalletTypeV').val(); |
| | | checkData[i].filmWrap = $('#filmWrapV').val(); |
| | | checkData[i].step = 3; |
| | | checkData[i].packageType = $('#packageTypeV').val() ? $('#packageTypeV').val() : checkData[i].packageType; |
| | | checkData[i].zpalletType = $('#zpalletTypeV').val() ? $('#zpalletTypeV').val() : checkData[i].zpalletType; |
| | | checkData[i].filmWrap = $('#filmWrapV').val() ? $('#filmWrapV').val() : checkData[i].filmWrap; |
| | | checkData[i].step = 2; |
| | | } |
| | | |
| | | $.ajax({ |