|
@ -5262,7 +5262,7 @@ public class MedicinedeviceService extends BaseJpaService<Mediicinedevice, Medi
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public JSONObject getFirstPageInfo(String userId) throws Exception {
|
|
|
public JSONObject getFirstPageInfo(String belongCommunity, String userId) throws Exception {
|
|
|
JSONObject result = new JSONObject();
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
String condition = "";
|
|
@ -5329,6 +5329,10 @@ public class MedicinedeviceService extends BaseJpaService<Mediicinedevice, Medi
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
//选择单个社区
|
|
|
if (belongCommunity != null && !StringUtils.isEmpty(belongCommunity)) {
|
|
|
belongCommunitys = belongCommunity;
|
|
|
}
|
|
|
if (!StringUtils.isEmpty(belongCommunitys)) {
|
|
|
conditionSql += "AND ',"+ belongCommunitys +",' LIKE CONCAT('%,',d.belong_community,',%')\n";
|
|
|
orderConditionSql += "AND ',"+ belongCommunitys +",' LIKE CONCAT('%,',d.belong_community,',%')\n";
|
|
@ -5410,11 +5414,11 @@ public class MedicinedeviceService extends BaseJpaService<Mediicinedevice, Medi
|
|
|
|
|
|
jsonObject.put("maintain", maintain);
|
|
|
|
|
|
jsonObject.put("prescriptionStatics", getPrescriptionStaticsByUserId(userId, 1));
|
|
|
jsonObject.put("prescriptionStatics", getPrescriptionStaticsByUserId(belongCommunity, userId, 1));
|
|
|
//非设备管理员
|
|
|
if (!"replenisher".equals(role.getCode())) {
|
|
|
jsonObject.put("devicePriceStatistics", getDevicePriceStatisticsByUserId(userId, 1));
|
|
|
jsonObject.put("shippingType", getShippingTypeByUserId(userId, 1));
|
|
|
jsonObject.put("devicePriceStatistics", getDevicePriceStatisticsByUserId(belongCommunity, userId, 1));
|
|
|
jsonObject.put("shippingType", getShippingTypeByUserId(belongCommunity, userId, 1));
|
|
|
}
|
|
|
result.put("response",ConstantUtils.SUCCESS);
|
|
|
result.put("msg", jsonObject);
|
|
@ -5428,7 +5432,7 @@ public class MedicinedeviceService extends BaseJpaService<Mediicinedevice, Medi
|
|
|
* @param userId
|
|
|
* @return
|
|
|
*/
|
|
|
public JSONObject getDevicePriceStatisticsByUserId(String userId,Integer day){
|
|
|
public JSONObject getDevicePriceStatisticsByUserId(String belongCommunity, String userId,Integer day){
|
|
|
JSONObject object = new JSONObject();
|
|
|
String condition = "";
|
|
|
|
|
@ -5486,6 +5490,9 @@ public class MedicinedeviceService extends BaseJpaService<Mediicinedevice, Medi
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if (belongCommunity != null && !StringUtils.isEmpty(belongCommunity)) {
|
|
|
belongCommunitys = belongCommunity;
|
|
|
}
|
|
|
if (!StringUtils.isEmpty(belongCommunitys)) {
|
|
|
condition += "AND ',"+ belongCommunitys +",' LIKE CONCAT('%,',o.belong_community,',%')\n";
|
|
|
}
|
|
@ -5561,7 +5568,7 @@ public class MedicinedeviceService extends BaseJpaService<Mediicinedevice, Medi
|
|
|
* @param userId
|
|
|
* @return
|
|
|
*/
|
|
|
public JSONObject getShippingTypeByUserId(String userId,Integer day){
|
|
|
public JSONObject getShippingTypeByUserId(String belongCommunity, String userId,Integer day){
|
|
|
JSONObject object = new JSONObject();
|
|
|
String condition = "";
|
|
|
|
|
@ -5619,6 +5626,9 @@ public class MedicinedeviceService extends BaseJpaService<Mediicinedevice, Medi
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if (belongCommunity != null && !StringUtils.isEmpty(belongCommunity)) {
|
|
|
belongCommunitys = belongCommunity;
|
|
|
}
|
|
|
if (!StringUtils.isEmpty(belongCommunitys)) {
|
|
|
condition += "AND ',"+ belongCommunitys +",' LIKE CONCAT('%,',o.belong_community,',%')\n";
|
|
|
}
|
|
@ -5678,7 +5688,7 @@ public class MedicinedeviceService extends BaseJpaService<Mediicinedevice, Medi
|
|
|
* @param day
|
|
|
* @return
|
|
|
*/
|
|
|
public JSONObject getPrescriptionStaticsByUserId(String userId,Integer day){
|
|
|
public JSONObject getPrescriptionStaticsByUserId(String belongCommunity, String userId,Integer day){
|
|
|
JSONObject object = new JSONObject();
|
|
|
String condition = "";
|
|
|
UserDO user = userDao.findOne(userId);
|
|
@ -5737,6 +5747,9 @@ public class MedicinedeviceService extends BaseJpaService<Mediicinedevice, Medi
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if (belongCommunity != null && !StringUtils.isEmpty(belongCommunity)) {
|
|
|
belongCommunitys = belongCommunity;
|
|
|
}
|
|
|
if (!StringUtils.isEmpty(belongCommunitys)) {
|
|
|
condition += "AND ',"+ belongCommunitys +",' LIKE CONCAT('%,',o.belong_community,',%')\n";
|
|
|
}
|