Merge branch 'htwms' of https://gitee.com/luxiaotao1123/wms-cloud into htwms
| | |
| | | public void getOrdersExecute(){ |
| | | try { |
| | | Map<String, Object> json = new HashMap<>(); |
| | | json.put("vchType", 151); |
| | | json.put("vchType", 11); |
| | | String response = new HttpHandler.Builder() |
| | | .setUri(URI) |
| | | .setPath(GET_ORDERS) |
| | |
| | | public void getCancelOrdersExecute(){ |
| | | try { |
| | | Map<String, Object> json = new HashMap<>(); |
| | | json.put("vchType", 151); |
| | | json.put("vchType", 11); |
| | | json.put("flag", 2); |
| | | String response = new HttpHandler.Builder() |
| | | .setUri(URI) |
| | |
| | | existNumbers.add(result0.getNumber()); |
| | | } |
| | | for (String number : existNumbers) { |
| | | if (!orderService.updateSettle(number, 5L)) { |
| | | Order order = orderService.selectByOrderNo(number); |
| | | if (order != null) { |
| | | if (order.getSettle() != 3L && order.getSettle() != 5L) { |
| | | if (!orderService.updateSettle(number, 5L)) { |
| | | // throw new CoolException("修改订单状态失败"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | import com.core.exception.CoolException; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.jdbc.core.JdbcTemplate; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | private OrderService orderService; |
| | | @Autowired |
| | | private PakoutService pakoutService; |
| | | @Autowired |
| | | private JdbcTemplate jdbcTemplate; |
| | | |
| | | /** |
| | | * 订单转历史档处理器 |
| | | */ |
| | | @Transactional |
| | | @Scheduled(cron = "0/10 * * * * ? ") |
| | | public void orderBeLogExecute(){ |
| | | List<Order> orders = orderService.selectList(new EntityWrapper<Order>().in("settle", 3, 6)); |
| | | for (Order order : orders) { |
| | | // 保存订单历史档 |
| | | int saveOrderLog = jdbcTemplate.update("insert into man_order_log select * from man_order where id=" + order.getId()); |
| | | if (saveOrderLog == 0) { |
| | | throw new CoolException("保存订单历史档失败"); |
| | | } |
| | | // 保存订单明细历史档 |
| | | int saveOrderDetlLog = jdbcTemplate.update("insert into man_order_detl_log select * from man_order_detl where order_id=" + order.getId()); |
| | | if (saveOrderDetlLog == 0) { |
| | | throw new CoolException("保存订单历史档失败"); |
| | | } |
| | | // 删除订单 |
| | | int delOrder = jdbcTemplate.update("delete from man_order where id=" + order.getId()); |
| | | if (delOrder == 0) { |
| | | throw new CoolException("删除订单失败"); |
| | | } |
| | | // 删除订单明细 |
| | | int delOrderDetl = jdbcTemplate.update("delete from man_order_detl where order_id=" + order.getId()); |
| | | if (delOrderDetl == 0) { |
| | | throw new CoolException("删除订单明细失败"); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 取消订单处理器 |
| | |
| | | return workService.stockCheckAuditing(checkId, getUserId()); |
| | | } |
| | | |
| | | @RequestMapping("/stock/checks/auditing") |
| | | @ManagerAuth(memo = "盘点记录批量审核") |
| | | public R checksAuditing(@RequestParam(value = "checkIds[]") Long[] checkIds) { |
| | | int success = 0; |
| | | for (Long checkId : checkIds) { |
| | | R r = workService.stockCheckAuditing(checkId, getUserId()); |
| | | if (String.valueOf(r.get("code")).equals("200")) { |
| | | success ++; |
| | | } |
| | | } |
| | | return R.ok("审核成功数量:" + success); |
| | | } |
| | | |
| | | /******************************************************************************************************/ |
| | | |
| | |
| | | /** |
| | | * 状态 1: 正常 0: 禁用 |
| | | */ |
| | | @ApiModelProperty(value= "状态 1: 正常 0: 禁用 ") |
| | | @ApiModelProperty(value= "状态 1: 待审核 2: 已通过 0: 取消 ") |
| | | private Integer status; |
| | | |
| | | /** |
| | |
| | | @Transactional |
| | | public R stockCheckAuditing(Long checkId, Long userId) { |
| | | Check check = checkService.selectById(checkId); |
| | | if (null == check) { |
| | | if (null == check || check.getStatus() != 1) { |
| | | return R.error("盘点记录已失效"); |
| | | } |
| | | Date now = new Date(); |
| | |
| | | endpoint: http://oss-cn-hangzhou.aliyuncs.com |
| | | |
| | | asrs: |
| | | baseUrl: http://192.168.110.56:8080/htwms |
| | | baseUrl: http://localhost:8081/htwms |
| | |
| | | </select> |
| | | |
| | | <select id="getStockByDocType34" resultType="java.lang.Double"> |
| | | select ISNULL(count(anfme),0) as anfme from man_loc_detl where matnr = #{matnr} |
| | | select ISNULL(sum(anfme),0) as anfme from man_loc_detl where matnr = #{matnr} |
| | | -- and doc_id = 34 |
| | | </select> |
| | | |
| | |
| | | table.on('toolbar(check)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id); |
| | | switch(obj.event) { |
| | | // 批量审核 |
| | | case 'batchAuditing': |
| | | var checkIds = checkStatus.data.map(function (d) { |
| | | return d.id; |
| | | }); |
| | | if (checkIds.length === 0) { |
| | | layer.msg('请选择数据', {icon: 3}); |
| | | } else { |
| | | var index = layer.load(1, {shade: [0.1,'#000']}); |
| | | $.ajax({ |
| | | url: baseUrl+"/work/stock/checks/auditing", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {checkIds: checkIds}, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | layer.msg(res.msg, {icon: 1}) |
| | | $(".layui-laypage-btn")[0].click(); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | layer.close(index); |
| | | } |
| | | }); |
| | | } |
| | | break; |
| | | case 'addData': |
| | | layer.open({ |
| | | type: 2, |
| | |
| | | </div> |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <!-- <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">新增</button>--> |
| | | <button class="layui-btn layui-btn-normal" id="btn-add" lay-event="batchAuditing">批量审核</button> |
| | | <button class="layui-btn layui-btn-sm" id="btn-delete" lay-event="deleteData">删除</button> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData">导出</button> |
| | | </div> |