|
|
@@ -14,7 +14,7 @@ public interface MzyRequestMapper {
|
|
|
* @param requestDay
|
|
|
* @return
|
|
|
*/
|
|
|
- @Select(" select id,request_day,rtrim(ampm) ampm,rtrim(unit_code) unit_code,group_code,rtrim(doctor_code) doctor_code,charge_type,op_id,bespeak_no,check_fee,sys_date,del_flag,a1,a2,a3,a4,a5,a6,a7,a8,p1,p2,p3,p4,p5,p6,total_num,left_num from mzy_request_new WITH(NOLOCK) where request_day = #{requestDay,jdbcType=DATE}")
|
|
|
+ @Select(" select id,request_day,rtrim(ampm) ampm,rtrim(unit_code) unit_code,group_code,rtrim(doctor_code) doctor_code,charge_type,op_id,bespeak_no,check_fee,sys_date,del_flag,a1,a2,a3,a4,a5,a6,a7,a8,p1,p2,p3,p4,p5,p6,p7,total_num,left_num from mzy_request_new WITH(NOLOCK) where request_day = #{requestDay,jdbcType=DATE}")
|
|
|
List<MzyRequest> selectMzyRequestByRequestDay(@Param("requestDay") String requestDay);
|
|
|
|
|
|
|
|
|
@@ -62,7 +62,7 @@ public interface MzyRequestMapper {
|
|
|
* @return
|
|
|
*/
|
|
|
@Select({"<script>",
|
|
|
- "select id,rtrim(doctor_code) doctor_code,rtrim(charge_type) charge_type,check_fee,a1,a2,a3,a4,a5,a6,a7,a8,p1,p2,p3,p4,p5,p6,total_num,left_num,rtrim(ampm) ampm from mzy_request_new WITH(NOLOCK) where ",
|
|
|
+ "select id,rtrim(doctor_code) doctor_code,rtrim(charge_type) charge_type,check_fee,a1,a2,a3,a4,a5,a6,a7,a8,p1,p2,p3,p4,p5,p6,p7,total_num,left_num,rtrim(ampm) ampm from mzy_request_new WITH(NOLOCK) where ",
|
|
|
" request_day = #{requestDay,jdbcType=DATE} and unit_code=#{unitCode,jdbcType=CHAR} ",
|
|
|
"<when test='ampm!=null'>",
|
|
|
" and ampm =#{ampm,jdbcType=CHAR} ",
|
|
|
@@ -116,7 +116,7 @@ public interface MzyRequestMapper {
|
|
|
*
|
|
|
* @param id 主键
|
|
|
*/
|
|
|
- @Select(" select id,request_day,rtrim(ampm) ampm,rtrim(unit_code) unit_code,group_code,rtrim(doctor_code) doctor_code,charge_type,op_id,bespeak_no,check_fee,sys_date,del_flag,a1,a2,a3,a4,a5,a6,a7,a8,p1,p2,p3,p4,p5,p6,total_num,left_num" +
|
|
|
+ @Select(" select id,request_day,rtrim(ampm) ampm,rtrim(unit_code) unit_code,group_code,rtrim(doctor_code) doctor_code,charge_type,op_id,bespeak_no,check_fee,sys_date,del_flag,a1,a2,a3,a4,a5,a6,a7,a8,p1,p2,p3,p4,p5,p6,p7,total_num,left_num" +
|
|
|
" from mzy_request_new WITH(NOLOCK) where id = #{id,jdbcType=BIGINT}")
|
|
|
MzyRequest selectMzyRequestById(@Param("id") Long id);
|
|
|
|
|
|
@@ -143,7 +143,7 @@ public interface MzyRequestMapper {
|
|
|
* @param mzyRequest
|
|
|
* @return
|
|
|
*/
|
|
|
- @Update("update mzy_request_new set left_num=#{leftNum},bespeak_no=#{bespeakNo,jdbcType=SMALLINT},a1=#{a1},a2=#{a2},a3=#{a3},a4=#{a4},a5=#{a5},a6=#{a6},a7=#{a7},a8=#{a8},p1=#{p1},p2=#{p2},p3=#{p3},p4=#{p4},p5=#{p5},p6=#{p6} where id = #{id,jdbcType=BIGINT}")
|
|
|
+ @Update("update mzy_request_new set left_num=#{leftNum},bespeak_no=#{bespeakNo,jdbcType=SMALLINT},a1=#{a1},a2=#{a2},a3=#{a3},a4=#{a4},a5=#{a5},a6=#{a6},a7=#{a7},a8=#{a8},p1=#{p1},p2=#{p2},p3=#{p3},p4=#{p4},p5=#{p5},p6=#{p6},p7=#{p7} where id = #{id,jdbcType=BIGINT}")
|
|
|
int updateMzyRequest(MzyRequest mzyRequest);
|
|
|
|
|
|
|
|
|
@@ -173,7 +173,7 @@ public interface MzyRequestMapper {
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
- @Select("select request_day,rtrim(ampm) ampm,unit_code,group_code,doctor_code,charge_type,op_id,bespeak_no,check_fee,sys_date,del_flag,a1,a2,a3,a4,a5,a6,a7,a8,p1,p2,p3,p4,p5,p6,total_num,left_num " +
|
|
|
+ @Select("select request_day,rtrim(ampm) ampm,unit_code,group_code,doctor_code,charge_type,op_id,bespeak_no,check_fee,sys_date,del_flag,a1,a2,a3,a4,a5,a6,a7,a8,p1,p2,p3,p4,p5,p6,p7,total_num,left_num " +
|
|
|
" from mzy_request WITH(NOLOCK) where request_day =#{today,jdbcType=DATE}")
|
|
|
List<MzyRequest> selectRequestForToday(Date today);
|
|
|
|
|
|
@@ -183,7 +183,7 @@ public interface MzyRequestMapper {
|
|
|
* @param mzyRequest
|
|
|
* @return
|
|
|
*/
|
|
|
- @Select("select request_day,rtrim(ampm) ampm,unit_code,group_code,doctor_code,charge_type,op_id,bespeak_no,check_fee,sys_date,del_flag,a1,a2,a3,a4,a5,a6,a7,a8,p1,p2,p3,p4,p5,p6,total_num,left_num from mzy_request_new WITH(NOLOCK) where ampm = #{ampm} and unit_code = #{unitCode} and request_day = #{requestDay,jdbcType=DATE} and doctor_code =#{doctorCode} and charge_type =#{chargeType} ")
|
|
|
+ @Select("select request_day,rtrim(ampm) ampm,unit_code,group_code,doctor_code,charge_type,op_id,bespeak_no,check_fee,sys_date,del_flag,a1,a2,a3,a4,a5,a6,a7,a8,p1,p2,p3,p4,p5,p6,p7,total_num,left_num from mzy_request_new WITH(NOLOCK) where ampm = #{ampm} and unit_code = #{unitCode} and request_day = #{requestDay,jdbcType=DATE} and doctor_code =#{doctorCode} and charge_type =#{chargeType} ")
|
|
|
MzyRequest selectMzyRequestByAllParams(MzyRequest mzyRequest);
|
|
|
|
|
|
/**
|
|
|
@@ -192,8 +192,8 @@ public interface MzyRequestMapper {
|
|
|
* @return
|
|
|
*/
|
|
|
@Insert("if not exists (select id from mzy_request_new where request_day=#{requestDay,jdbcType=DATE} and ampm = #{ampm,jdbcType=CHAR} and unit_code=#{unitCode} and group_code=#{groupCode} and charge_type=#{chargeType} and doctor_code=#{doctorCode} ) " +
|
|
|
- "insert into mzy_request_new(request_day,ampm,unit_code,group_code,doctor_code,charge_type,op_id,bespeak_no,check_fee,sys_date,del_flag,a1,a2,a3,a4,a5,a6,a7,a8,p1,p2,p3,p4,p5,p6,total_num,left_num) " +
|
|
|
- "values(#{requestDay,jdbcType=DATE},#{ampm},#{unitCode},#{groupCode},#{doctorCode},#{chargeType},#{opId},#{bespeakNo},#{checkFee},#{sysDate,jdbcType=DATE},#{delFlag},#{a1},#{a2},#{a3},#{a4},#{a5},#{a6},#{a7},#{a8},#{p1},#{p2},#{p3},#{p4},#{p5},#{p6},#{totalNum},#{leftNum})")
|
|
|
+ "insert into mzy_request_new(request_day,ampm,unit_code,group_code,doctor_code,charge_type,op_id,bespeak_no,check_fee,sys_date,del_flag,a1,a2,a3,a4,a5,a6,a7,a8,p1,p2,p3,p4,p5,p6,p7,total_num,left_num) " +
|
|
|
+ "values(#{requestDay,jdbcType=DATE},#{ampm},#{unitCode},#{groupCode},#{doctorCode},#{chargeType},#{opId},#{bespeakNo},#{checkFee},#{sysDate,jdbcType=DATE},#{delFlag},#{a1},#{a2},#{a3},#{a4},#{a5},#{a6},#{a7},#{a8},#{p1},#{p2},#{p3},#{p4},#{p5},#{p6},#{p7},#{totalNum},#{leftNum})")
|
|
|
int insertRequest(MzyRequest mzyRequest);
|
|
|
|
|
|
|
|
|
@@ -206,7 +206,7 @@ public interface MzyRequestMapper {
|
|
|
* @return
|
|
|
*/
|
|
|
@Select({"<script>",
|
|
|
- "select request_day,rtrim(ampm) ampm,unit_code,group_code,doctor_code,charge_type,op_id,bespeak_no,check_fee,sys_date,del_flag,a1,a2,a3,a4,a5,a6,a7,a8,p1,p2,p3,p4,p5,p6,total_num,left_num from mzy_request_new WITH(NOLOCK) where request_day = #{requestDay,jdbcType=DATE} and unit_code=#{unitCode,jdbcType=CHAR} and ampm =#{ampm,jdbcType=CHAR} and charge_type=#{chargeType} ",
|
|
|
+ "select request_day,rtrim(ampm) ampm,unit_code,group_code,doctor_code,charge_type,op_id,bespeak_no,check_fee,sys_date,del_flag,a1,a2,a3,a4,a5,a6,a7,a8,p1,p2,p3,p4,p5,p6,p7,total_num,left_num from mzy_request_new WITH(NOLOCK) where request_day = #{requestDay,jdbcType=DATE} and unit_code=#{unitCode,jdbcType=CHAR} and ampm =#{ampm,jdbcType=CHAR} and charge_type=#{chargeType} ",
|
|
|
"<when test='doctorCode!=null'>",
|
|
|
" and doctor_code=#{doctorCode} ",
|
|
|
"</when>",
|
|
|
@@ -250,7 +250,7 @@ public interface MzyRequestMapper {
|
|
|
* @return
|
|
|
*/
|
|
|
@Select({"<script>",
|
|
|
- " SELECT id,request_day,rtrim(ampm) ampm ,unit_code,group_code,doctor_code,charge_type,total_num,op_id,left_num,check_fee,bespeak_no,a1,a2,a3,a4,a5,a6,a7,a8,p1,p2,p3,p4,p5,p6 " +
|
|
|
+ " SELECT id,request_day,rtrim(ampm) ampm ,unit_code,group_code,doctor_code,charge_type,total_num,op_id,left_num,check_fee,bespeak_no,a1,a2,a3,a4,a5,a6,a7,a8,p1,p2,p3,p4,p5,p6,p7 " +
|
|
|
" FROM mzy_request_new WITH(NOLOCK) " +
|
|
|
" where " +
|
|
|
" request_day <![CDATA[>=]]> #{beginDate,jdbcType=TIMESTAMP} and " +
|
|
|
@@ -274,7 +274,7 @@ public interface MzyRequestMapper {
|
|
|
*/
|
|
|
@Update("if not exists (select id from mzy_request_new where request_day=#{requestDay,jdbcType=DATE} and ampm = #{ampm,jdbcType=CHAR} and unit_code=#{unitCode} and group_code=#{groupCode} and charge_type=#{chargeType} and doctor_code=#{doctorCode} and id <> #{id,jdbcType=BIGINT} ) " +
|
|
|
"update mzy_request_new set request_day=#{requestDay,jdbcType=DATE},ampm=#{ampm},unit_code=#{unitCode},doctor_code=#{doctorCode},charge_type=#{chargeType},total_num=#{totalNum},left_num=#{leftNum,jdbcType=INTEGER}," +
|
|
|
- " bespeak_no=#{bespeakNo,jdbcType=SMALLINT},check_fee=#{checkFee},a1=#{a1},a2=#{a2},a3=#{a3},a4=#{a4},a5=#{a5},a6=#{a6},a7=#{a7},a8=#{a8},p1=#{p1},p2=#{p2},p3=#{p3},p4=#{p4},p5=#{p5},p6=#{p6} where id = #{id,jdbcType=BIGINT}")
|
|
|
+ " bespeak_no=#{bespeakNo,jdbcType=SMALLINT},check_fee=#{checkFee},a1=#{a1},a2=#{a2},a3=#{a3},a4=#{a4},a5=#{a5},a6=#{a6},a7=#{a7},a8=#{a8},p1=#{p1},p2=#{p2},p3=#{p3},p4=#{p4},p5=#{p5},p6=#{p6},p7=#{p7} where id = #{id,jdbcType=BIGINT}")
|
|
|
int updateMzyRequestNew(MzyRequest mzyRequest);
|
|
|
|
|
|
|
|
|
@@ -336,7 +336,7 @@ public interface MzyRequestMapper {
|
|
|
* @return
|
|
|
*/
|
|
|
@Select({"<script>",
|
|
|
- "select id mzyRequestId,rtrim(ampm) ampm,doctor_code doctorCode,charge_type chargeType,check_fee checkFee,left_num leftNum,total_num totalNum,a1,a2,a3,a4,a5,a6,a7,a8,p1,p2,p3,p4,p5,p6 from mzy_request_new WITH(NOLOCK) where unit_code=#{unitCode} and request_day=#{requestDay,jdbcType=TIMESTAMP} and doctor_code =#{doctorCode} and del_flag=0 and charge_type not in (16,24)",
|
|
|
+ "select id mzyRequestId,rtrim(ampm) ampm,doctor_code doctorCode,charge_type chargeType,check_fee checkFee,left_num leftNum,total_num totalNum,a1,a2,a3,a4,a5,a6,a7,a8,p1,p2,p3,p4,p5,p6,p7 from mzy_request_new WITH(NOLOCK) where unit_code=#{unitCode} and request_day=#{requestDay,jdbcType=TIMESTAMP} and doctor_code =#{doctorCode} and del_flag=0 and charge_type not in (16,24)",
|
|
|
"<when test='ampms!=null'>",
|
|
|
" and ampm not in ",
|
|
|
"<foreach item='item' index='index' collection='ampms' open='(' separator=',' close=')'>",
|