增加平台项目维护,医疗机构级别
This commit is contained in:
parent
949df56622
commit
9aca9dc017
@ -29,4 +29,6 @@ public class RegApplyDetail {
|
||||
private String itemclass;
|
||||
private String classid;
|
||||
private String barcode;
|
||||
private String itemclass_bkcolor;
|
||||
private String itemclass_tips;
|
||||
}
|
||||
|
||||
@ -31,7 +31,7 @@ public class RegItem {
|
||||
* 状态
|
||||
* 0正常,1停用
|
||||
*/
|
||||
private String Status;
|
||||
private String status;
|
||||
private String create_by;
|
||||
private Date create_time;
|
||||
private String update_by;
|
||||
|
||||
@ -6,4 +6,5 @@ package com.transitPlatForm.interfaceCommon.constants;
|
||||
public class SysLogConstants {
|
||||
public static final String REQINPUT = "自助开单";
|
||||
public static final String DICT = "字典管理";
|
||||
public static final String ITEM = "项目管理";
|
||||
}
|
||||
|
||||
@ -7,7 +7,8 @@
|
||||
<id property="hospitalId" column="hospital_id" />
|
||||
<result property="hospitalCode" column="hospital_code" />
|
||||
<result property="hospitalName" column="hospital_name" />
|
||||
<result property="hospitalUserinfo" column="hospital_userinfo" />
|
||||
<result property="hospitalUserinfo" column="hospital_userinfo" />
|
||||
<result property="hospital_type" column="hospital_type" />
|
||||
<result property="status" column="status" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
@ -65,6 +66,7 @@
|
||||
<if test="hospitalCode != null and hospitalCode != ''">hospital_code = #{hospitalCode},</if>
|
||||
<if test="hospitalName != null and hospitalName != ''">hospital_name = #{hospitalName},</if>
|
||||
<if test="hospitalUserinfo != null">hospital_userinfo = #{hospitalUserinfo},</if>
|
||||
<if test="hospital_type != null and hospital_type != ''">hospital_type = #{hospital_type},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
@ -75,21 +77,21 @@
|
||||
|
||||
<insert id="insertHospital" parameterType="RegHospital" useGeneratedKeys="true" keyProperty="hospitalId">
|
||||
insert into Reg_hospital(
|
||||
<if test="hospitalId != null and hospitalId != 0">hospital_id,</if>
|
||||
<if test="hospitalCode != null and hospitalCode != ''">hospital_code,</if>
|
||||
<if test="hospitalName != null and hospitalName != ''">hospital_name,</if>
|
||||
<if test="hospitalUserinfo != null">hospital_userinfo,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="hospital_type != null and hospital_type != ''">hospital_type,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="hospitalId != null and hospitalId != 0">#{hospitalId},</if>
|
||||
<if test="hospitalCode != null and hospitalCode != ''">#{hospitalCode},</if>
|
||||
<if test="hospitalName != null and hospitalName != ''">#{hospitalName},</if>
|
||||
<if test="hospitalUserinfo != null">#{hospitalUserinfo},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="hospital_type != null and hospital_type != ''">#{hospital_type},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
getdate()
|
||||
)
|
||||
|
||||
@ -0,0 +1,56 @@
|
||||
package com.transitPlatForm.transitPF.controller.dict;
|
||||
|
||||
import com.transitPlatForm.common.annotation.Log;
|
||||
import com.transitPlatForm.common.core.controller.BaseController;
|
||||
import com.transitPlatForm.common.core.domain.Result;
|
||||
import com.transitPlatForm.common.core.domain.entity.reg.RegItem;
|
||||
import com.transitPlatForm.common.core.page.TableDataInfo;
|
||||
import com.transitPlatForm.common.enums.BusinessType;
|
||||
import com.transitPlatForm.interfaceCommon.constants.SysLogConstants;
|
||||
import com.transitPlatForm.transitPF.service.RegItemService;
|
||||
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("/item")
|
||||
@Slf4j
|
||||
public class RegItemController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private RegItemService regItemService;
|
||||
|
||||
@ApiOperation("获取流转项目列表")
|
||||
@GetMapping("/getList")
|
||||
public TableDataInfo getItemList(RegItem regItem){
|
||||
startPage();
|
||||
List<RegItem> regItemList = regItemService.getItemList(regItem);
|
||||
return getDataTable(regItemList);
|
||||
}
|
||||
|
||||
@Log(title = SysLogConstants.ITEM, businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ApiOperation("新增项目")
|
||||
public Result add(@RequestBody RegItem regItem){
|
||||
return regItemService.add(regItem);
|
||||
}
|
||||
|
||||
@Log(title = SysLogConstants.ITEM, businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/update")
|
||||
@ApiOperation("修改项目")
|
||||
public Result update(@RequestBody RegItem regItem){
|
||||
return regItemService.update(regItem);
|
||||
}
|
||||
|
||||
@Log(title = SysLogConstants.ITEM, businessType = BusinessType.DELETE)
|
||||
@ApiOperation("删除项目")
|
||||
@PostMapping("/delete")
|
||||
public Result delete(@RequestBody RegItem regItem){
|
||||
return regItemService.delete(regItem);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
package com.transitPlatForm.transitPF.mapper;
|
||||
|
||||
import com.transitPlatForm.common.core.domain.entity.reg.RegItem;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface RegItemMapper {
|
||||
List<RegItem> getRegItemList(RegItem regItem);
|
||||
void add(RegItem regItem);
|
||||
void update(RegItem regItem);
|
||||
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package com.transitPlatForm.transitPF.service;
|
||||
|
||||
import com.transitPlatForm.common.core.domain.Result;
|
||||
import com.transitPlatForm.common.core.domain.entity.reg.RegItem;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface RegItemService {
|
||||
List<RegItem> getItemList(RegItem regItem);
|
||||
|
||||
Result add(RegItem regItem);
|
||||
|
||||
Result update(RegItem regItem);
|
||||
|
||||
Result delete(RegItem regItem);
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package com.transitPlatForm.transitPF.service.impl;
|
||||
|
||||
import com.transitPlatForm.common.core.domain.Result;
|
||||
import com.transitPlatForm.common.core.domain.entity.reg.RegItem;
|
||||
import com.transitPlatForm.transitPF.mapper.RegItemMapper;
|
||||
import com.transitPlatForm.transitPF.service.RegItemService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class RegItemServiceImpl implements RegItemService {
|
||||
|
||||
@Autowired
|
||||
RegItemMapper regItemMapper;
|
||||
|
||||
/**
|
||||
* 获取项目列表
|
||||
* @param regItem
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<RegItem> getItemList(RegItem regItem) {
|
||||
List<RegItem> regItemList = regItemMapper.getRegItemList(regItem);
|
||||
return regItemList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增项目
|
||||
* @param regItem
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Result add(RegItem regItem) {
|
||||
regItemMapper.add(regItem);
|
||||
return new Result("0","操作成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改项目
|
||||
* @param regItem
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Result update(RegItem regItem) {
|
||||
regItemMapper.update(regItem);
|
||||
return new Result("0","操作成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 作废项目
|
||||
* @param regItem
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Result delete(RegItem regItem) {
|
||||
regItem.setStatus("1");
|
||||
regItemMapper.update(regItem);
|
||||
return new Result("0","操作成功!");
|
||||
}
|
||||
}
|
||||
@ -49,11 +49,11 @@
|
||||
|
||||
<select id="selectDictById" parameterType="Long" resultMap="RegDictResult">
|
||||
<include refid="selectDictVo"/>
|
||||
where dict_id = #{dictId}
|
||||
where dict_id = #{dictId} and status = '0'
|
||||
</select>
|
||||
<select id="selectDictByType" parameterType="Long" resultMap="RegDictResult">
|
||||
<include refid="selectDictVo"/>
|
||||
where dict_type = #{dictType}
|
||||
where dict_type = #{dictType} and status = '0'
|
||||
</select>
|
||||
|
||||
|
||||
@ -121,7 +121,7 @@
|
||||
</delete>
|
||||
|
||||
<select id="getInfoOne" resultMap="RegDictResult">
|
||||
select * from reg_dict where dict_type = #{dict_type}
|
||||
select * from reg_dict where dict_type = #{dict_type} and status = '0'
|
||||
</select>
|
||||
|
||||
<select id="getMaxDictCode">
|
||||
|
||||
40
pf_transitPF/src/main/resources/mapper/RegItemMapper.xml
Normal file
40
pf_transitPF/src/main/resources/mapper/RegItemMapper.xml
Normal file
@ -0,0 +1,40 @@
|
||||
<?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.transitPlatForm.transitPF.mapper.RegItemMapper">
|
||||
<select id="getRegItemList" resultType="com.transitPlatForm.common.core.domain.entity.reg.RegItem">
|
||||
select * from reg_item
|
||||
<where>
|
||||
<if test="itemcode != null and itemcode != ''">and itemcode = #{itemcode}</if>
|
||||
<if test="itemname != null and itemname != ''">and itemname = #{itemname}</if>
|
||||
<if test="status != null and status != ''">and Status = #{status}</if>
|
||||
<if test="itemclass != null and itemclass != ''">and itemclass = #{itemclass}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="add">
|
||||
insert into reg_item(itemcode, itemname, itemclass, status,dj,dj1,dj2,dj3,dj4)
|
||||
values(
|
||||
#{itemcode},#{itemname},#{itemclass},#{status},#{dj},#{dj1},#{dj2},#{dj3},#{dj4}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update">
|
||||
update reg_item
|
||||
<set>
|
||||
<if test="itemcode != null and itemcode != ''">itemcode = #{itemcode},</if>
|
||||
<if test="itemname != null and itemname != ''">itemname = #{itemname},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="zjf != null and zjf != ''">zjf = #{zjf},</if>
|
||||
<if test="dj != null ">dj = #{dj},</if>
|
||||
<if test="dj1 != null ">dj1 = #{dj1},</if>
|
||||
<if test="dj2 != null ">dj2 = #{dj2},</if>
|
||||
<if test="dj3 != null ">dj3 = #{dj3},</if>
|
||||
<if test="dj4 != null ">dj4 = #{dj4},</if>
|
||||
itemcode = #{itemcode}
|
||||
</set>
|
||||
where itemcode = #{itemcode}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
Loading…
x
Reference in New Issue
Block a user