| | |
| | | @Transactional(rollbackFor = Throwable.class) |
| | | @Scheduled(cron = "${erp.refreshtime}") |
| | | public void InCancelScheduler() { |
| | | //log.info("InCancelScheduler开始了"); |
| | | if (!erpEnabled) return; |
| | | String sqlInCancelTB = "select * from erp_InCancelTB where LKName='中扬二期'"; |
| | | List<InCancelTB> ins = erpSqlServer.select(sqlInCancelTB, InCancelTB.class); |
| | | for (InCancelTB in : ins) { |
| | | System.out.println(in); |
| | | com.zy.third.lk.entity.InCancelTB lkCancel = inMS.tryCancel(in.getBillNo()); |
| | | if (lkCancel != null) { |
| | | HashMap<String, String> condition = new HashMap<>(); |
| | |
| | | List<InHedTB> inHeds = erpSqlServer.select(sqlInHed, InHedTB.class); |
| | | if (!inHeds.isEmpty()) { |
| | | for (InHedTB inHed : inHeds) { |
| | | System.out.println(inHed); |
| | | HashMap<String, String> condition = new HashMap<>(); |
| | | condition.put("BillNo", "'" + inHed.getBillNo() + "'"); |
| | | List<InDetTB> inDetTBS = erpSqlServer.selectList(InDetTB.class, condition); |
| | |
| | | hedAndDet.put("det", inDetTBS); |
| | | boolean result = inMS.createInOrder(inHed, inDetTBS); |
| | | if (result) { |
| | | log.info("入库单据成功,{}", inHed.getBillNo()); |
| | | move(hedAndDet); |
| | | } else { |
| | | String sql = "UPDATE erp_InHedTB SET Temp3 = ‘fault’ WHERE BillNo = '" + inHed.getBillNo() + "'"; |
| | |
| | | List<ItemTB> itemTBS = erpSqlServer.select(sqlItemTB, ItemTB.class); |
| | | if (itemTBS != null && itemTBS.size() > 0) { |
| | | for (ItemTB itemTB : itemTBS) { |
| | | System.out.println(itemTB); |
| | | log.info("新增物料成功,{}", itemTB); |
| | | //00代表新增 |
| | | if (itemTB.getFlag().equals("00")) { |
| | | erpItemService.addToMainDatabase(itemTB); |
| | | } |
| | | //22代表删除 |
| | | if (itemTB.getFlag().equals("22")) { |
| | | log.info("删除物料成功,{}", itemTB); |
| | | erpItemService.deleteFromMainDatabase(itemTB); |
| | | } |
| | | moveToBak(itemTB); |
| | |
| | | String sqlInCancelTB = "select * from erp_OutCancelTB where LKName='中扬二期'"; |
| | | List<OutCancelTB> ins = erpSqlServer.select(sqlInCancelTB, OutCancelTB.class); |
| | | for (OutCancelTB in : ins) { |
| | | System.out.println(in); |
| | | com.zy.third.lk.entity.InCancelTB lkCancel = inMS.tryCancel(in.getBillNo()); |
| | | if (lkCancel != null) { |
| | | HashMap<String, String> condition = new HashMap<>(); |
| | |
| | | List<OutHedTB> inHeds = erpSqlServer.select(sqlInHed, OutHedTB.class); |
| | | if (!inHeds.isEmpty()) { |
| | | for (OutHedTB inHed : inHeds) { |
| | | System.out.println(inHed); |
| | | HashMap<String, String> condition = new HashMap<>(); |
| | | condition.put("BillNo", "'" + inHed.getBillNo() + "'"); |
| | | List<OutDetTB> inDetTBS = erpSqlServer.selectList(OutDetTB.class, condition); |
| | |
| | | hedAndDet.put("det", inDetTBS); |
| | | boolean result = inMS.createOutOrder(inHed, inDetTBS); |
| | | if (result) { |
| | | log.info("出库单据成功,{}", inHed.getBillNo()); |
| | | move(hedAndDet); |
| | | } else { |
| | | String sql = "UPDATE erp_OutHedTB SET Temp3 = ‘fault’ WHERE BillNo = '" + inHed.getBillNo() + "'"; |
| | |
| | | lcid: 2052 |
| | | |
| | | #ERP接口 |
| | | #enabled: true |
| | | enabled: false |
| | | enabled: true |
| | | #enabled: false |
| | | #查看ERP中间表间隔 |
| | | refreshtime: 0/5 * * * * ? |
| | | db: |
| | | driver_class_name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | url: jdbc:sqlserver://192.168.1.147:1433;databasename=XDLinkLK |
| | | username: sa |
| | | password: sa@123 |
| | | url: jdbc:sqlserver://192.168.1.147:1800;databasename=XDLinkLK |
| | | username: XGMLK |
| | | password: xunda0413 |
| | |
| | | <if test="specs!=null and specs!='' "> |
| | | and a.specs like '%' + #{specs} + '%' |
| | | </if> |
| | | |
| | | <if test="sPgNO!=null and sPgNO!='' "> |
| | | and a.pg_no like '%' + #{sPgNO} + '%' |
| | | </if> |
| | | <if test="outOrderNo!=null and outOrderNo!='' "> |
| | | and a.out_order_no like '%' + #{outOrderNo} + '%' |
| | | </if> |
| | | <if test="zpallet!=null and zpallet!='' "> |
| | | and a.zpallet like '%' + #{zpallet} + '%' |
| | | </if> |
| | | </sql> |
| | | |
| | | <select id="getStockOutPage" resultMap="BaseResultMap"> |
| | |
| | | and asrsQty != erpQty |
| | | </if> |
| | | <if test="different != null and different == 0 "> |
| | | and asrsQty = erpQty |
| | | |
| | | </if> |
| | | <if test="matnr != null and matnr != ''"> |
| | | AND matnr like #{matnr} |
| | | AND matnr like '%' + #{matnr}+ '%' |
| | | </if> |
| | | <if test="maktx != null and maktx != ''"> |
| | | AND maktx like #{maktx} |
| | | AND maktx like '%' + #{maktx}+ '%' |
| | | </if> |
| | | <if test="specs != null and specs != ''"> |
| | | AND specs like #{specs} |
| | | AND specs like '%' + #{specs}+ '%' |
| | | </if> |
| | | <if test="sPgNO != null"> |
| | | AND pgNO like #{sPgNO} |
| | | <if test="sPgNO != null and sPgNO != ''"> |
| | | AND pgNO like '%' + #{sPgNO} + '%' |
| | | </if> |
| | | <if test="outOrderNo != null"> |
| | | AND outOrderNo like #{outOrderNo} |
| | | <if test="outOrderNo != null and outOrderNo != ''"> |
| | | AND outOrderNo like '%' + #{outOrderNo} + '%' |
| | | </if> |
| | | ) d ) e WHERE 1=1 and e.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize}) |
| | | </select> |
| | |
| | | {field: 'matnr', title:'产品编码', align: 'center'}, |
| | | {field: 'specs', title:'产品规格', align: 'center'}, |
| | | {field: 'maktx', title:'产品名称', align: 'center'}, |
| | | {field: 'sPgNO', title:'派工单号', align: 'center'}, |
| | | {field: 'pgNO', title:'派工单号', align: 'center'}, |
| | | {field: 'outOrderNo', title:'订单号', align: 'center'}, |
| | | {field: 'batch', title:'批次', align: 'center'} |
| | | ]], |
| | |
| | | </div> |
| | | <div class="layui-inline" style="width: 300px"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input layui-laydate-range" name="query_date" type="text" placeholder="入库起始时间 - 入库终止时间" autocomplete="off" style="width: 300px"> |
| | | <input class="layui-input layui-laydate-range" name="query_date" type="text" placeholder="入库起始时间 - 入库终止时间" autocomplete="off" style="width: 290px"> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="layui-inline">--> |
| | |
| | | </div> |
| | | <div class="layui-inline" style="width: 300px"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input layui-laydate-range" name="query_date" type="text" placeholder="入库起始时间 - 入库终止时间" autocomplete="off" style="width: 300px"> |
| | | <input class="layui-input layui-laydate-range" name="query_date" type="text" placeholder="入库起始时间 - 入库终止时间" autocomplete="off" style="width: 290px"> |
| | | </div> |
| | | </div> |
| | | <div id="data-search-btn" class="layui-btn-container layui-form-item"> |
| | |
| | | </div> |
| | | <div class="layui-inline" style="width: 300px"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input layui-laydate-range" name="query_date" type="text" placeholder="入库起始时间 - 入库终止时间" autocomplete="off" style="width: 300px"> |
| | | <input class="layui-input layui-laydate-range" name="query_date" type="text" placeholder="入库起始时间 - 入库终止时间" autocomplete="off" style="width: 290px"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |