package com.ld.igds.drug.view;
|
|
import java.util.ArrayList;
|
import java.util.List;
|
import java.util.Map;
|
|
import com.ld.igds.inout.InoutConstant;
|
import com.ld.igds.models.DicTrigger;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Component;
|
|
import com.bstek.dorado.annotation.DataProvider;
|
import com.bstek.dorado.annotation.Expose;
|
import com.bstek.dorado.data.provider.Page;
|
import com.ld.igds.drug.service.HDrugService;
|
import com.ld.igds.models.Drug;
|
|
/**
|
* 熏蒸管理的PR
|
*
|
* @author: andy.jia
|
* @description:
|
* @version:
|
* @data:2020年3月6日
|
*/
|
@Component("drugPR")
|
public class DrugPR {
|
|
@Autowired
|
private HDrugService drugService;
|
|
|
// ${dorado.getDataProvider("drugPR#triggerPackage").getResult()}
|
@DataProvider
|
public List<DicTrigger> triggerPackage() {
|
List<DicTrigger> list = new ArrayList<DicTrigger>();
|
list.add(new DicTrigger("1", "瓶装"));
|
list.add(new DicTrigger("2", "袋装"));
|
list.add(new DicTrigger("3", "其他"));
|
return list;
|
}
|
|
// ${dorado.getDataProvider("drugPR#triggerLocation").getResult()}
|
@DataProvider
|
public List<DicTrigger> triggerLocation() {
|
List<DicTrigger> list = new ArrayList<DicTrigger>();
|
list.add(new DicTrigger("1", "药剂库"));
|
list.add(new DicTrigger("2", "其他"));
|
return list;
|
}
|
|
// ${dorado.getDataProvider("drugPR#triggerUnit").getResult()}
|
@DataProvider
|
public List<DicTrigger> triggerUnit() {
|
List<DicTrigger> list = new ArrayList<DicTrigger>();
|
list.add(new DicTrigger("1", "公斤"));
|
list.add(new DicTrigger("2", "克"));
|
list.add(new DicTrigger("3", "毫克"));
|
return list;
|
}
|
|
/**
|
* ${dorado.getDataProvider("drugPR#listDrug").getResult()}
|
*
|
* @throws Exception
|
*/
|
// @DataProvider
|
// public List<Drug> listDrug(String name) throws Exception {
|
// return drugService.listDrug(name);
|
// }
|
|
/**
|
* ${dorado.getDataProvider("drugPR#pageDrug").getResult()}
|
*
|
* @throws Exception
|
*/
|
@DataProvider
|
public void pageDrug(Page<Drug> page, Map<String, Object> param) throws Exception {
|
drugService.pageDrug(page, param);
|
}
|
|
/**
|
* ${dorado.getDataProvider("drugPR#saveDrug").getResult()}
|
*
|
* @throws Exception
|
*/
|
@Expose
|
public void saveDrug(Drug drug) throws Exception {
|
drugService.saveDrug(drug);
|
}
|
|
/**
|
* drugPR#delDrug
|
*
|
* @param
|
* @throws Exception
|
*/
|
@Expose
|
public String delDrug(Drug data) throws Exception {
|
return drugService.delDrug(data);
|
}
|
|
|
}
|