| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.InOut; |
| | | import com.zy.asrs.entity.LocDetl; |
| | | import com.zy.asrs.entity.WaitPakin; |
| | | import com.zy.asrs.service.InOutService; |
| | | import com.zy.common.web.BaseController; |
| | | 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.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/matInOut/export/auth") |
| | | @ManagerAuth(memo = "商品信息导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<InOut> wrapper = new EntityWrapper<>(); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("inOut")); |
| | | convert(map, wrapper); |
| | | List<InOut> list = inOutService.selectList(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | } |
| | |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.EmptyPlateOutParam; |
| | | import com.zy.asrs.entity.result.KeyValueVo; |
| | | import com.zy.asrs.service.InOutService; |
| | | import com.zy.asrs.service.MatBarcodeService; |
| | | import com.zy.asrs.service.MatService; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.utils.MatExcelListener; |
| | | import com.zy.common.CodeRes; |
| | | import com.zy.common.config.AdminInterceptor; |
| | |
| | | private InOutService inOutService; |
| | | @Autowired |
| | | private MatBarcodeService matBarcodeService; |
| | | @Autowired |
| | | private WaitPakinService waitPakinService; |
| | | @Autowired |
| | | private LocDetlService locDetlService; |
| | | @Autowired |
| | | private WrkDetlService wrkDetlService; |
| | | |
| | | @RequestMapping(value = "/mat/auto/matnr/auth") |
| | | public R autoMatnr(){ |
| | |
| | | return R.error(); |
| | | } |
| | | for (Mat entity : list){ |
| | | if (!matService.delete(new EntityWrapper<>(entity))) { |
| | | throw new CoolException("删除失败,请联系管理员"); |
| | | Integer locCount = locDetlService.selectCountByMatNr(entity.getMatnr()); |
| | | Integer waitCount = waitPakinService.selectCountByMatNr(entity.getMatnr()); |
| | | Integer wrkCount = wrkDetlService.selectCountByMatNr(entity.getMatnr()); |
| | | InOut inOut = inOutService.selectByMatnr(entity.getMatnr()); |
| | | if (locCount > 0 || waitCount > 0 || wrkCount >0){ |
| | | throw new CoolException(entity.getMatnr() + "模具库存/组托/工作档数据已存在,不能删除"); |
| | | }else { |
| | | if (!matService.delete(new EntityWrapper<>(entity)) && !inOutService.delete(new EntityWrapper<>(inOut))) { |
| | | throw new CoolException("删除商品档案/商品信息失败,请联系管理员"); |
| | | } |
| | | } |
| | | |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | private String barcode; |
| | | |
| | | /** |
| | | * 托盘条码 |
| | | */ |
| | | @TableField("brand") |
| | | private String brand; |
| | | |
| | | /** |
| | | * 生产日期 |
| | | */ |
| | | @TableField("manu_date") |
| | |
| | | List<StockStatisDTO> asrsAndErpList(Map<String, Object> condition); |
| | | |
| | | long asrsAndErpCount(Map<String, Object> condition); |
| | | |
| | | @Select("select count(*) from asr_loc_detl where matnr = #{matnr};") |
| | | Integer selectCountByMatNr(String matnr); |
| | | } |
| | |
| | | import com.zy.asrs.entity.WaitPakin; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface WaitPakinMapper extends BaseMapper<WaitPakin> { |
| | | |
| | | @Select("select count(*) from cust_wait_pakin where matnr = #{matnr};") |
| | | Integer selectCountByMatNr(String matnr); |
| | | } |
| | |
| | | import com.zy.asrs.entity.param.PickInParam; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.Date; |
| | |
| | | |
| | | int updateIoTimeWms(@Param("workNo") Integer workNo, @Param("ioTime") Date ioTime); |
| | | List<PickInParam> selectDetByBarcode(@Param("barcode") String barcode); |
| | | |
| | | @Select("select count(*) from asr_wrk_detl where matnr = #{matnr};") |
| | | Integer selectCountByMatNr(String matnr); |
| | | } |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.zy.asrs.entity.InOut; |
| | | |
| | |
| | | List<Map<String, Object>> selectLocDetlUnilateralMoveShuttleMap(Integer crnNo); |
| | | |
| | | List<LocDetl> selectLocDetlUnilateralMoveShuttle(String matnr, String batch, String grade, Integer crnNo); |
| | | |
| | | Integer selectCountByMatNr(String matnr); |
| | | } |
| | |
| | | public interface WaitPakinService extends IService<WaitPakin> { |
| | | |
| | | void comb(List<MatBarcode> list); |
| | | |
| | | Integer selectCountByMatNr(String matnr); |
| | | } |
| | |
| | | boolean updateIoTimeWms(Integer wrkNo, Date now); |
| | | |
| | | List<PickInParam> selectDetByBarcode(String barcode); |
| | | |
| | | Integer selectCountByMatNr(String matnr); |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Integer selectCountByMatNr(String matnr) { |
| | | return this.baseMapper.selectCountByMatNr(matnr); |
| | | } |
| | | |
| | | @Override |
| | | public LocDetl selectItem(String locNo, WrkDetl wrkDetl) { |
| | | List<LocDetl> locDetls = this.baseMapper.selectItem3(locNo, wrkDetl.getMatnr()); |
| | | if (locDetls != null) { |
| | |
| | | mb.setMatnr(mat.getMatnr()); |
| | | mb.setMaktx(mat.getMaktx()); |
| | | mb.setSpecs(mat.getSpecs()); |
| | | mb.setModel(mat.getModel()); |
| | | mb.setModel(mat.getName()); |
| | | if (!matBarcodeService.insert(mb)){ |
| | | throw new CoolException("物料托盘绑定失败"); |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public Integer selectCountByMatNr(String matnr) { |
| | | return this.baseMapper.selectCountByMatNr(matnr); |
| | | } |
| | | } |
| | |
| | | public List<PickInParam> selectDetByBarcode(String barcode){ |
| | | return this.baseMapper.selectDetByBarcode(barcode); |
| | | } |
| | | |
| | | @Override |
| | | public Integer selectCountByMatNr(String matnr) { |
| | | return this.baseMapper.selectCountByMatNr(matnr); |
| | | } |
| | | } |
| | |
| | | private OrderDetlService orderDetlService; |
| | | @Autowired |
| | | private InOutService inOutService; |
| | | @Autowired |
| | | private MatService matService; |
| | | |
| | | public ReturnT<String> start(WrkMast wrkMast) { |
| | | // 4.入库完成 |
| | |
| | | locDetl.setModel(wrkDetl.getModel()); |
| | | |
| | | InOut inOut=inOutService.selectByMatnr(wrkDetl.getMatnr()); |
| | | Mat mat = matService.selectByMatnr(wrkDetl.getMatnr()); |
| | | if (inOut != null){ |
| | | inOut.setTemp1("在库"); |
| | | inOut.setTemp1("在库");//属性 是否在库 |
| | | inOut.setBrand(wrkDetl.getBarcode());//托盘条码 |
| | | inOut.setTemp2(mat.getName());//套号 |
| | | inOut.setTemp3(wrkMast.getLocNo());//库位号 |
| | | // inOut.setModiTime(now.toString()); |
| | | } |
| | | if (!inOutService.updateById(inOut)){ |
| | |
| | | |
| | | InOut inOut=inOutService.selectByMatnr(wrkDetl.getMatnr()); |
| | | if (inOut != null){ |
| | | inOut.setTemp1("不在库"); |
| | | inOut.setTemp1("不在库");//属性 是否在库 |
| | | inOut.setBrand("");//托盘条码 |
| | | inOut.setTemp3(""); |
| | | // inOut.setModiTime(now.toString()); |
| | | } |
| | | if (!inOutService.updateById(inOut)){ |
| | |
| | | |
| | | InOut inOut=inOutService.selectByMatnr(wrkDetl.getMatnr()); |
| | | if (inOut != null){ |
| | | inOut.setTemp1("在库"); |
| | | inOut.setTemp1("在库");//属性 是否在库 |
| | | inOut.setBrand(wrkDetl.getBarcode());//托盘条码 |
| | | inOut.setTemp3(wrkMast.getLocNo());//库位号 |
| | | // inOut.setModiTime(now.toString()); |
| | | } |
| | | if (!inOutService.updateById(inOut)){ |
| | |
| | | for (WrkDetl wrkDetl : wrkDetls101) { |
| | | InOut inOut=inOutService.selectByMatnr(wrkDetl.getMatnr()); |
| | | if (inOut != null){ |
| | | inOut.setTemp1("不在库"); |
| | | inOut.setTemp1("不在库");//属性 是否在库 |
| | | inOut.setBrand("");//托盘条码 |
| | | inOut.setTemp3("");//库位号 |
| | | // inOut.setModiTime(now.toString()); |
| | | } |
| | | if (!inOutService.updateById(inOut)){ |
| | |
| | | ,{field: 'length', align: 'center',title: '单箱毛重', hide: true} |
| | | ,{field: 'volume', align: 'center',title: '单箱体积', hide: true} |
| | | ,{field: 'threeCode', align: 'center',title: '箱子尺寸', hide: true} |
| | | ,{field: 'price', align: 'center',title: '可放长度(mm)', hide:false } |
| | | ,{field: 'price', align: 'center',title: '可放厚度(mm)', hide:false } |
| | | ,{field: 'suppCode', align: 'center',title: '供应商编码', hide: true} |
| | | ,{field: 'beBatch$', align: 'center',title: '是否批次', hide: true} |
| | | ,{field: 'deadTime', align: 'center',title: '保质期', hide: true} |
| | |
| | | var pageCurr; |
| | | function getCol() { |
| | | var cols = [ |
| | | {field: 'locNo$', align: 'center',title: '库位号', hide: true} |
| | | {field: 'locNo$', align: 'center',title: '库位号', hide: false} |
| | | ,{field: 'storeDate', align: 'center',title: '库龄(天)', sort:true, hide: true} |
| | | ,{field: 'matnr', align: 'center',title: '商品模具名称', sort:true} |
| | | ,{field: 'model', align: 'center',title: '代码', hide: true} |
| | |
| | | ,{field: 'zpallet', align: 'center',title: '托盘条码',hide: true} |
| | | ,{field: 'specs', align: 'center',title: '规格'} |
| | | ,{field: 'color', align: 'center',title: '颜色', hide: true} |
| | | ,{field: 'brand', align: 'center',title: '品牌', hide: true} |
| | | ,{field: 'brand', align: 'center',title: '托盘条码', hide: false} |
| | | ,{field: 'unit', align: 'center',title: '单位', hide: false} |
| | | ,{field: 'price', align: 'center',title: '单价', hide: true} |
| | | ,{field: 'color', align: 'center',title: '状态', hide: false} |
| | |
| | | ,{field: 'check$', align: 'center',title: '要求检验', hide: true} |
| | | ,{field: 'danger$', align: 'center',title: '危险品', hide: true} |
| | | ,{field: 'temp1', align: 'center',title: '属性', hide: false} |
| | | ,{field: 'temp1', align: 'center',title: '名称总称', hide: true} |
| | | ,{field: 'temp2', align: 'center',title: '客户图号', hide: true} |
| | | ,{field: 'temp2', align: 'center',title: '套号', hide: false} |
| | | ,{field: 'temp3', align: 'center',title: '库位号', hide: false} |
| | | |
| | | ]; |
| | | |
| | |
| | | }; |
| | | var loadIndex = layer.msg('正在导出...', {icon: 16, shade: 0.01, time: false}); |
| | | $.ajax({ |
| | | url: baseUrl+"/locDetl/export/auth", |
| | | url: baseUrl+"/matInOut/export/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType:'json', |
| | |
| | | <input class="layui-input" type="text" name="specs" placeholder="规格" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="model" placeholder="套号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <!-- 日期范围 --> |
| | | <!-- <div class="layui-inline" style="width: 300px">--> |
| | | <!-- <div class="layui-input-inline">--> |
| | |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-sm" id="btn-wrk" lay-event="addWrk">解绑</button> |
| | | <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">绑定</button> |
| | | <!-- <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">绑定</button>--> |
| | | <button class="layui-btn layui-btn-sm" id="btn-delete" lay-event="deleteData">组托</button> |
| | | <button class="layui-btn layui-btn-sm" id="btn-clamp" lay-event="clampData">并板</button> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" style="">导出</button> |
| | |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="price" placeholder="可放长度" autocomplete="off"> |
| | | <input class="layui-input" type="text" name="price" placeholder="可放厚度" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <!-- 日期范围 --> |
| | |
| | | <!-- </div>--> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="matnr" placeholder="商品编号" autocomplete="off"> |
| | | <input class="layui-input" type="text" name="matnr" placeholder="商品模具名称" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="temp2" placeholder="套号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="brand" placeholder="托盘条码" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <select name="temp1" id="temp1" class="layui-input" type="text" placeholder="属性" autocomplete="off"> |
| | | <!-- <option style="display: none"></option>--> |
| | | <option value="">属性</option> |