微信后端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
959 B

package com.ynxbd.common.service;
import com.ynxbd.common.bean.MedTool;
import com.ynxbd.common.dao.MedToolDao;
import java.util.List;
public class MedToolService {
public boolean saveMedToolMarkByTreatNum(String treatNum, Integer type, String processMark) {
MedToolDao medToolDao = new MedToolDao();
MedTool medTool = medToolDao.selectByTreatNumAndType(treatNum, type);
if (medTool == null) {
return medToolDao.add(treatNum, type, processMark);
} else {
String mark = medTool.spliceProcessMark(processMark);
if (mark == null) { // 为空说明无需修改
return true;
}
return medToolDao.updateProcessMark(treatNum, type, processMark, mark);
}
}
public List<MedTool> queryMedToolListByTreatList(List<String> treatNumList, Integer type) {
return new MedToolDao().selectListByTreatNumList(treatNumList, type);
}
}