对外查询药液订单接口调整

master
FCD 3 days ago
parent 61b66b1980
commit 1b679cfb9a

@ -122,7 +122,7 @@ public interface OpenMapper {
//
// int addEquBatchs(@Param("list") List<EquEquipmentDTO> everyList);
MedicationOrder getMedicationOrder(MedicationOrder order);
List<MedicationOrder> getMedicationOrder(MedicationOrder order);
List<MedicationOrderDetail> getMedicationOrderDetail(MedicationOrder order);

@ -63,5 +63,5 @@ public interface OpenService {
AjaxResult getClassInfoListByCheckType(String checkType);
MedicationOrder getMedicationOrder(MedicationOrder order);
List<MedicationOrder> getMedicationOrder(MedicationOrder order);
}

@ -1085,21 +1085,27 @@ public class OpenServiceImpl implements OpenService {
@Override
@DS("#header.poolName")
public MedicationOrder getMedicationOrder(MedicationOrder order) {
public List<MedicationOrder> getMedicationOrder(MedicationOrder order) {
if (StringUtils.isBlank(order.getOrderCode())){
throw new RuntimeException("订单号不能为空");
if (StringUtils.isBlank(order.getProductDate())){
throw new RuntimeException("生产日期不能为空");
}
MedicationOrder medicationOrder = openMapper.getMedicationOrder(order);
List<MedicationOrder> medicationOrderList = openMapper.getMedicationOrder(order);
if (medicationOrder == null){
if (medicationOrderList.isEmpty()){
throw new RuntimeException("订单不存在");
}
List<MedicationOrderDetail> details = openMapper.getMedicationOrderDetail(order);
medicationOrder.setList(details);
for (MedicationOrder medicationOrder : medicationOrderList){
MedicationOrder query = new MedicationOrder();
query.setOrderCode(medicationOrder.getOrderCode());
query.setProductDate(medicationOrder.getProductDate());
List<MedicationOrderDetail> details = openMapper.getMedicationOrderDetail(query);
medicationOrder.setList(details);
}
return medicationOrder;
return medicationOrderList;
}
}

@ -15,13 +15,13 @@ spring:
discovery:
#命名空间
namespace: lanju-op-test
group: fcd
group: test
# 服务注册地址
server-addr: 192.168.202.20:8848
config:
#命名空间
namespace: lanju-op-test
group: fcd
group: test
# 服务注册地址
server-addr: 192.168.202.20:8848
# 配置文件格式

@ -644,7 +644,13 @@
unit,
production_date productDate
from pro_medication_order
where order_code like concat('%', #{orderCode}, '%') and production_date = #{productDate} and material_code like concat('%', #{materialCode}, '%')
where production_date = #{productDate}
<if test="orderCode != null">
and order_code like concat('%', #{orderCode}, '%')
</if>
<if test="materialCode != null">
and material_code like concat('%', #{materialCode}, '%')
</if>
</select>

Loading…
Cancel
Save