|
@ -1239,6 +1239,7 @@ public class MedicineOrderService extends BaseJpaService<Mediicineorder, Mediici
|
|
result.put("response", ConstantUtils.FAIL);
|
|
result.put("response", ConstantUtils.FAIL);
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
|
|
Mediicinedevice mediicinedevice = deviceDao.findMediicinedeviceByEquNum(deviceId);
|
|
Mediicineorder mediicineorder = null;
|
|
Mediicineorder mediicineorder = null;
|
|
//订单列表
|
|
//订单列表
|
|
List<Mediicineorder> orders = new ArrayList<>();
|
|
List<Mediicineorder> orders = new ArrayList<>();
|
|
@ -1261,6 +1262,11 @@ public class MedicineOrderService extends BaseJpaService<Mediicineorder, Mediici
|
|
for (Mediicineorder order : orders) {
|
|
for (Mediicineorder order : orders) {
|
|
Map<String, Object> map = new HashMap<>();
|
|
Map<String, Object> map = new HashMap<>();
|
|
DmHospitalDO dmHospitalDO = hospitalDao.findByCode(order.getBelongCommunity());
|
|
DmHospitalDO dmHospitalDO = hospitalDao.findByCode(order.getBelongCommunity());
|
|
|
|
if (!mediicinedevice.getBelongCommunity().equals(order.getBelongCommunity())) {
|
|
|
|
result.put("msg", "order doesn't exist");
|
|
|
|
result.put("response", ConstantUtils.FAIL);
|
|
|
|
return result;
|
|
|
|
}
|
|
map.put("orderId", order.getId());
|
|
map.put("orderId", order.getId());
|
|
map.put("prescribeNum", order.getPrescribeNum());
|
|
map.put("prescribeNum", order.getPrescribeNum());
|
|
map.put("community", dmHospitalDO == null ? "" : dmHospitalDO.getName());
|
|
map.put("community", dmHospitalDO == null ? "" : dmHospitalDO.getName());
|
|
@ -1303,7 +1309,7 @@ public class MedicineOrderService extends BaseJpaService<Mediicineorder, Mediici
|
|
"FROM\n" +
|
|
"FROM\n" +
|
|
"\tt_medicine_shipment_log AS t\n" +
|
|
"\tt_medicine_shipment_log AS t\n" +
|
|
"WHERE \n" +
|
|
"WHERE \n" +
|
|
"\tt.order_id = '" + mediicineorder.getId() + "'";
|
|
|
|
|
|
"\tt.order_id = '" + order.getId() + "'";
|
|
List<Map<String, Object>> tempList = hibenateUtils.createSQLQuery(tempSql);
|
|
List<Map<String, Object>> tempList = hibenateUtils.createSQLQuery(tempSql);
|
|
map.put("drugList", tempList);
|
|
map.put("drugList", tempList);
|
|
orderList.add(map);
|
|
orderList.add(map);
|
|
@ -1389,7 +1395,7 @@ public class MedicineOrderService extends BaseJpaService<Mediicineorder, Mediici
|
|
"FROM\n" +
|
|
"FROM\n" +
|
|
"\tt_medicine_shipment_log AS t\n" +
|
|
"\tt_medicine_shipment_log AS t\n" +
|
|
"WHERE \n" +
|
|
"WHERE \n" +
|
|
"\tt.order_id = '" + mediicineorder.getId() + "'";
|
|
|
|
|
|
"\tt.order_id = '" + order.getId() + "'";
|
|
List<Map<String, Object>> tempList = hibenateUtils.createSQLQuery(tempSql);
|
|
List<Map<String, Object>> tempList = hibenateUtils.createSQLQuery(tempSql);
|
|
map.put("drugList", tempList);
|
|
map.put("drugList", tempList);
|
|
orderList.add(map);
|
|
orderList.add(map);
|
|
@ -1420,7 +1426,7 @@ public class MedicineOrderService extends BaseJpaService<Mediicineorder, Mediici
|
|
"AND ( t.state = '1' or t.state = '21')\n" +
|
|
"AND ( t.state = '1' or t.state = '21')\n" +
|
|
"and t.qty > 0"
|
|
"and t.qty > 0"
|
|
);
|
|
);
|
|
Mediicinedevice mediicinedevice = deviceDao.findMediicinedeviceByEquNum(deviceId);
|
|
|
|
|
|
// Mediicinedevice mediicinedevice = deviceDao.findMediicinedeviceByEquNum(deviceId);
|
|
for (int i = 0; i < qty; i++) {
|
|
for (int i = 0; i < qty; i++) {
|
|
for (Map<String, Object> objectMap : tempList) {
|
|
for (Map<String, Object> objectMap : tempList) {
|
|
if (Integer.parseInt(String.valueOf(objectMap.get("qty"))) > 0) {
|
|
if (Integer.parseInt(String.valueOf(objectMap.get("qty"))) > 0) {
|