|
@@ -1,12 +1,21 @@
|
|
|
package thyyxxk.webserver.dao.his.zhuyuanyisheng;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
|
|
+import org.apache.ibatis.annotations.Insert;
|
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
import org.apache.ibatis.annotations.Select;
|
|
|
+import thyyxxk.webserver.entity.datamodify.GetDropdownBox;
|
|
|
import thyyxxk.webserver.entity.zhuyuanyisheng.caoyaoyizhu.YzActOrderCy;
|
|
|
+import thyyxxk.webserver.entity.zhuyuanyisheng.caoyaoyizhu.YzActOrderCyDetail;
|
|
|
+import thyyxxk.webserver.entity.zhuyuanyisheng.caoyaoyizhu.YzOrderPatternCy;
|
|
|
+import thyyxxk.webserver.entity.zhuyuanyisheng.yizhuluru.YiZhuMingChen;
|
|
|
+
|
|
|
+import java.math.BigDecimal;
|
|
|
+import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
@@ -27,10 +36,111 @@ public interface CaoYaoYiZhuDao {
|
|
|
" order_je_dj, " +
|
|
|
" quantity, " +
|
|
|
" quantity_dj, " +
|
|
|
- " order_code_dj " +
|
|
|
+ " order_code_dj," +
|
|
|
+ " input_date," +
|
|
|
+ " exec_dept, " +
|
|
|
+ " exec_dept_name = (select name from zd_unit_code where code = exec_dept) " +
|
|
|
"from yz_act_order_cy " +
|
|
|
"${ew.customSqlSegment} ")
|
|
|
IPage<YzActOrderCy> huoQuCaoYaoShuJu(IPage<YzActOrderCy> page,
|
|
|
@Param(Constants.WRAPPER) Wrapper<?> wp);
|
|
|
|
|
|
+ @Select("select isnull(charge_amount,0) from zd_charge_item where code = '008573' ")
|
|
|
+ BigDecimal huoQuDaiJianFei();
|
|
|
+
|
|
|
+
|
|
|
+ @Select("select chargeCodeName = (select rtrim(name) from view_yp_zd_dict_base_yf where code = charge_code)," +
|
|
|
+ " group_no_name = (select rtrim(group_name) " +
|
|
|
+ " from yp_zd_group_name " +
|
|
|
+ " where yz_act_order_cy_detail.group_no = yp_zd_group_name.group_no), " +
|
|
|
+ " * " +
|
|
|
+ "from yz_act_order_cy_detail " +
|
|
|
+ "where order_no = #{orderNo}")
|
|
|
+ List<YzActOrderCyDetail> huoQuChaoYaoMingXi(BigDecimal orderNo);
|
|
|
+
|
|
|
+ @Select("SELECT code, name FROM mzysh_zd_fysm")
|
|
|
+ List<GetDropdownBox> fuYongFangFa();
|
|
|
+
|
|
|
+
|
|
|
+ @Select("SELECT code as chargeCode, " +
|
|
|
+ " name as chargeCodeName, " +
|
|
|
+ " specification, " +
|
|
|
+ " 'z' as asorderType, " +
|
|
|
+ " serial, " +
|
|
|
+ " group_no, " +
|
|
|
+ " infusion_flag, " +
|
|
|
+ " drug_flag, " +
|
|
|
+ " group_name, " +
|
|
|
+ " pack_size, " +
|
|
|
+ " order_class ='Y', " +
|
|
|
+ " retprice=pack_retprice, " +
|
|
|
+ " self_flag = isnull(self_flag, '0'), " +
|
|
|
+ " suprice_flag " +
|
|
|
+ "FROM view_yp_zd_dict_base_yf " +
|
|
|
+ "${ew.customSqlSegment} AND isnull(visible_flag_zy, '') <> '1' ")
|
|
|
+ IPage<YiZhuMingChen> huoQuCaoYao(IPage<YiZhuMingChen> page,
|
|
|
+ @Param(Constants.WRAPPER) QueryWrapper<?> queryWrapper);
|
|
|
+
|
|
|
+
|
|
|
+ @Select("select pattern_name, " +
|
|
|
+ " group_no =max(group_no), " +
|
|
|
+ " dept_code=max(dept_code) " +
|
|
|
+ "from yz_order_pattern_cy " +
|
|
|
+ " ${ew.customSqlSegment} ")
|
|
|
+ IPage<YzOrderPatternCy> huoQuMuBan(IPage<YzOrderPatternCy> page,
|
|
|
+ @Param(Constants.WRAPPER) QueryWrapper<?> queryWrapper);
|
|
|
+
|
|
|
+
|
|
|
+ @Select("SELECT distinct charge_code=a.charge_code, " +
|
|
|
+ " serial=a.serial, " +
|
|
|
+ " group_no=a.group_no, " +
|
|
|
+ " quantity=a.quantity, " +
|
|
|
+ " retprice=b.pack_retprice, " +
|
|
|
+ " supply_code=a.supply_code, " +
|
|
|
+ " instruction=a.instruction, " +
|
|
|
+ " charge_code_name=b.name," +
|
|
|
+ " b.specification, " +
|
|
|
+ " b.self_flag, " +
|
|
|
+ " b.suprice_flag " +
|
|
|
+ "FROM yz_order_pattern_cy a, " +
|
|
|
+ " yp_zd_dict b, " +
|
|
|
+ " yp_base_yf c " +
|
|
|
+ "where a.charge_code = b.code " +
|
|
|
+ " and a.serial = b.serial " +
|
|
|
+ " and a.charge_code = c.charge_code " +
|
|
|
+ " and a.serial = c.serial " +
|
|
|
+ " and (case " +
|
|
|
+ " when isnull(b.del_flag, '0') = '1' then '1' " +
|
|
|
+ " when isnull(b.del_flag, '0') = '1' then '1' " +
|
|
|
+ " when isnull(c.visible_flag_zy, '0') = '1' then '1' " +
|
|
|
+ " else '0' end) <> 1 " +
|
|
|
+ " and a.pattern_name = #{name} " +
|
|
|
+ " and a.dept_code = #{deptCode} ")
|
|
|
+ List<YzOrderPatternCy> muBanXiangQing(@Param("name") String name,
|
|
|
+ @Param("deptCode") String deptCode);
|
|
|
+
|
|
|
+ @Select("select count(1) " +
|
|
|
+ "from yz_order_pattern_cy " +
|
|
|
+ "where pattern_name = #{name}")
|
|
|
+ Integer chongFuMuBanMing(String name);
|
|
|
+
|
|
|
+
|
|
|
+ @Insert("<script>" +
|
|
|
+ "insert into yz_order_pattern_cy (pattern_name, charge_code, serial, group_no, quantity, supply_code, instruction, " +
|
|
|
+ " dept_code, create_id, py_code, d_code) " +
|
|
|
+ "values " +
|
|
|
+ "<foreach collection='list' item='item' separator=','>" +
|
|
|
+ "(#{name}, #{item.chargeCode}, #{item.serial}, #{item.groupNo}, " +
|
|
|
+ "#{item.quantity} , null, #{item.instruction}, #{deptCode}, " +
|
|
|
+ " #{userCode}, #{pyCode}, #{dCode})" +
|
|
|
+ "</foreach>" +
|
|
|
+ "</script>")
|
|
|
+ void chaRuMuBan(@Param("list") List<YzOrderPatternCy> list,
|
|
|
+ @Param("name") String name,
|
|
|
+ @Param("userCode") String userCode,
|
|
|
+ @Param("pyCode") String pyCode,
|
|
|
+ @Param("dCode") String dCode,
|
|
|
+ @Param("deptCode") String deptCode);
|
|
|
+
|
|
|
+
|
|
|
}
|