门诊采血维护数据

This commit is contained in:
jiangs 2025-06-12 16:26:40 +08:00
parent 5f255bfcb1
commit 81301dbcb6
21 changed files with 762 additions and 4 deletions

View File

@ -0,0 +1,64 @@
package com.czlis.mzcx.controller;
import com.czlis.common.core.controller.BaseController;
import com.czlis.common.core.domain.Result;
import com.czlis.common.core.page.TableDataInfo;
import com.czlis.mzcx.pojo.LabFeeitemClass;
import com.czlis.mzcx.service.FeeitemClassService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 条码类别
*/
@Api(tags = "条码类别维护")
@RestController
@RequestMapping("/feeitemclass")
@Slf4j
public class FeeitemClassController extends BaseController {
@Autowired
private FeeitemClassService feeitemClassService;
/**
* 查询条码类别
* @param sflbdh
* @param sflbmc
* @return
*/
@ApiOperation("查询条码类别")
@GetMapping("/query")
public TableDataInfo query(String sflbdh,String sflbmc){
startPage();
List<LabFeeitemClass> labFeeitemClassList = feeitemClassService.query(sflbdh,sflbmc);
return getDataTable(labFeeitemClassList);
}
@ApiOperation("新增条码类别")
@PostMapping("/add")
public Result add(@RequestBody LabFeeitemClass labFeeitemClass){
feeitemClassService.add(labFeeitemClass);
return new Result("0","新增条码类别成功!");
}
@ApiOperation("修改条码类别")
@PostMapping("/update")
public Result update(@RequestBody LabFeeitemClass labFeeitemClass){
feeitemClassService.update(labFeeitemClass);
return new Result("0","修改条码成功!");
}
@ApiOperation("删除条码类别")
@DeleteMapping("/del")
public Result delete(String sfxmdh){
return feeitemClassService.delete(sfxmdh);
}
}

View File

