|
@ -124,9 +124,9 @@ public class MedicineOrderEndpoint extends EnvelopRestEndpoint {
|
|
|
@ApiParam(name = "userId", value = "用户id")
|
|
|
@RequestParam(value = "userId", required = true) String userId,
|
|
|
@ApiParam(name = "page", value = "分页大小", required = true, defaultValue = "1")
|
|
|
@RequestParam(value = "page") int page,
|
|
|
@RequestParam(value = "page") Integer page,
|
|
|
@ApiParam(name = "size", value = "页码", required = true, defaultValue = "15")
|
|
|
@RequestParam(value = "size") int size,
|
|
|
@RequestParam(value = "size") Integer size,
|
|
|
@ApiParam(name = "timeSort", value = "时间排序,1升序,-1倒序", required = false)
|
|
|
@RequestParam(value = "timeSort",required = false) String timeSort) throws Exception {
|
|
|
JSONObject result = orderservice.queryOrderListFullInfo(content,orderNum, equNum, contact, startTime, endTime, sellState, orderState,reviewerState, dispensingWindow, community, town,userId,page,size,wechatId,timeSort);
|
|
@ -275,15 +275,38 @@ public class MedicineOrderEndpoint extends EnvelopRestEndpoint {
|
|
|
@ApiOperation(value = "处方订单列表导出" , notes="处方订单列表导出")
|
|
|
@ResponseBody
|
|
|
public void export(
|
|
|
@ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
|
|
|
@RequestParam(value = "fields", required = false) String fields,
|
|
|
@ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
|
|
|
@RequestParam(value = "filters", required = false) String filters,
|
|
|
@ApiParam(name = "sorts", value = "排序,规则参见说明文档")
|
|
|
@RequestParam(value = "sorts", required = false) String sorts,
|
|
|
@ApiParam(name = "content", value = "搜索内容(处方号,联系方式,出货设备,社区名,姓名,取药码")
|
|
|
@RequestParam(value = "content", required = false) String content,
|
|
|
@ApiParam(name = "orderNum", value = "订单号")
|
|
|
@RequestParam(value = "orderNum", required = false) String orderNum,
|
|
|
@ApiParam(name = "equNum", value = "设备号")
|
|
|
@RequestParam(value = "equNum", required = false) String equNum,
|
|
|
@ApiParam(name = "contact", value = "手机号")
|
|
|
@RequestParam(value = "contact", required = false) String contact,
|
|
|
@ApiParam(name = "startTime", value = "开始时间", required = false, defaultValue = "")
|
|
|
@RequestParam(value = "startTime",required = false) String startTime,
|
|
|
@ApiParam(name = "endTime", value = "结束时间", required = false, defaultValue = "")
|
|
|
@RequestParam(value = "endTime",required = false) String endTime,
|
|
|
@ApiParam(name = "sellState", value = "出货状态")
|
|
|
@RequestParam(value = "sellState", required = false) String sellState,
|
|
|
@ApiParam(name = "orderState", value = "订单状态")
|
|
|
@RequestParam(value = "orderState", required = false) String orderState,
|
|
|
@ApiParam(name = "reviewerState", value = "审方状态-1不通过0未审1审核通过")
|
|
|
@RequestParam(value = "reviewerState", required = false) String reviewerState,
|
|
|
@ApiParam(name = "dispensingWindow", value = "取药区域")
|
|
|
@RequestParam(value = "dispensingWindow", required = false) String dispensingWindow,
|
|
|
@ApiParam(name = "community", value = "所属社区")
|
|
|
@RequestParam(value = "community", required = false) String community,
|
|
|
@ApiParam(name = "town", value = "所属区")
|
|
|
@RequestParam(value = "town", required = false) String town,
|
|
|
@ApiParam(name = "userId", value = "用户id")
|
|
|
@RequestParam(value = "userId", required = true) String userId,
|
|
|
@ApiParam(name = "timeSort", value = "时间排序,1升序,-1倒序", required = false)
|
|
|
@RequestParam(value = "timeSort",required = false) String timeSort,
|
|
|
HttpServletResponse response) {
|
|
|
try {
|
|
|
List<Mediicineorder> result = orderservice.search(fields, filters, sorts);
|
|
|
JSONObject jsonObject = orderservice.queryOrderListFullInfo(content,orderNum, equNum, contact, startTime, endTime, sellState, orderState,reviewerState, dispensingWindow, community, town,userId,null,null,wechatId,timeSort);
|
|
|
List<Mediicineorder> result = jsonObject.getJSONArray("msg").toJavaList(Mediicineorder.class);
|
|
|
response.setContentType("octets/stream");
|
|
|
response.setHeader("Content-Disposition", "attachment; filename=" + new String("medicineOrder.xls"));
|
|
|
OutputStream os = response.getOutputStream();
|
|
@ -341,8 +364,8 @@ public class MedicineOrderEndpoint extends EnvelopRestEndpoint {
|
|
|
addCell(sheet, j, 7, DateUtil.dateToStrLong(tmp.getPrescribeTime()));
|
|
|
addCell(sheet, j, 8, DateUtil.dateToStrLong(tmp.getPayTime()));
|
|
|
addCell(sheet, j, 9, tmp.getOrderType());
|
|
|
addCell(sheet, j, 9, tmp.getOrderSource());
|
|
|
addCell(sheet, j, 10, tmp.getInfoAccess());
|
|
|
addCell(sheet, j, 10, tmp.getOrderSource());
|
|
|
addCell(sheet, j, 11, tmp.getInfoAccess());
|
|
|
j++;
|
|
|
ii++;
|
|
|
}
|