已修改9个文件
已添加1个文件
369 ■■■■ 文件已修改
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceExternalController.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/ExternalUserDeptInfo.java 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/IServiceExternalService.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java 118 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/ServiceSubtaskPreachformMapper.xml 74 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceExternalController.java
@@ -150,6 +150,24 @@
    }
    /**
     * æ–°å¢žç§‘室信息
     */
    @ApiOperation("新增用户信息")
    @PostMapping("/addUserDeptInfo")
    public Map<String, Object> addUserDeptInfo(@RequestBody Map dataMap) {
        Boolean aBoolean = true;
        try {
            aBoolean = serviceExternalService.addUserDeptInfo(dataMap);
        } catch (Exception e) {
            e.printStackTrace();
            log.error("serviceExternal---addUserDeptInfo出异常了:{}", e.getMessage());
            aBoolean = false;
        }
        return returnParam(aBoolean, dataMap);
    }
    /**
     * æ–°å¢žæœºæž„信息
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java
@@ -86,11 +86,16 @@
     * æŸ¥è¯¢æ‚£è€…随访信息
     */
    @ApiOperation("查询患者随访信息")
    //@PreAuthorize("@ss.hasPermi('system:taskcall:list')")
//    @Cacheable(value = "patItem", key = "T(org.springframework.util.DigestUtils).md5DigestAsHex(#serviceSubtaskVO.toString().getBytes())", unless = "#result == null or #result.isEmpty()")
    @PostMapping("/patItem")
    public TableDataInfo patItem(@RequestBody ServiceSubtaskVO serviceSubtaskVO) {
        PageUtils.startPageByPost(serviceSubtaskVO.getPageNum(), serviceSubtaskVO.getPageSize());
    public Map<String, Object> patItem(@RequestBody ServiceSubtaskVO serviceSubtaskVO) {
        if (serviceSubtaskVO.getLeavehospitaldistrictcodes() != null && serviceSubtaskVO.getLeavehospitaldistrictcodes().size() > 10) {
            throw new BaseException("病区查询数量不能超过10个");
        }
        if (serviceSubtaskVO.getLeaveldeptcodes() != null && serviceSubtaskVO.getLeaveldeptcodes().size() > 10) {
            throw new BaseException("科室查询数量不能超过10个");
        }
        serviceSubtaskVO.setPageNum(PageUtils.getOffset(serviceSubtaskVO.getPageNum(), serviceSubtaskVO.getPageSize()));
        List<ServiceSubtask> serviceSubtaskList = null;
        LoginUser loginUser = getLoginUser();
        SysUser user = loginUser.getUser();
@@ -111,21 +116,16 @@
        }
//      patItemCount è°ƒç”¨redisCache记录统计数据
//      Map<String, Object> map = patItemCount(serviceSubtaskVO);
        Map<String, Object> map = serviceSubtaskService.patItemCount(serviceSubtaskVO);
        map.put("serviceSubtaskList", serviceSubtaskList);
        List<Map<String, Object>> list = new ArrayList<>();
        list.add(map);
        //获取total
        long total = PageUtils.count(new ISelect() {
            @Override
            public void doSelect() {
                serviceSubtaskVO.setPageNum(null);
                serviceSubtaskVO.setPageSize(null);
                serviceSubtaskService.patItem(serviceSubtaskVO);
            }
        });
        return getDataTable2(total, list);
        serviceSubtaskVO.setPageNum(null);
        serviceSubtaskVO.setPageSize(null);
        List<ServiceSubtask> serviceSubtasks = serviceSubtaskService.patItem(serviceSubtaskVO);
        return getDataTable3(CollectionUtils.isNotEmpty(serviceSubtasks) ? serviceSubtasks.size() : 0L, list);
    }
    /**
@@ -490,11 +490,10 @@
        if (CollectionUtils.isEmpty(serviceSubtaskCountReq.getServiceType())) {
            return error("服务类型不能为空");
        }
        String followUpCountStyle = configService.selectConfigByKey("followUpCountStyle",
                serviceSubtaskCountReq.getOrgid());
        if (ObjectUtils.isNotEmpty(followUpCountStyle)){
        String followUpCountStyle = configService.selectConfigByKey("followUpCountStyle", serviceSubtaskCountReq.getOrgid());
        if (ObjectUtils.isNotEmpty(followUpCountStyle)) {
            serviceSubtaskCountReq.setFollowUpCountStyle(followUpCountStyle);
        }else {
        } else {
            serviceSubtaskCountReq.setFollowUpCountStyle("1");
        }
        return success(serviceSubtaskService.getSfStatistics(serviceSubtaskCountReq));
@@ -574,7 +573,7 @@
        }
        String configKey = serviceSubtaskCountReq.getConfigKey();
        if (StringUtils.isNotEmpty(configKey)) {
            String configValue = configService.selectConfigByKey(configKey,serviceSubtaskCountReq.getOrgid());
            String configValue = configService.selectConfigByKey(configKey, serviceSubtaskCountReq.getOrgid());
            serviceSubtaskCountReq.setConfigValue(configValue);
            if (StringUtils.isEmpty(configValue)) {
                String logInfo = "getSfStatisticsCount-参数 " + configKey + " æœªé…ç½®, è¯·é…ç½®å¥½åŽé‡è¯•";
@@ -599,7 +598,7 @@
        //复诊统计
        String configKey = serviceSubtaskCountReq.getConfigKey();
        if (StringUtils.isNotEmpty(configKey)) {
            String configValue = configService.selectConfigByKey(configKey,serviceSubtaskCountReq.getOrgid());
            String configValue = configService.selectConfigByKey(configKey, serviceSubtaskCountReq.getOrgid());
            if (StringUtils.isEmpty(configValue)) {
                String logInfo = "getSfStatisticsCountDetails-参数 " + configKey + " æœªé…ç½®, è¯·é…ç½®å¥½åŽé‡è¯•";
                log.error(logInfo);
ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java
@@ -935,8 +935,9 @@
            // æ‰¾åˆ°ä¸‹ä¸€ä¸ªsort对应的preachform
            String nextPreachform = serviceSubtaskPreachforms.stream().filter(item -> nextSort.equals(item.getSort())).map(ServiceSubtaskPreachform::getPreachform).findFirst().orElse("-1");
            String orgid = serviceSubtask.getOrgid();
            //微信已发送、已领取跳过短信发送,进行人工 -丽水中医院
            if (active.equals("47231022633110211A2101")) {
            if (StringUtils.isNotEmpty(orgid) && orgid.equals("47231022633110211A2101")) {
                //获取当前发送方式
                ServiceSubtaskPreachform currentServiceSubtaskPreachform = serviceSubtaskPreachforms.stream().filter(item -> item.getSort().equals(currentSort.get())).findFirst().orElse(new ServiceSubtaskPreachform());
                //当前发送方式为微信的,且下一发送方式为短信的,微信发送状态为已发送、已领取的,跳过短信步骤
smartor/src/main/java/com/smartor/domain/ExternalUserDeptInfo.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,72 @@
package com.smartor.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
 * @author æŽ¥æ”¶ç¬¬ä¸‰æ–¹ç§‘室用户信息
 * @date 2024-12-13
 */
