| | |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.LocRule; |
| | | import com.zy.asrs.service.LocMastService; |
| | | import com.zy.asrs.service.LocRuleService; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | @Autowired |
| | | private LocRuleService locRuleService; |
| | | @Autowired |
| | | private LocMastService locMastService; |
| | | |
| | | @RequestMapping(value = "/locRule/{id}/auth") |
| | | @ManagerAuth |
| | |
| | | locRule.setCreateTime(now); |
| | | locRule.setUpdateBy(getUserId()); |
| | | locRule.setUpdateTime(now); |
| | | Integer locType2 = 1;//单品区域 |
| | | if (locRule.getMixed() == 1) { |
| | | //混载 |
| | | locRule.setMatnr("00000000"); |
| | | locType2 = 2;//混放区域 |
| | | } |
| | | locRuleService.insert(locRule); |
| | | locMastService.updateLocType2ByRBL(locType2, locRule.getRowBeg(), locRule.getRowEnd(), locRule.getBayBeg(), locRule.getBayEnd(), locRule.getLevBeg(), locRule.getLevEnd()); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | locRule.setUpdateBy(getUserId()); |
| | | locRule.setUpdateTime(new Date()); |
| | | locRuleService.updateById(locRule); |
| | | Integer locType2 = 1;//单品区域 |
| | | if (locRule.getMixed() == 0) { |
| | | locRuleService.updateKeepGoByMatnr(locRule.getMatnr(), locRule.getKeepGo()); |
| | | }else {//混载 |
| | | locRuleService.updateKeepGoByMixed(locRule.getKeepGo()); |
| | | locType2 = 2;//混放区域 |
| | | } |
| | | locMastService.updateLocType2ByRBL(locType2, locRule.getRowBeg(), locRule.getRowEnd(), locRule.getBayBeg(), locRule.getBayEnd(), locRule.getLevBeg(), locRule.getLevEnd()); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | LocRule locRule = locRuleService.selectById(id); |
| | | locMastService.updateLocType2ByRBL(1, locRule.getRowBeg(), locRule.getRowEnd(), locRule.getBayBeg(), locRule.getBayEnd(), locRule.getLevBeg(), locRule.getLevEnd()); |
| | | locRuleService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | List<LocMast> selectEmptyByLocNos(@Param("locNos") List<String> locNos); |
| | | |
| | | Integer updateLocType2ByRBL(Integer locType2, Integer startRow, Integer endRow, Integer startBay, Integer endBay, Integer startLev, Integer endLev); |
| | | |
| | | } |
| | |
| | | |
| | | List<LocMast> selectEmptyByLocNos(List<String> locNos); |
| | | |
| | | Integer updateLocType2ByRBL(Integer locType2, Integer startRow, Integer endRow, Integer startBay, Integer endBay, Integer startLev, Integer endLev); |
| | | |
| | | } |
| | |
| | | public List<LocMast> selectEmptyByLocNos(List<String> locNos) { |
| | | return this.baseMapper.selectEmptyByLocNos(locNos); |
| | | } |
| | | |
| | | @Override |
| | | public Integer updateLocType2ByRBL(Integer locType2, Integer startRow, Integer endRow, Integer startBay, Integer endBay, Integer startLev, Integer endLev) { |
| | | return this.baseMapper.updateLocType2ByRBL(locType2, startRow, endRow, startBay, endBay, startLev, endLev); |
| | | } |
| | | } |
| | |
| | | ORDER BY |
| | | row1 ASC |
| | | </select> |
| | | |
| | | <select id="updateLocType2ByRBL" resultMap="BaseResultMap"> |
| | | update asr_loc_mast set loc_type2 = #{locType2} |
| | | where (row1 >= #{startRow} and row1 <= #{endRow}) |
| | | and (bay1 >= #{startBay} and bay1 <= #{endBay}) |
| | | and (lev1 >= #{startLev} and lev1 <= #{endLev}) |
| | | </select> |
| | | </mapper> |
| | |
| | | ,{field: 'updateTime$', align: 'center',title: '修改时间', hide: true} |
| | | ,{field: 'memo', align: 'center',title: '备注', hide: true} |
| | | ,{field: 'mixed$', align: 'center',title: '混载'} |
| | | ,{field: 'keepGo$', align: 'center',title: '继续搜索'} |
| | | // ,{field: 'keepGo$', align: 'center',title: '继续搜索'} |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120} |
| | | ]], |
| | |
| | | <label class="layui-form-label">混载: </label> |
| | | <div class="layui-input-block"> |
| | | <select name="mixed"> |
| | | <option value="1">是</option> |
| | | <option value="0" selected>否</option> |
| | | <option value="1" selected>是</option> |
| | | <option value="0">否</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <!-- <div class="layui-form-item"> |
| | | <label class="layui-form-label">混载未找到库位继续搜索: </label> |
| | | <div class="layui-input-block"> |
| | | <select name="keepGo"> |
| | |
| | | <option value="0" selected>否</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div>--> |
| | | |
| | | </div> |
| | | |