|
@ -486,6 +486,7 @@ public class MedicinedeviceService extends BaseJpaService<Mediicinedevice, Medi
|
|
|
if(networkStatus.equalsIgnoreCase("0")){
|
|
|
mediicinedevice.setSaleStatus("2");
|
|
|
mediicinewarray.setType("网络离线");
|
|
|
medicineOrderService.wdOrSdSendMessage(mediicinedevice.getBelongCommunity(),mediicinedevice.getEquName(),2);
|
|
|
}else {
|
|
|
mediicinewarray.setType("网络在线");
|
|
|
mediicinedevice.setSaleStatus("1");
|
|
@ -2151,6 +2152,23 @@ public class MedicinedeviceService extends BaseJpaService<Mediicinedevice, Medi
|
|
|
stringObjectMap.put("cardStatusName", "未知");
|
|
|
}
|
|
|
}
|
|
|
String tempSql = "SELECT\n" +
|
|
|
"\tifnull(sum(t.qty), 0) AS qty\n" +
|
|
|
"FROM\n" +
|
|
|
"\tt_mediicinecabinet_inventory t\n" +
|
|
|
"WHERE\n" +
|
|
|
"\tt.id_device = '"+ stringObjectMap.get("id") + "" +"'\n" +
|
|
|
"AND (t.state = '1' OR t.state = '21')\n" +
|
|
|
"AND t.shelf_status = '1'";
|
|
|
Map<String, Object> tempMap = jdbcTemplate.queryForMap(tempSql);
|
|
|
int inStock = 0;
|
|
|
if (tempMap != null) {
|
|
|
if (tempMap.get("qty") != null) {
|
|
|
inStock = (int) Double.parseDouble(tempMap.get("qty") + "");
|
|
|
}
|
|
|
}
|
|
|
//在架库存数
|
|
|
stringObjectMap.put("shangPinKuCun", inStock);
|
|
|
|
|
|
}
|
|
|
result.put("response", ConstantUtils.SUCCESS);
|