|
@@ -8,6 +8,7 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
|
import com.hb.proj.model.LiquidMeasurePO;
|
|
|
import com.hb.proj.model.LiquidMeasureVO;
|
|
|
+import com.hb.proj.model.WellConfigPO;
|
|
|
import com.hb.xframework.dao.core.SpringJdbcDAO;
|
|
|
import com.hb.xframework.dao.util.PageModel;
|
|
|
|
|
@@ -81,4 +82,29 @@ public class LiquidMeasureService {
|
|
|
measurePO.setCreateTime(new Date());
|
|
|
dao.insert(measurePO,"tzl_liquid_measure","measure_id");
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取动液面量液配置
|
|
|
+ * @param wellId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public WellConfigPO getConfig(String wellId) {
|
|
|
+ return dao.queryForPojo("select * from tzl_well_config where well_id=? and del_if=false and config_type=? ", WellConfigPO.class, wellId,WellConfigPO.TYPE_LIQUID_MEASURE);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 保存动液面量液配置
|
|
|
+ * @param config
|
|
|
+ */
|
|
|
+ public void saveConfig(WellConfigPO config) {
|
|
|
+ String sql="update tzl_well_config set config_express=?,config_desc=?,modify_time=now() where well_id=? and config_type=? ";
|
|
|
+ int num=dao.exeUpdate(sql, config.getConfigExpress(),config.getConfigDesc(),config.getWellId(),WellConfigPO.TYPE_LIQUID_MEASURE);
|
|
|
+ if(num==0) {
|
|
|
+ config.setDelIf(false);
|
|
|
+ config.setModifyTime(new Date());
|
|
|
+ config.setConfigType(WellConfigPO.TYPE_LIQUID_MEASURE);
|
|
|
+
|
|
|
+ dao.insert(config, "tzl_well_config", "rec_id");
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|