| | |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | |
| | | int insert = erpSqlServer.insert(OutDetTB.class, content); |
| | | |
| | | if (insert == 1) { |
| | | log.info("入库单表身回传成功:" + content.toString()); |
| | | log.info("出库单表身回传成功:" + content.toString()); |
| | | return true; |
| | | } else { |
| | | log.error("入库回传失败,实体类打印:" + content.toString()); |
| | | log.error("出库回传失败,实体类打印:" + content.toString()); |
| | | throw new CoolException("服务器内部错误,请联系管理员"); |
| | | } |
| | | |
| | |
| | | */ |
| | | @Transactional(rollbackFor = Throwable.class) |
| | | public boolean insertOutHed(Order order) { |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | |
| | | String sqlInHedTb = "select * from lk_OutHedTB where LKName='高霖立库' and BillNo='" + order.getOrderNo() + "'"; |
| | | List<OutHedTB> outHeds = erpSqlServer.select(sqlInHedTb, OutHedTB.class); |
| | | String sqlInHedTbBak = "select * from lk_OutHedTB_Bak where LKName='高霖立库' and BillNo='" + order.getOrderNo() + "'"; |
| | |
| | | if (!Cools.isEmpty(docType.getDocName())) content.put("IoKindName", "'" + docType.getDocName() + "'"); |
| | | if (!Cools.isEmpty(order.getWareId())) content.put("WareId", "'" + order.getWareId() + "'"); |
| | | if (!Cools.isEmpty(order.getWareName())) content.put("WareName", "'" + order.getWareName() + "'"); |
| | | if (!Cools.isEmpty(order.getUpdateTime())) content.put("MakeDate", "'" + order.getUpdateTime() + "'"); |
| | | if (!Cools.isEmpty(order.getUpdateTime())) content.put("MakeDate", "'" + sdf.format(order.getUpdateTime()) + "'"); |
| | | if (!Cools.isEmpty(order.getTemp1())) content.put("Temp1", "'" + order.getTemp1() + "'"); |
| | | if (!Cools.isEmpty(order.getTemp2())) content.put("Temp2", "'" + order.getTemp2() + "'"); |
| | | if (!Cools.isEmpty(order.getTemp3())) content.put("Temp3", "'" + order.getTemp3() + "'"); |
| | |
| | | if (!Cools.isEmpty(order.getMemo())) content.put("Remark", "'" + order.getMemo() + "'"); |
| | | content.put("LKName", "'高霖立库'"); |
| | | content.put("bPass", "1"); |
| | | System.out.println("插入内容:" + content); |
| | | int insert = erpSqlServer.insert(OutHedTB.class, content); |
| | | if (insert == 1) { |
| | | log.info("入库单表头回传成功:" + content); |