| | |
| | | // @ManagerAuth |
| | | public void statisExport(HttpServletResponse response) throws IOException { |
| | | List<LocDetl> excel = LocDetlMapper.getStockStatisExcel(); |
| | | for (LocDetl locDetl : excel) { |
| | | Mat mat = matService.selectByMatnr(locDetl.getMatnr()); |
| | | if (mat != null) { |
| | | locDetl.sync(mat); |
| | | } |
| | | } |
| | | // try{ |
| | | // for (LocDetl locDetl : excel) { |
| | | // System.out.println(locDetl.getMatnr()); |
| | | // Mat mat = matService.selectByMatnr(locDetl.getMatnr()); |
| | | // if (mat != null) { |
| | | // locDetl.sync(mat); |
| | | // } |
| | | // } |
| | | // }catch (Exception e){ |
| | | // e.printStackTrace(); |
| | | // } |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setCharacterEncoding("utf-8"); |
| | | String fileName = URLEncoder.encode("库存明细统计报表", "UTF-8"); |
| | |
| | | import com.zy.common.model.enums.WorkNoType; |
| | | import com.zy.common.service.CommonService; |
| | | import com.zy.common.web.BaseController; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | * 移动端接口控制器 |
| | | * Created by vincent on 2020/6/10 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("mobile") |
| | | public class MobileController extends BaseController { |
| | |
| | | |
| | | @RequestMapping("/comb/auth") |
| | | @ManagerAuth(memo = "组托") |
| | | public R comb(@RequestBody CombParam combParam){ |
| | | public synchronized R comb(@RequestBody CombParam combParam){ |
| | | log.info("comb,{}",JSONObject.toJSON(combParam)); |
| | | mobileService.comb(combParam, getUserId()); |
| | | return R.ok("组托成功"); |
| | | } |
| | | |
| | | @RequestMapping("/comb/auth2") |
| | | @ManagerAuth(memo = "组托") |
| | | public R comb2(@RequestBody CombParam combParam){ |
| | | public synchronized R comb2(@RequestBody CombParam combParam){ |
| | | log.info("comb2,{}",JSONObject.toJSON(combParam)); |
| | | mobileService.comb2(combParam, getUserId()); |
| | | return R.ok("组托成功"); |
| | | } |
| | | |
| | | @RequestMapping("/comb/auth3") |
| | | @ManagerAuth(memo = "组托") |
| | | public R comb3(@RequestBody CombParam combParam){ |
| | | public synchronized R comb3(@RequestBody CombParam combParam){ |
| | | log.info("comb3,{}",JSONObject.toJSON(combParam)); |
| | | mobileService.comb3(combParam, getUserId()); |
| | | return R.ok("组托成功"); |
| | | } |
| | | |
| | | @RequestMapping("/check/fullplt/auth") |
| | | @ManagerAuth(memo = "检测物料是否有未满托托盘") |
| | | public R checkFullplt(@RequestBody CombParam.CombMat combMat){ |
| | | public R checkFullplt(@RequestBody CombParam.CombMat combMat){ |
| | | List<LocMast> locMasts = mobileService.checkFullplt(combMat, getUserId()); |
| | | return R.ok().add(locMasts); |
| | | } |
| | |
| | | private String orderNo; |
| | | |
| | | @ApiModelProperty(value= "规格") |
| | | @ExcelProperty("规格") |
| | | private String specs; |
| | | |
| | | @ApiModelProperty(value= "型号") |
| | |
| | | case 0: |
| | | return "未知"; |
| | | case 1: |
| | | return "低库位"; |
| | | return "重库位"; |
| | | case 2: |
| | | return "高库位"; |
| | | return "轻库位"; |
| | | default: |
| | | return String.valueOf(this.locType1); |
| | | } |
| | |
| | | } |
| | | HashMap<String,Object> cM=new HashMap<>(); |
| | | for (CombParam.CombMat combMat : param.getCombMats()) { |
| | | if (cM.get(combMat.getMatnr()+combMat.getBatch())==null){ |
| | | cM.put(combMat.getMatnr()+combMat.getBatch(),combMat); |
| | | if (cM.get(combMat.getMatnr())==null){ |
| | | cM.put(combMat.getMatnr(),combMat); |
| | | }else { |
| | | throw new CoolException("组托数据中存在重复的数据===>>编码:" + combMat.getMatnr()+"批号:"+combMat.getBatch()); |
| | | } |
| | |
| | | } |
| | | HashMap<String,Object> cM=new HashMap<>(); |
| | | for (CombParam.CombMat combMat : param.getCombMats()) { |
| | | if (cM.get(combMat.getMatnr()+combMat.getBatch())==null){ |
| | | cM.put(combMat.getMatnr()+combMat.getBatch(),combMat); |
| | | if (cM.get(combMat.getMatnr())==null){ |
| | | cM.put(combMat.getMatnr(),combMat); |
| | | }else { |
| | | throw new CoolException("组托数据中存在重复的数据===>>编码:" + combMat.getMatnr()+"批号:"+combMat.getBatch()); |
| | | } |
| | |
| | | } |
| | | HashMap<String,Object> cM=new HashMap<>(); |
| | | for (CombParam.CombMat combMat : param.getCombMats()) { |
| | | if (cM.get(combMat.getMatnr()+combMat.getBatch())==null){ |
| | | cM.put(combMat.getMatnr()+combMat.getBatch(),combMat); |
| | | if (cM.get(combMat.getMatnr())==null){ |
| | | cM.put(combMat.getMatnr(),combMat); |
| | | }else { |
| | | throw new CoolException("组托数据中存在重复的数据===>>编码:" + combMat.getMatnr()+"批号:"+combMat.getBatch()); |
| | | } |
| | |
| | | |
| | | List<WrkDetl> wrkDetls = param.getWrkDetls(); |
| | | for (WrkDetl wrkDetl : wrkDetls) { |
| | | if (wrkDetl.getAnfme()<=0){ |
| | | continue; |
| | | } |
| | | wrkDetl.setWrkNo(wrkMast.getWrkNo()); |
| | | wrkDetl.setZpallet(param.getBarcode()); |
| | | wrkDetl.setMatnr("B"+wrkDetl.getMatnr()); |
| | |
| | | } |
| | | } |
| | | |
| | | @Scheduled(cron = "0/1 * * * * ? ") |
| | | @Scheduled(cron = "0/50 * * * * ? ") |
| | | @Async("orderThreadPool") |
| | | public void completeAndReport(){ |
| | | if (!erpEnable) return; |
| | |
| | | return FAIL.setMsg("拣料入库 ===>> 修改库存明细数量失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); |
| | | } |
| | | } else { |
| | | if (Math.abs(wrkDetl.getAnfme())<=0){ |
| | | continue; |
| | | } |
| | | LocDetl detl = new LocDetl(); |
| | | |
| | | // Mat mat = matService.selectByMatnr(wrkDetl.getMatnr()); |
| | |
| | | } |
| | | } |
| | | if (Cools.isEmpty(locMast)) { |
| | | // sql上去掉row排条件 |
| | | locMast = locMastService.queryFreeLocMast(curRow, locTypeDto.getLocType1()); |
| | | // 因库位移转、需预留空库位 |
| | | if (!locMastService.checkEmptyCount(locMast)) { |
| | |
| | | select |
| | | ROW_NUMBER() over (order by sum(a.anfme) desc) as row |
| | | , a.matnr |
| | | , min(a.maktx) as maktx |
| | | , min(a.specs) as specs |
| | | , sum(a.anfme) as anfme |
| | | from asr_loc_detl a |
| | | where 1=1 |
| | |
| | | <select id="queryFreeLocMast" resultMap="BaseResultMap"> |
| | | select top 1 * |
| | | from asr_loc_mast |
| | | where row1=#{row} |
| | | and loc_sts='O' |
| | | where loc_sts='O' |
| | | <if test="locType1 != null"> |
| | | and loc_type1 = #{locType1} |
| | | </if> |
| | |
| | | // ,{field: 'barcode', align: 'center',title: ''} |
| | | // ,{field: 'PdcType', align: 'center',title: ''} |
| | | // ,{field: 'ctnNo', align: 'center',title: ''} |
| | | ,{field: 'locType1$', align: 'center',title: '高低类型'} |
| | | ,{field: 'locType1$', align: 'center',title: '类型'} |
| | | // ,{field: 'locType2$', align: 'center',title: '宽窄类型'} |
| | | // ,{field: 'locType3$', align: 'center',title: '轻重类型'} |
| | | |
| | |
| | | html += "disabled='disabled' >"; |
| | | return html; |
| | | },width:80} |
| | | ,{field: 'locType1$', align: 'center',title: '类型'} |
| | | ,{field: 'barcode', align: 'center',title: '条码号'} |
| | | ,{field: 'modiUser$', align: 'center',title: '修改人员'} |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间', width: 180} |
| | |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/locMast/locMast.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/locMast/locMast.js?v=1" charset="utf-8"></script> |
| | | <iframe id="detail-iframe" scrolling="auto" style="display:none;"></iframe> |
| | | |
| | | <!-- 重置库位弹窗 --> |
| | |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="barcode" placeholder="托盘码" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | </div> <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <select name="loc_type1"> |
| | | <option style="display: none"></option> |
| | | <option value="2">轻库位</option> |
| | | <option value="1">重库位</option> |
| | | </select> |
| | | </div></div> |
| | | <!-- 日期范围 --> |
| | | <div class="layui-inline" style="width: 300px"> |
| | | <div class="layui-input-inline"> |