@ -1,18 +1,27 @@
package com.czlis.mzcx.controller; package com.czlis.mzcx.controller;
import com.czlis.common.core.controller.BaseController;
import com.czlis.common.core.domain.Result; import com.czlis.common.core.domain.Result;
import com.czlis.common.core.page.TableDataInfo; import com.czlis.common.core.page.TableDataInfo;
import com.czlis.mzcx.pojo.MzcxSqdDTO;
import com.czlis.mzcx.service.MZCXService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.List;
/** /**
* 门诊采血 * 门诊采血
*/ */
@Api(tags = "门诊采血") @Api(tags = "门诊采血")
@RestController @RestController
@RequestMapping("/mzcx") @RequestMapping("/mzcx")
public class MZCXController { public class MZCXController extends BaseController {
@Autowired
private MZCXService mzcxService;
/** /**
* 获取申请单信息 * 获取申请单信息
@ -23,9 +32,11 @@ public class MZCXController {
* @return * @return
*/ */
@ApiOperation("获取申请单信息") @ApiOperation("获取申请单信息")
@PostMapping("/querySQD") @GetMapping("/querySQD")
public TableDataInfo querySQD(@RequestBody String brdh,String stime,String etime,String klx){ public TableDataInfo querySQD(String brdh,String stime,String etime,String klx){
return null; startPage();
List<MzcxSqdDTO> mzcxSqdDTOList = mzcxService.querySQD(brdh,stime,etime,klx);
return getDataTable( mzcxSqdDTOList);
} }
/** /**

View File

@ -0,0 +1,22 @@
package com.czlis.mzcx.controller;
import com.czlis.common.core.controller.BaseController;
import com.czlis.common.core.page.TableDataInfo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 报告领取规则
*/
@RestController
@RequestMapping("/rptgetrule")
public class RptgetRuleController extends BaseController {
@GetMapping("/query")
public TableDataInfo query(){
startPage();
return null;
}
}

View File

@ -0,0 +1,56 @@
package com.czlis.mzcx.controller;
import com.czlis.common.core.controller.BaseController;
import com.czlis.common.core.domain.Result;
import com.czlis.common.core.page.TableDataInfo;
import com.czlis.mzcx.pojo.XmFee;
import com.czlis.mzcx.service.XmFeeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 收费项目维护
*/
@Api(tags = "收费项目维护")
@Slf4j
@RestController
@RequestMapping("/xmfee")
public class XmFeeController extends BaseController {
@Autowired
private XmFeeService xmFeeService;
@ApiOperation("查询收费项目")
@GetMapping("/query")
public TableDataInfo query(String sfxmdh,String yljg,String xmlb){
startPage();
List<XmFee> xmFeeList = xmFeeService.query(sfxmdh,yljg,xmlb);
return getDataTable(xmFeeList);
}
@ApiOperation("新增收费项目")
@PostMapping("/addXmfee")
public Result addXmfee(@RequestBody XmFee xmFee){
xmFeeService.addXmFee(xmFee);
return new Result("0","新增收费项目成功!");
}
@ApiOperation("修改收费项目")
@PostMapping("/update")
public Result update(@RequestBody XmFee xmFee){
xmFeeService.update(xmFee);
return new Result("0","修改收费项目成功!");
}
@ApiOperation("删除收费项目")
@DeleteMapping("/del")
public Result delete(String sflbdh){
return xmFeeService.delete(sflbdh);
}
}

View File

@ -0,0 +1,17 @@
package com.czlis.mzcx.mapper;
import com.czlis.mzcx.pojo.LabFeeitemClass;
import java.util.List;
public interface FeeitemClassMapper {
List<LabFeeitemClass> query(String sflbdh,String sflbmc);
void add(LabFeeitemClass labFeeitemClass);
void update(LabFeeitemClass labFeeitemClass);
void delete(String sflbdh);
Long getLabFeeitemVsClassCount(String sflbdh);
}

View File

@ -0,0 +1,10 @@
package com.czlis.mzcx.mapper;
import com.czlis.mzcx.pojo.MzcxSqdDTO;
import java.util.List;
import java.util.Map;
public interface MZCXMapper {
List<MzcxSqdDTO> querySQD(Map<String,Object> map);
}

View File

@ -0,0 +1,17 @@
package com.czlis.mzcx.mapper;
import com.czlis.mzcx.pojo.XmFee;
import java.util.List;
public interface XmFeeMapper {
List<XmFee> query(String sfxmdh, String yljg, String xmlb);
void add(XmFee xmFee);
void update(XmFee xmFee);
void delete(String sflbdh);
Long getXmFeeVsCount(String sfxmdh);
}

View File

@ -0,0 +1,29 @@
package com.czlis.mzcx.pojo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class LabFeeitemClass {
private String sflbdh;
private String sflbmc;
private String sflbjc;
private Integer bkcolor;
private Integer bglqdh;
private String yblx;
private String txmlb;
private String sampletips;
private String printcnt;
private Integer barcodecopy;
private String lisgroup1;
private String lisgroup2;
private String lisgroup3;
private String kn;
private String xpy;
private String tubeConvert;
private String sfxmdm;
private String sfxmdh;
}

View File

@ -0,0 +1,14 @@
package com.czlis.mzcx.pojo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class LabRptgetRule {
private Integer bglqdh;
private String bglqmc;
private String bz;
}

View File

@ -0,0 +1,20 @@
package com.czlis.mzcx.pojo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class LabRptgetRuleDetail {
private Integer bglqdh;
private Integer xh;
private String kssj;
private String jssj;
private Integer bgxss;
private String bglqsm;
private String bz;
private String weekday;
private String weekday1;
}

View File

@ -0,0 +1,54 @@
package com.czlis.mzcx.pojo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
import java.util.Date;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class MzcxSqdDTO {
private String sqh;
private Integer xh;
private String sqxmdh;
private String sqxmmc;
private BigDecimal sl;
private BigDecimal dj;
private String detailZT;
private String detailJJZT;
private String ksdh;
private String sqys;
private Date sqsj;
private String jsys;
private Date jssj;
private String brly;
private String brdh;
private String brxm;
private String zt;
private String jjzt;
private String brxb;
private Date brsr;
private String jzbz;
private String cp_xmlb;
private String cp_color;
private String cp_cflag;
private String detailBZ1;
private String ch;
private String detailBZ2;
private String bz1;
private String bz2;
private String bz3;
private String yblx;
private String zxys;
private Date zxsj;
private String bgddh;
private String nl;
private String nldw;
private String zd;
private Date cysj;
}

View File

@ -0,0 +1,26 @@
package com.czlis.mzcx.pojo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class XmFee {
private String sfxmdh;
private String sfxmmc;
private String xmlb;
private BigDecimal dj;
private String zjf;
private String bz;
private Integer bglqdh;
private String spec;
private String yljg;
private String lisgroup;
private String attention;
private String indication;
private String affect;
}

View File

@ -0,0 +1,16 @@
package com.czlis.mzcx.service;
import com.czlis.common.core.domain.Result;
import com.czlis.mzcx.pojo.LabFeeitemClass;
import java.util.List;
public interface FeeitemClassService {
List<LabFeeitemClass> query(String sflbdh, String sflbmc);
void add(LabFeeitemClass labFeeitemClass);
void update(LabFeeitemClass labFeeitemClass);
Result delete(String sflbdh);
}

View File

@ -0,0 +1,9 @@
package com.czlis.mzcx.service;
import com.czlis.mzcx.pojo.MzcxSqdDTO;
import java.util.List;
public interface MZCXService {
List<MzcxSqdDTO> querySQD(String brdh, String stime, String etime, String klx);
}

View File

@ -0,0 +1,16 @@
package com.czlis.mzcx.service;
import com.czlis.common.core.domain.Result;
import com.czlis.mzcx.pojo.XmFee;
import java.util.List;
public interface XmFeeService {
List<XmFee> query(String sfxmdh, String yljg, String xmlb);
void addXmFee(XmFee xmFee);
void update(XmFee xmFee);
Result delete(String sfxmdh);
}

View File

@ -0,0 +1,56 @@
package com.czlis.mzcx.service.impl;
import com.czlis.common.core.domain.Result;
import com.czlis.mzcx.mapper.FeeitemClassMapper;
import com.czlis.mzcx.pojo.LabFeeitemClass;
import com.czlis.mzcx.service.FeeitemClassService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Collections;
import java.util.List;
@Service
@Slf4j
public class FeeitemClassServiceImpl implements FeeitemClassService {
@Autowired
private FeeitemClassMapper feeitemClassMapper;
/**
* 查询条码类别
* @param sflbdh
* @param sflbmc
* @return
*/
@Override
public List<LabFeeitemClass> query(String sflbdh, String sflbmc) {
return feeitemClassMapper.query(sflbdh, sflbmc);
}
@Transactional(rollbackFor = Exception.class)
@Override
public void add(LabFeeitemClass labFeeitemClass) {
feeitemClassMapper.add(labFeeitemClass);
}
@Transactional(rollbackFor = Exception.class)
@Override
public void update(LabFeeitemClass labFeeitemClass) {
feeitemClassMapper.update(labFeeitemClass);
}
@Transactional(rollbackFor = Exception.class)
@Override
public Result delete(String sflbdh) {
//这里需要补逻辑,如果有对应的收费项目,这里应该不能删,要先去掉对应的收费项目
Long labFeeitemVsClassCount = feeitemClassMapper.getLabFeeitemVsClassCount(sflbdh);
if (labFeeitemVsClassCount > 0) return new Result("-1","收费类别对照里面存在对应的条码类别,不允许删除!");
feeitemClassMapper.delete(sflbdh);
return new Result("0","删除条码类别成功!");
}
}

View File

@ -0,0 +1,33 @@
package com.czlis.mzcx.service.impl;
import com.czlis.mzcx.mapper.MZCXMapper;
import com.czlis.mzcx.pojo.MzcxSqdDTO;
import com.czlis.mzcx.service.MZCXService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.*;
@Service
@Slf4j
public class MZCXServiceImpl implements MZCXService {
@Autowired
MZCXMapper mzcxMapper;
@Override
public List<MzcxSqdDTO> querySQD(String brdh, String stime, String etime, String klx) {
Map<String, Object> map = new HashMap<>();
map.put("brdh", brdh);
map.put("st", stime);
map.put("et", etime);
map.put("klx", klx);
map.put("zt","1");
map.put("as_yljg","1");
return mzcxMapper.querySQD(map);
}
}

View File

@ -0,0 +1,48 @@
package com.czlis.mzcx.service.impl;
import com.czlis.common.core.domain.Result;
import com.czlis.mzcx.mapper.XmFeeMapper;
import com.czlis.mzcx.pojo.XmFee;
import com.czlis.mzcx.service.XmFeeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@Service
@Slf4j
public class XmFeeServiceImpl implements XmFeeService {
@Autowired
private XmFeeMapper xmFeeMapper;
@Override
public List<XmFee> query(String sfxmdh, String yljg, String xmlb) {
return xmFeeMapper.query(sfxmdh,yljg,xmlb);
}
@Transactional(rollbackFor = Exception.class)
@Override
public void addXmFee(XmFee xmFee) {
xmFeeMapper.add(xmFee);
}
@Transactional(rollbackFor = Exception.class)
@Override
public void update(XmFee xmFee) {
xmFeeMapper.update(xmFee);
}
@Transactional(rollbackFor = Exception.class)
@Override
public Result delete(String sfxmdh) {
//这里需要补逻辑,如果有对应的收费项目,这里应该不能删,要先去掉对应的收费项目
Long xmFeeVsCount = xmFeeMapper.getXmFeeVsCount(sfxmdh);
if(xmFeeVsCount > 0) return new Result("-1","有关联的收费项目代码,要先删掉关联的项目代码才能删掉对应的项目!");
xmFeeMapper.delete(sfxmdh);
return new Result("0","删除收费项目代码成功!");
}
}

View File

@ -0,0 +1,93 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.czlis.mzcx.mapper.FeeitemClassMapper">
<select id="query" resultType="com.czlis.mzcx.pojo.LabFeeitemClass">
select * from lab_feeitemclass
<where>
<if test="sflbdh != null and sflbdh != ''"> and sflbdh = #{sflbdh}</if>
<if test="sflbmc != null and sflbmc != ''"> and sflbmc = #{sflbmc}</if>
</where>
</select>
<insert id="add" parameterType="com.czlis.mzcx.pojo.LabFeeitemClass">
insert into lab_feeitemclass (
<if test="sflbmc != null and sflbmc != ''">sflbmc,</if>
<if test="sflbjc != null and sflbjc != ''">sflbjc,</if>
<if test="bkcolor != null">bkcolor,</if>
<if test="bglqdh != null">bglqdh,</if>
<if test="sflbmc != null and sflbmc != ''">sflbmc,</if>
<if test="yblx != null and yblx != ''">yblx,</if>
<if test="txmlb != null and txmlb != ''">txmlb,</if>
<if test="sampletips != null and sampletips != ''">sampletips,</if>
<if test="printcnt != null ">printcnt,</if>
<if test="barcodecopy != null and barcodecopy != ''">barcodecopy,</if>
<if test="lisgroup1 != null and lisgroup1 != ''">lisgroup1,</if>
<if test="lisgroup2 != null and lisgroup2 != ''">lisgroup2,</if>
<if test="lisgroup3 != null and lisgroup3 != ''">lisgroup3,</if>
<if test="kn != null and kn != ''">kn,</if>
<if test="xpy != null and xpy != ''">xpy,</if>
<if test="tubeConvert != null and tubeConvert != ''">tubeConvert,</if>
<if test="sfxmdm != null and sfxmdm != ''">sfxmdm,</if>
<if test="sfxmdh != null and sfxmdh != ''">sfxmdh,</if>
sflbdh
)values (
<if test="sflbmc != null and sflbmc != ''">#{sflbmc},</if>
<if test="sflbjc != null and sflbjc != ''">#{sflbjc},</if>
<if test="bkcolor != null">#{bkcolor},</if>
<if test="bglqdh != null">#{bglqdh},</if>
<if test="sflbmc != null and sflbmc != ''">#{bglqdh},</if>
<if test="yblx != null and yblx != ''">#{yblx},</if>
<if test="txmlb != null and txmlb != ''">#{txmlb},</if>
<if test="sampletips != null and sampletips != ''">#{sampletips},</if>
<if test="printcnt != null ">#{printcnt},</if>
<if test="barcodecopy != null and barcodecopy != ''">#{barcodecopy},</if>
<if test="lisgroup1 != null and lisgroup1 != ''">#{lisgroup1},</if>
<if test="lisgroup2 != null and lisgroup2 != ''">#{lisgroup2},</if>
<if test="lisgroup3 != null and lisgroup3 != ''">#{lisgroup3},</if>
<if test="kn != null and kn != ''">#{kn},</if>
<if test="xpy != null and xpy != ''">#{xpy},</if>
<if test="tubeConvert != null and tubeConvert != ''">#{tubeConvert},</if>
<if test="sfxmdm != null and sfxmdm != ''">#{sfxmdm},</if>
<if test="sfxmdh != null and sfxmdh != ''">#{sfxmdh},</if>
#{sflbdh}
)
</insert>
<update id="update" parameterType="com.czlis.mzcx.pojo.LabFeeitemClass">
update LabFeeitemClass
<set>
<if test="sflbmc != null and sflbmc != ''">sflbmc = #{sflbmc},</if>
<if test="sflbjc != null and sflbjc != ''">sflbjc = #{sflbjc},</if>
<if test="bkcolor != null">bkcolor = #{bkcolor},</if>
<if test="bglqdh != null">bglqdh = #{bglqdh},</if>
<if test="sflbmc != null and sflbmc != ''">bglqdh = #{bglqdh},</if>
<if test="yblx != null and yblx != ''">yblx = #{yblx},</if>
<if test="txmlb != null and txmlb != ''">txmlb = #{txmlb},</if>
<if test="sampletips != null and sampletips != ''">sampletips = #{sampletips},</if>
<if test="printcnt != null ">printcnt = #{printcnt},</if>
<if test="barcodecopy != null and barcodecopy != ''">barcodecopy = #{barcodecopy},</if>
<if test="lisgroup1 != null and lisgroup1 != ''">lisgroup1 = #{lisgroup1},</if>
<if test="lisgroup2 != null and lisgroup2 != ''">lisgroup2 = #{lisgroup2},</if>
<if test="lisgroup3 != null and lisgroup3 != ''">lisgroup3 = #{lisgroup3},</if>
<if test="kn != null and kn != ''">kn = #{kn},</if>
<if test="xpy != null and xpy != ''">xpy = #{xpy},</if>
<if test="tubeConvert != null and tubeConvert != ''">tubeConvert = #{tubeConvert},</if>
<if test="sfxmdm != null and sfxmdm != ''">sfxmdm = #{sfxmdm},</if>
<if test="sfxmdh != null and sfxmdh != ''">sfxmdh = #{sfxmdh},</if>
</set>
where sflbdh = #{sflbdh}
</update>
<delete id="delete" parameterType="string">
delete from LabFeeitemClass where sflbdh = #{sflbdh}
</delete>
<select id="getLabFeeitemVsClassCount" resultType="Long">
select COUNT(1) from lab_feeitem_vs_class where sflbdh = #{sflbdh}
</select>
</mapper>

View File

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.czlis.mzcx.mapper.MZCXMapper">
<select id="querySQD" resultType="com.czlis.mzcx.pojo.MzcxSqdDTO">
<![CDATA[
SELECT
lab_reqdetail.xh,
lab_reqdetail.sqxmdh,
lab_reqdetail.sqxmmc,
lab_reqdetail.sl,
lab_reqdetail.dj,
lab_reqdetail.zt as detailZT,
lab_reqdetail.jjzt as detailJJZT,
lab_reqmain.ksdh,
lab_reqmain.sqys,
lab_reqmain.sqsj,
lab_reqmain.jsys,
lab_reqmain.jssj,
lab_reqmain.brly,
lab_reqmain.brdh,
lab_reqmain.brxm,
lab_reqmain.sqh,
lab_reqmain.zt,
lab_reqmain.jjzt,
lab_reqmain.brxb,
lab_reqmain.brsr,
lab_reqmain.jzbz,
lab_reqmain.txm,
'' as cp_xmlb,
0 as cp_color,
'0' as cp_cflag,
0 as cp_row,
lab_reqdetail.bz1 as detailBZ1,
lab_reqmain.ch,
lab_reqdetail.bz2 AS detailBZ2,
lab_reqdetail.costs as detailCOSTS,
lab_reqdetail.numbk1,
lab_reqdetail.numbk2,
lab_reqdetail.dtbk1,
lab_reqdetail.dtbk2,
lab_reqmain.bz1,
lab_reqmain.bz2,
lab_reqmain.bz3,
lab_reqmain.yblx,
lab_reqmain.zxys,
lab_reqmain.zxsj,
lab_reqmain.costs,
lab_reqmain.bgddh,
lab_reqmain.nl,
lab_reqmain.nldw,
lab_reqmain.zd,
lab_reqmain.cysj
FROM lab_reqdetail,
lab_reqmain
WHERE ( lab_reqdetail.sqh = lab_reqmain.sqh ) and (lab_reqmain.brly = '1' or lab_reqmain.brly = '4' or lab_reqmain.brly = '5') and
( lab_reqmain.brdh=#{brdh} or lab_reqmain.kh = #{brdh} or lab_reqmain.bz1 = #{brdh}) and
(( lab_reqmain.zt=#{zt} ) OR (#{zt}='1' and lab_reqmain.zt<'2' AND lab_reqmain.zxsj is null)) and
( lab_reqmain.sqsj>=#{st} ) and
(lab_reqmain.sqsj <= #{et} ) and lab_reqmain.yljg = #{as_yljg}
]]>
</select>
</mapper>

View File

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.czlis.mzcx.mapper.XmFeeMapper">
<select id="query" resultType="com.czlis.mzcx.pojo.XmFee">
select * from xm_Fee
<where>
<if test="sfxmdh != null and sfxmdh != ''"> and sfxmdh = #{sfxmdh}</if>
<if test="yljg != null and yljg != ''"> and yljg = #{yljg}</if>
<if test="xmlb != null and xmlb != ''"> and xmlb = #{xmlb}</if>
</where>
</select>
<insert id="add" parameterType="com.czlis.mzcx.pojo.XmFee">
insert into xm_fee (
<if test="sfxmmc != null and sfxmmc != ''">sfxmmc,</if>
<if test="xmlb != null and xmlb != ''">xmlb,</if>
<if test="dj != null ">dj,</if>
<if test="zjf != null and zjf != ''">zjf,</if>
<if test="bz != null and bz != ''">bz,</if>
<if test="bglqdh != null and bglqdh != ''">bglqdh,</if>
<if test="spec != null and spec != ''">spec,</if>
<if test="yljg != null and yljg != ''">yljg,</if>
<if test="lisgroup != null and lisgroup != ''">lisgroup,</if>
<if test="attention != null and attention != ''">attention,</if>
<if test="indication != null and indication != ''">indication,</if>
<if test="affect != null and affect != ''">affect,</if>
sfxmdh
)values (
<if test="sfxmmc != null and sfxmmc != ''">#{sfxmmc},</if>
<if test="xmlb != null and xmlb != ''">#{xmlb},</if>
<if test="dj != null ">#{dj},</if>
<if test="zjf != null and zjf != ''">#{zjf},</if>
<if test="bz != null and bz != ''">#{bz},</if>
<if test="bglqdh != null and bglqdh != ''">#{bglqdh},</if>
<if test="spec != null and spec != ''">#{spec},</if>
<if test="yljg != null and yljg != ''">#{yljg},</if>
<if test="lisgroup != null and lisgroup != ''">#{lisgroup},</if>
<if test="attention != null and attention != ''">#{attention},</if>
<if test="indication != null and indication != ''">#{indication},</if>
<if test="affect != null and affect != ''">#{affect},</if>
#{sfxmdh}
)
</insert>
<update id="update" parameterType="com.czlis.mzcx.pojo.XmFee">
update xm_fee
<set>
<if test="sfxmmc != null and sfxmmc != ''">sfxmmc = #{sfxmmc},</if>
<if test="xmlb != null and xmlb != ''">xmlb = #{xmlb},</if>
<if test="dj != null ">dj = #{dj},</if>
<if test="zjf != null and zjf != ''">zjf = #{zjf},</if>
<if test="bz != null and bz != ''">bz = #{bz},</if>
<if test="bglqdh != null and bglqdh != ''">bglqdh = #{bglqdh},</if>
<if test="spec != null and spec != ''">spec = #{spec},</if>
<if test="yljg != null and yljg != ''">yljg = #{yljg},</if>
<if test="lisgroup != null and lisgroup != ''">lisgroup = #{lisgroup},</if>
<if test="attention != null and attention != ''">attention = #{attention},</if>
<if test="indication != null and indication != ''">indication = #{indication},</if>
<if test="affect != null and affect != ''">affect = #{affect},</if>
#{sfxmdh}
</set>
where sfxmdh = #{sfxmdh}
</update>
<delete id="delete">
delete from xm_fee where sfxmdh = #{sfxmdh}
</delete>
<select id="getXmFeeVsCount" resultType="Long">
select COUNT(1) from xm_fee_vs where sfxmdh = #{sfxmdh}
</select>
</mapper>