@Data
@ApiModel(value = "ExternalUserDeptInfo", description = "接收第三方科室用户信息")
public class ExternalUserDeptInfo extends BaseEntity {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "组织机构 ID")
    private String ZuZhiJGID;
    @ApiModelProperty(value = "组织机构名称")
    private String ZuZhiJGMC;
    @ApiModelProperty(value = "科室用户 ID")
    private String KeShiYHDZID;
    @ApiModelProperty(value = "事件代码 1-新增;2-修改;3-作废")
    private String ShiJianDM;
    @ApiModelProperty(value = "事件名称 1-新增;2-修改;3-作废")
    private String ShiJianMC;
    @ApiModelProperty(value = "用户 ID")
    private String YongHuID;
    @ApiModelProperty(value = "用户姓名")
    private String YongHuXM;
    @ApiModelProperty(value = "科室 ID")
    private String KeShiID;
    @ApiModelProperty(value = "科室名称")
    private String KeShiMC;
    @ApiModelProperty(value = "创建人 ID")
    private String ChuangJianRID;
    @ApiModelProperty(value = "创建人姓名")
    private String ChuangJianRXM;
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date ChuangJianSJ;
    @ApiModelProperty(value = "修改人 ID")
    private String XiuGaiRID;
    @ApiModelProperty(value = "修改人姓名")
    private String XiuGaiRXM;
    @ApiModelProperty(value = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date XiuGaiSJ;
    @ApiModelProperty(value = "职工 ID")
    private String ZhiGongID;
    @ApiModelProperty(value = "用户登录码")
    private String YongHuDLM;
}
smartor/src/main/java/com/smartor/service/IServiceExternalService.java
@@ -32,11 +32,14 @@
    public Boolean generalInterface(@RequestBody Map dataMap);
    /**
     * æ–°å¢žç§‘室信息
     * æ–°å¢žç”¨æˆ·ä¿¡æ¯
     */
    public Boolean addUserInfo(@RequestBody Map dataMap);
    /**
     * æ–°å¢žç§‘室用户信息
     */
    public Boolean addUserDeptInfo(@RequestBody Map dataMap);
    /**
     * æ–°å¢žç§‘室信息
     */
smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java
@@ -1,8 +1,10 @@
package com.smartor.service.impl;
import cn.hutool.core.bean.BeanUtil;
import com.google.gson.Gson;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.domain.entity.SysUserDept;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.exception.base.BaseException;
import com.ruoyi.common.utils.StringUtils;
@@ -40,6 +42,8 @@
    private SysDept2Mapper sysDeptMapper;
    @Autowired
    private SysUser2Mapper sysUserMapper;
    @Autowired
    private SysUserDeptMapper sysUserDeptMapper;
    @Autowired
    private BaseOrganizationMapper baseOrganizationMapper;
    @Autowired
@@ -132,6 +136,7 @@
        log.info("ServiceExternalServiceImpl---addUserInfo的新增的值为:{}", dataMap);
        Map yeWuXX = (Map) dataMap.get("YeWuXX");
        Map<String, Object> yongHuXX = (Map<String, Object>) yeWuXX.get("YongHuXX");
        ExternalUserInfo externalUserInfo = BeanUtil.mapToBean(yongHuXX, ExternalUserInfo.class, true);
        if (ObjectUtils.isEmpty(externalUserInfo)) {
            throw new BaseException("externalUserInfo是空的,没有数据!!!");
@@ -180,6 +185,116 @@
        return true;
    }
    @Override
    public Boolean addUserDeptInfo(Map dataMap) {
        log.info("ServiceExternalServiceImpl---addUserDeptInfo的新增的值为:{}", dataMap);
        Map yeWuXX = (Map) dataMap.get("YeWuXX");
        Map<String, Object> keShiYH = (Map<String, Object>) yeWuXX.get("KeShiYH");
        ExternalUserDeptInfo externalUserDeptInfo = BeanUtil.mapToBean(keShiYH, ExternalUserDeptInfo.class, true);
        if (ObjectUtils.isEmpty(externalUserDeptInfo)) {
            throw new BaseException("externalUserDeptInfo是空的,没有数据!!!");
        }
        //获取当前用户Name对应的user信息
        SysUser sysUser = null;
        SysUser sysUserVo = new SysUser();
        sysUserVo.setUserName(externalUserDeptInfo.getYongHuDLM());
        sysUserVo.setOrgid(externalUserDeptInfo.getZuZhiJGID());
        //丽水无院区,默认值是 1
        sysUserVo.setCampusid("1");
        //根据userName判断一下,是不是之前有新增
        List<SysUser> sysUserList = sysUserMapper.selectUserList(sysUserVo);
        if (CollectionUtils.isNotEmpty(sysUserList)) {
            sysUser = sysUserList.get(0);
        }
        //获取当前科室hisDeptId对应的dept信息
        SysDept sysDept = null;
        SysDept sysDeptVo = new SysDept();
        sysDeptVo.setOrgid(externalUserDeptInfo.getZuZhiJGID());
        //丽水无院区,默认值是 1
        sysDeptVo.setCampusid("1");
        sysDeptVo.setHisDeptId(externalUserDeptInfo.getKeShiID());
        List<SysDept> sysDepts = sysDeptMapper.selectDeptList(sysDeptVo);
        if (CollectionUtils.isNotEmpty(sysDepts)) {
            sysDept = sysDepts.get(0);
        }
        if(ObjectUtils.isEmpty(sysUser)){
            log.error("ServiceExternalServiceImpl---addUserDeptInfo æ‰¾ä¸åˆ°å¯¹åº”的用户 username: {}", externalUserDeptInfo.getYongHuDLM());
            return false;
        }else if(ObjectUtils.isEmpty(sysDept)){
            log.error("ServiceExternalServiceImpl---addUserDeptInfo æ‰¾ä¸åˆ°å¯¹åº”的科室 hisDeptId: {}", externalUserDeptInfo.getKeShiID());
            return false;
        }else {
            SysUserDept sysUserDept = new SysUserDept();
            sysUserDept.setDelFlag(0L);
            sysUserDept.setUserId(sysUser.getUserId());
            sysUserDept.setUserCode(sysUser.getUserCode());
            sysUserDept.setDeptType("2");
            sysUserDept.setGuid(externalUserDeptInfo.getZuZhiJGID());
            sysUserDept.setDeptId(sysDept.getDeptId());
            sysUserDept.setDeptCode(sysDept.getDeptCode());
            sysUserDept.setDeptName(sysDept.getDeptName());
            sysUserDept.setOrgid(externalUserDeptInfo.getZuZhiJGID());
            sysUserDept.setCampusid("1");
            sysUserDept.setCreateBy(externalUserDeptInfo.getChuangJianRXM());
            sysUserDept.setCreateTime(externalUserDeptInfo.getChuangJianSJ());
            sysUserDept.setUpdateTime(externalUserDeptInfo.getXiuGaiSJ());
            sysUserDept.setUpdateBy(externalUserDeptInfo.getXiuGaiRXM());
            if (StringUtils.isNotEmpty(externalUserDeptInfo.getShiJianDM()) && externalUserDeptInfo.getShiJianDM().equals("3")) {
                sysUserDept.setDelFlag(1L);
            }
            SysUserDept sysUserDeptVo = new SysUserDept();
            sysUserDeptVo.setUserId(sysUser.getUserId());
            sysUserDeptVo.setDeptId(sysDept.getDeptId());
            sysUserDeptVo.setOrgid(externalUserDeptInfo.getZuZhiJGID());
            //丽水无院区,默认值是 1
            sysUserDeptVo.setCampusid("1");
            //根据userName判断一下,是不是之前有新增
            SysUserDept sysUserDeptOld = null;
            List<SysUserDept> sysUserDeptList = sysUserDeptMapper.selectSysUserDeptList(sysUserDeptVo);
            if (CollectionUtils.isNotEmpty(sysUserDeptList)) {
                sysUserDeptOld = sysUserDeptList.get(0);
            }
            if (ObjectUtils.isEmpty(sysUserDeptOld)) {
                int i = sysUserDeptMapper.insertSysUserDept(sysUserDept);
                log.info("ServiceExternalServiceImpl---addUserDeptInfo是否新增成功:{}", i);
            } else {
                sysUserDept.setUserId(sysUserDeptOld.getUserId());
                int i = sysUserDeptMapper.updateSysUserDept(sysUserDept);
                log.info("ServiceExternalServiceImpl---addUserDeptInfo是否修改成功03:{}", i);
            }
            //更新sys-user deptId
            if(StringUtils.isNotEmpty(externalUserDeptInfo.getKeShiID())){
                sysUser.setDeptId(Long.valueOf(externalUserDeptInfo.getKeShiID()));
                //查询用户科室关系
                SysUserDept sysUserDeptTemp = new SysUserDept();
                sysUserDeptTemp.setUserId(sysUser.getUserId());
                sysUserDeptTemp.setOrgid(externalUserDeptInfo.getZuZhiJGID());
                List<SysUserDept> sysUserDepts = sysUserDeptMapper.selectSysUserDeptList(sysUserDeptTemp);
                List<String> userDepts = sysUserDepts.stream().map(SysUserDept::getDeptCode).
                        distinct().collect(Collectors.toList());
                //和queryHospUserInfoList采集的数据格式保持一致
                List<List<String>> userDeptsList = new ArrayList<>();
                if(!sysUserDeptList.isEmpty()){
                    for(String userDept: userDepts){
                        List<String> uDept = new ArrayList<>();
                        uDept.add(userDept);
                        userDeptsList.add(uDept);
                    }
                }
                //将部门我病区放到指定字段中
                Gson gson = new Gson();
                sysUser.setHospInfo(gson.toJson(userDeptsList));
                sysUserMapper.updateUser(sysUser);
            }
        }
        return true;
    }
    private SysUser getUser(List<SysUser> sysUserList) {
        SysUser sysUser = null;
@@ -1781,6 +1896,9 @@
            case "JG_YH_JiBenXX":
                log.info("用户信息入参类型为:{}", type);
                return addUserInfo(dataMap);
            case "JG_YH_KeShiYH":
                log.info("科室用户信息入参类型为:{}", type);
                return addUserDeptInfo(dataMap);
            case "fu_task":
                log.info("fu_task服务入参类型为:{}", type);
                return addTaskInfo(dataMap);
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
@@ -386,6 +386,7 @@
        result.putIfAbsent("wzx", 0);
        result.putIfAbsent("ysf", 0);
        result.putIfAbsent("yc", 0);
        result.putIfAbsent("jg", 0);
        result.putIfAbsent("fssb", 0);
        result.putIfAbsent("yfs", 0);
        result.putIfAbsent("blq", 0);
smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
@@ -1013,7 +1013,8 @@
        where 1=1
        and del_flag = 0
        and service_type=2
        and is_visit_again = 2
        and visit_count is not null
        and visit_count = 1
        <if test="orgid != null and orgid != ''">
            and orgid = #{orgid}
        </if>
@@ -1042,7 +1043,8 @@
        where 1=1
        and del_flag = 0
        and service_type=2
        and is_visit_again = 1
        and visit_count is not null
        and visit_count > 1
        <if test="orgid != null and orgid != ''">
            and orgid = #{orgid}
        </if>
smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
@@ -230,15 +230,15 @@
            resultMap="ServiceSubtaskResult">
        <include refid="selectServiceSubtaskVo"/>
        where 1=1
            and del_flag = 0
            <if test="orgid != null and orgid != ''">
                and orgid = #{orgid}
            </if>
            <if test="taskid != null ">and taskid = #{taskid}</if>
            <if test="visitTime != null">
                AND date_format(visit_time,'%y%m%d') &lt;= date_format(#{visitTime},'%y%m%d')
            </if>
            <if test="sendstate != null ">and sendstate = #{sendstate}</if>
        and del_flag = 0
        <if test="orgid != null and orgid != ''">
            and orgid = #{orgid}
        </if>
        <if test="taskid != null ">and taskid = #{taskid}</if>
        <if test="visitTime != null">
            AND date_format(visit_time,'%y%m%d') &lt;= date_format(#{visitTime},'%y%m%d')
        </if>
        <if test="sendstate != null ">and sendstate = #{sendstate}</if>
    </select>
@@ -382,7 +382,6 @@
        <if test="excep != null ">and excep = #{excep}</if>
        <if test="nurseName != null ">and nurse_name = #{nurseName}</if>
        <if test="score != null">and score = #{score}</if>
        <!--            <if test="visitCount != null">and visit_count = #{visitCount}</if>-->
        <if test="visitCount != null and visitCount == 1">
            AND visit_count = 1
        </if>
@@ -395,10 +394,6 @@
        <if test="taskGuid != null">and task_guid = #{taskGuid}</if>
        <if test="isabnormal != null">and isabnormal = #{isabnormal}</if>
        <if test="isVisitAgain != null">and is_visit_again = #{isVisitAgain}</if>
        <!--            <if test="dateLimit != null and dateLimit = '1'"> and CURDATE() + 1 > long_send_time</if>-->
        <!-- <if test="visitTime != null">and visit_time = #{visitTime}</if> -->
        <!--<if test="visitDeptCode != null">and visit_dept_code = #{visitDeptCode}</if>
        <if test="visitDeptName != null">and visit_dept_name = #{visitDeptName}</if>-->
        <if test="visitCount != null and visitCount > 1 and visitDeptCodes != null and visitDeptCodes.size() > 0">
            AND visit_dept_code IN
            <foreach collection="visitDeptCodes" item="visitDeptCodes" open="("
@@ -415,8 +410,7 @@
        <if test="sort != null  and sort==6">order by admindate desc</if>
        <if test="sort != null  and sort==7">order by visit_time asc</if>
        <if test="sort != null  and sort==8">order by visit_time desc</if>
        <!-- order by update_time desc,id desc -->
        <if test="pageSize != null  and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if>
    </select>
    <select id="getCompensateServiceSubtaskList" parameterType="com.smartor.domain.ServiceSubtaskVO"
            resultMap="ServiceSubtaskResult">
@@ -2017,7 +2011,8 @@
        SUM(CASE WHEN sendstate >= 3 OR sendstate = 1 THEN 1 ELSE 0 END) AS yfs,
        SUM(CASE WHEN sendstate = 2 THEN 1 ELSE 0 END) AS dsf,
        SUM(CASE WHEN sendstate = 1 THEN 1 ELSE 0 END) AS blq,
        SUM(CASE WHEN excep IS NOT NULL AND excep != '0' THEN 1 ELSE 0 END) AS yc
        SUM(CASE WHEN excep IS NOT NULL AND excep != '0' THEN 1 ELSE 0 END) AS yc,
        SUM(CASE WHEN isabnormal IS NOT NULL AND isabnormal = 2 THEN 1 ELSE 0 END) AS jg
        FROM service_subtask
        where 1=1
        and del_flag = 0
smartor/src/main/resources/mapper/smartor/ServiceSubtaskPreachformMapper.xml
@@ -19,6 +19,7 @@
        <result property="updateBy" column="update_by"/>
        <result property="sort" column="sort"/>
        <result property="compensateTime" column="compensate_time"/>
        <result property="currentSendTime" column="current_send_time"/>
    </resultMap>
    <sql id="selectServiceSubtaskPreachformVo">
@@ -27,6 +28,7 @@
               taskid,
               preachform,
               sendstate,
               current_send_time,
               remark,
               orgid,
               del_flag,
@@ -43,28 +45,31 @@
            resultMap="ServiceSubtaskPreachformResult">
        <include refid="selectServiceSubtaskPreachformVo"/>
        where 1=1
            and del_flag = 0
            <if test="subid != null ">
                and subid = #{subid}
            </if>
            <if test="taskid != null ">
                and taskid = #{taskid}
            </if>
            <if test="preachform != null  and preachform != ''">
                and preachform = #{preachform}
            </if>
            <if test="sendstate != null  and sendstate != ''">
                and sendstate = #{sendstate}
            </if>
            <if test="orgid != null  and orgid != ''">
                and orgid = #{orgid}
            </if>
            <if test="sort != null ">
                and sort = #{sort}
            </if>
            <if test="compensateTime != null ">
                and compensate_time = #{compensateTime}
            </if>
        and del_flag = 0
        <if test="subid != null ">
            and subid = #{subid}
        </if>
        <if test="taskid != null ">
            and taskid = #{taskid}
        </if>
        <if test="currentSendTime != null ">
            and current_send_time = #{currentSendTime}
        </if>
        <if test="preachform != null  and preachform != ''">
            and preachform = #{preachform}
        </if>
        <if test="sendstate != null  and sendstate != ''">
            and sendstate = #{sendstate}
        </if>
        <if test="orgid != null  and orgid != ''">
            and orgid = #{orgid}
        </if>
        <if test="sort != null ">
            and sort = #{sort}
        </if>
        <if test="compensateTime != null ">
            and compensate_time = #{compensateTime}
        </if>
    </select>
    <select id="selectServiceSubtaskPreachformById" parameterType="Long"
@@ -106,6 +111,9 @@
            </if>
            <if test="compensateTime != null">compensate_time,
            </if>
            <if test="currentSendTime != null ">
                current_send_time,
            </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id},
@@ -135,6 +143,9 @@
            <if test="sort != null">#{sort},
            </if>
            <if test="compensateTime != null">#{compensateTime},
            </if>
            <if test="currentSendTime != null ">
                #{currentSendTime},
            </if>
        </trim>
    </insert>
@@ -180,6 +191,9 @@
            </if>
            <if test="compensateTime != null">compensate_time =
                #{compensateTime},
            </if>
            <if test="currentSendTime != null ">
                current_send_time = #{currentSendTime},
            </if>
        </trim>
        where id = #{id}
@@ -227,22 +241,25 @@
            <if test="compensateTime != null">compensate_time =
                #{compensateTime},
            </if>
            <if test="currentSendTime != null ">
                current_send_time = #{currentSendTime},
            </if>
        </trim>
        where 1=1
            <if test="subid != null">and subid =
                #{subid}
                #{subid},
            </if>
            <if test="taskid != null">and taskid =
                #{taskid}
                #{taskid},
            </if>
            <if test="preachform != null">and preachform =
                #{preachform}
                #{preachform},
            </if>
            <if test="remark != null">and remark =
                #{remark}
                #{remark},
            </if>
            <if test="orgid != null">and orgid =
                #{orgid}
                #{orgid},
            </if>
    </update>
@@ -274,7 +291,8 @@
        </foreach>
    </update>
    <select id="selectBySubtask" parameterType="com.smartor.domain.ServiceSubtask" resultMap="ServiceSubtaskPreachformResult">
    <select id="selectBySubtask" parameterType="com.smartor.domain.ServiceSubtask"
            resultMap="ServiceSubtaskPreachformResult">
        <include refid="selectServiceSubtaskPreachformVo"/>
        WHERE del_flag = 0
        <!-- å…¶ä»–条件 -->