Compare commits
2 Commits
5f8baa89b7
...
1a06bbff74
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1a06bbff74 | ||
|
|
a3ba3acd15 |
@ -1,15 +1,19 @@
|
||||
package com.czlis.liswork.controller.xtwh;
|
||||
|
||||
import com.czlis.common.annotation.Log;
|
||||
import com.czlis.common.core.domain.Result;
|
||||
import com.czlis.common.core.domain.entity.lis.LabInputmdl;
|
||||
import com.czlis.common.core.domain.entity.lis.LabInputmdlDetail;
|
||||
import com.czlis.common.enums.BusinessType;
|
||||
import com.czlis.liswork.pojo.DTO.LabInputmdlDTO;
|
||||
import com.czlis.liswork.service.LabInputmdlService;
|
||||
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.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Api(tags = "项目模板")
|
||||
@ -26,4 +30,39 @@ public class LabInputmdlController {
|
||||
public Result query(LabInputmdl labInputmdl) {
|
||||
return labInputmdlService.query(labInputmdl);
|
||||
}
|
||||
|
||||
@ApiOperation("查询明细数据")
|
||||
@GetMapping("/queryDetail")
|
||||
public Result queryDetail(LabInputmdl labInputmdl){
|
||||
return labInputmdlService.queryDetail(labInputmdl);
|
||||
}
|
||||
|
||||
@Log(title = "项目模板",businessType = BusinessType.INSERT)
|
||||
@ApiOperation("新增模板")
|
||||
@PostMapping("/add")
|
||||
public Result add(@RequestBody LabInputmdlDTO labInputmdlDTO){
|
||||
return labInputmdlService.add(labInputmdlDTO);
|
||||
}
|
||||
|
||||
@Log(title = "项目模板",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("修改模板")
|
||||
@PostMapping("/update")
|
||||
public Result update(@RequestBody LabInputmdlDTO labInputmdlDTO){
|
||||
return labInputmdlService.update(labInputmdlDTO);
|
||||
}
|
||||
|
||||
@Log(title = "项目模板",businessType = BusinessType.DELETE)
|
||||
@ApiOperation("删除模板")
|
||||
@GetMapping("/delete")
|
||||
public Result delete(LabInputmdl labInputmdl){
|
||||
return labInputmdlService.delete(labInputmdl);
|
||||
}
|
||||
|
||||
@Log(title = "项目模板",businessType = BusinessType.DELETE_DETAIL)
|
||||
@ApiOperation("删除明细数据")
|
||||
@GetMapping("/deleteDetail")
|
||||
public Result deleteDetail(List<LabInputmdlDetail> labInputmdlDetailList){
|
||||
return labInputmdlService.deleteDetail(labInputmdlDetailList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,9 +1,11 @@
|
||||
package com.czlis.liswork.controller.xtwh;
|
||||
|
||||
import com.czlis.common.annotation.Log;
|
||||
import com.czlis.common.core.domain.Result;
|
||||
import com.czlis.common.core.domain.entity.lis.LabTatctrl;
|
||||
import com.czlis.common.core.domain.entity.lis.XmHisreq;
|
||||
import com.czlis.common.core.domain.entity.lis.view.VwReqitemclass;
|
||||
import com.czlis.common.enums.BusinessType;
|
||||
import com.czlis.liswork.service.LabTatctrlService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@ -39,18 +41,21 @@ public class LabTatctrlController {
|
||||
return labTatctrlService.queryXmHisreq(xmHisreq);
|
||||
}
|
||||
|
||||
@Log(title = "TAT设定",businessType = BusinessType.INSERT)
|
||||
@ApiOperation("新增TAT设定")
|
||||
@PostMapping("/add")
|
||||
public Result add(@RequestBody LabTatctrl labTatctrl){
|
||||
return labTatctrlService.add(labTatctrl);
|
||||
}
|
||||
|
||||
@Log(title = "TAT设定",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("修改TAT设定")
|
||||
@PostMapping("/update")
|
||||
public Result update(@RequestBody LabTatctrl labTatctrl){
|
||||
return labTatctrlService.update(labTatctrl);
|
||||
}
|
||||
|
||||
@Log(title = "TAT设定",businessType = BusinessType.DELETE)
|
||||
@ApiOperation("删除TAT设定")
|
||||
@GetMapping("/del")
|
||||
public Result delete(LabTatctrl labTatctrl){
|
||||
|
||||
@ -0,0 +1,22 @@
|
||||
package com.czlis.liswork.mapper.xtwh;
|
||||
|
||||
import com.czlis.common.core.domain.entity.lis.LabInputmdl;
|
||||
import com.czlis.common.core.domain.entity.lis.LabInputmdlDetail;
|
||||
import com.czlis.liswork.pojo.DTO.LabInputmdlDTO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface LabInputmdlMapper {
|
||||
List<LabInputmdl> query(LabInputmdl labInputmdl);
|
||||
|
||||
List<LabInputmdlDetail> queryDetail(LabInputmdl labInputmdl);
|
||||
|
||||
void add(LabInputmdl labInputmdl);
|
||||
|
||||
void addDetail(LabInputmdlDetail labInputmdlDetail);
|
||||
|
||||
void update(LabInputmdl labInputmdl);
|
||||
void updateDetail(LabInputmdlDetail labInputmdlDetail);
|
||||
void delete(LabInputmdl labInputmdl);
|
||||
void deleteDetail(LabInputmdlDetail labInputmdlDetail);
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
package com.czlis.liswork.pojo.DTO;
|
||||
|
||||
import com.czlis.common.core.domain.entity.lis.LabInputmdl;
|
||||
import com.czlis.common.core.domain.entity.lis.LabInputmdlDetail;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class LabInputmdlDTO {
|
||||
private LabInputmdl labInputmdl;
|
||||
private List<LabInputmdlDetail> labInputmdlDetailList;
|
||||
}
|
||||
@ -2,9 +2,21 @@ package com.czlis.liswork.service;
|
||||
|
||||
import com.czlis.common.core.domain.Result;
|
||||
import com.czlis.common.core.domain.entity.lis.LabInputmdl;
|
||||
import com.czlis.common.core.domain.entity.lis.LabInputmdlDetail;
|
||||
import com.czlis.liswork.pojo.DTO.LabInputmdlDTO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface LabInputmdlService {
|
||||
Result query(LabInputmdl labInputmdl);
|
||||
|
||||
Result queryDetail(LabInputmdl labInputmdl);
|
||||
|
||||
Result add(LabInputmdlDTO labInputmdlDTO);
|
||||
|
||||
Result update(LabInputmdlDTO labInputmdlDTO);
|
||||
|
||||
Result delete(LabInputmdl labInputmdl);
|
||||
|
||||
Result deleteDetail(List<LabInputmdlDetail> labInputmdlDetail);
|
||||
}
|
||||
|
||||
@ -2,17 +2,72 @@ package com.czlis.liswork.service.impl.xtwh;
|
||||
|
||||
import com.czlis.common.core.domain.Result;
|
||||
import com.czlis.common.core.domain.entity.lis.LabInputmdl;
|
||||
import com.czlis.common.core.domain.entity.lis.LabInputmdlDetail;
|
||||
import com.czlis.liswork.mapper.xtwh.LabInputmdlMapper;
|
||||
import com.czlis.liswork.pojo.DTO.LabInputmdlDTO;
|
||||
import com.czlis.liswork.service.LabInputmdlService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
public class LabInputmdlServiceImpl implements LabInputmdlService {
|
||||
|
||||
@Autowired
|
||||
LabInputmdlMapper labInputmdlMapper;
|
||||
|
||||
@Override
|
||||
public Result query(LabInputmdl labInputmdl) {
|
||||
return null;
|
||||
List<LabInputmdl> labInputmdlList = labInputmdlMapper.query(labInputmdl);
|
||||
return new Result("0","查询成功!",labInputmdlList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result queryDetail(LabInputmdl labInputmdl) {
|
||||
List<LabInputmdlDetail> labInputmdlDetailList = labInputmdlMapper.queryDetail(labInputmdl);
|
||||
return new Result("0","查询成功!",labInputmdlDetailList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result add(LabInputmdlDTO labInputmdlDTO) {
|
||||
labInputmdlMapper.add(labInputmdlDTO.getLabInputmdl());
|
||||
List<LabInputmdlDetail> labInputmdlDetailList = labInputmdlDTO.getLabInputmdlDetailList();
|
||||
for (LabInputmdlDetail labInputmdlDetail : labInputmdlDetailList) {
|
||||
labInputmdlMapper.addDetail(labInputmdlDetail);
|
||||
}
|
||||
return new Result("0","新增成功!");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result update(LabInputmdlDTO labInputmdlDTO) {
|
||||
labInputmdlMapper.update(labInputmdlDTO.getLabInputmdl());
|
||||
List<LabInputmdlDetail> labInputmdlDetailList = labInputmdlDTO.getLabInputmdlDetailList();
|
||||
for (LabInputmdlDetail labInputmdlDetail : labInputmdlDetailList) {
|
||||
labInputmdlMapper.updateDetail(labInputmdlDetail);
|
||||
}
|
||||
return new Result("0","修改数据成功!");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result delete(LabInputmdl labInputmdl) {
|
||||
//删除列表
|
||||
labInputmdlMapper.delete(labInputmdl);
|
||||
//删除明细
|
||||
LabInputmdlDetail labInputmdlDetail = new LabInputmdlDetail();
|
||||
labInputmdlDetail.setYq(labInputmdl.getYq());
|
||||
labInputmdlDetail.setMbmc(labInputmdl.getMbmc());
|
||||
labInputmdlMapper.deleteDetail(labInputmdlDetail);
|
||||
return new Result("0","删除成功!");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result deleteDetail(List<LabInputmdlDetail> labInputmdlDetailList) {
|
||||
for (LabInputmdlDetail labInputmdlDetail : labInputmdlDetailList) {
|
||||
labInputmdlMapper.deleteDetail(labInputmdlDetail);
|
||||
}
|
||||
return new Result("0","删除明细成功!");
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
<if test="yq != null and yq != ''">and yq = #{yq}</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="querybylisgroup">
|
||||
<select id="querybylisgroup" resultType="com.czlis.common.core.domain.entity.lis.LabInstr">
|
||||
select * from lab_instr
|
||||
<where>
|
||||
<if test="lisgroup != null and lisgroup != ''">and lisgroup = #{lisgroup}</if>
|
||||
|
||||
72
liswork/src/main/resources/mapper/LabInputmdlMapper.xml
Normal file
72
liswork/src/main/resources/mapper/LabInputmdlMapper.xml
Normal file
@ -0,0 +1,72 @@
|
||||
<?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.liswork.mapper.xtwh.LabInputmdlMapper">
|
||||
|
||||
<select id="query" resultType="com.czlis.common.core.domain.entity.lis.LabInputmdl">
|
||||
select * from lab_inputmdl
|
||||
<where>
|
||||
<if test="yq != null and yq !=''"> and yq = #{yq}</if>
|
||||
<if test="mbmc != null and mbmc !=''"> and mbmc = #{mbmc}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="queryDetail" resultType="com.czlis.common.core.domain.entity.lis.LabInputmdlDetail">
|
||||
select * from lab_inputmdldetail
|
||||
<where>
|
||||
<if test="yq != null and yq !=''"> and yq = #{yq}</if>
|
||||
<if test="mbmc != null and mbmc !=''"> and mbmc = #{mbmc}</if>
|
||||
<if test="xh != null "> and xh = #{xh}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="add">
|
||||
insert into lab_inputmdl(
|
||||
yq,mbmc,srbh,zdsr,qsybh,jsybh,yblx
|
||||
)values(
|
||||
#{yq},#{mbmc},#{srbh},#{zdsr},#{qsybh},#{jsybh},#{yblx}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<insert id="addDetail">
|
||||
insert into lab_inputmdldetail(
|
||||
yq,mbmc,xh,xmdh,mrz
|
||||
)values(
|
||||
#{yq},#{mbmc},#{xh},#{xmdh},#{mrz}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update">
|
||||
update lab_inputmdl
|
||||
<set>
|
||||
<if test="mbmc != null and mbmc != ''"> mbmc = #{mbmc},</if>
|
||||
<if test="srbh != null"> srbh = #{srbh},</if>
|
||||
<if test="zdsr != null and zdsr != ''"> zdsr = #{zdsr},</if>
|
||||
<if test="qsybh != null "> qsybh = #{qsybh},</if>
|
||||
<if test="jsybh != null "> jsybh = #{jsybh},</if>
|
||||
<if test="yblx != null and yblx != ''"> yblx = #{yblx},</if>
|
||||
yq = #{yq},mbmc = #{mbmc}
|
||||
</set>
|
||||
where yq = #{yq},mbmc = #{mbmc}
|
||||
</update>
|
||||
|
||||
<update id="updateDetail">
|
||||
update lab_inputmdldetail
|
||||
<set>
|
||||
<if test="xmdh != null and xmdh != ''">xmdh = #{xmdh},</if>
|
||||
<if test="mrz != null and mrz != ''">mrz = #{mrz},</if>
|
||||
yq = #{yq},mbmc = #{mbmc},xh=#{xh}
|
||||
</set>
|
||||
where yq = #{yq},mbmc = #{mbmc},xh=#{xh}
|
||||
</update>
|
||||
|
||||
<delete id="delete">
|
||||
delete from lab_inputmdl where yq = #{yq} and mbmc = #{mbmc}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDetail">
|
||||
delete from lab_inputmdldetail where yq = #{yq} and mbmc = #{mbmc} and xh = #{xh}
|
||||
</delete>
|
||||
|
||||
|
||||
</mapper>
|
||||
@ -35,12 +35,11 @@
|
||||
delete from lab_instrvsreqclass where yq = #{yq} and bgddh = #{bgddh}
|
||||
</delete>
|
||||
|
||||
<select id="queryReqClass">
|
||||
<select id="queryReqClass" resultType="com.czlis.common.core.domain.entity.lis.view.VwReqitemclass">
|
||||
SELECT vw_reqitemclass.classno,
|
||||
vw_reqitemclass.classname,
|
||||
vw_reqitemclass.bkcolor,
|
||||
vw_reqitemclass.yblx,
|
||||
'' as cp_zjf
|
||||
vw_reqitemclass.yblx
|
||||
FROM vw_reqitemclass
|
||||
WHERE not exists
|
||||
( select * from lab_instrvsreqclass
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.czlis.liswork.mapper.dict.XmBaseMapper">
|
||||
|
||||
<select id="query">
|
||||
<select id="query" resultType="com.czlis.common.core.domain.entity.lis.XmBase">
|
||||
select * from xm_base
|
||||
<where>
|
||||
<if test="xmdh != null and xmdh != ''"> and xmdh = #{xmdh}</if>
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.czlis.liswork.mapper.dict.XmFeeInstrMapper">
|
||||
|
||||
<select id="query">
|
||||
<select id="query" resultType="com.czlis.common.core.domain.entity.lis.XmFeeInstr">
|
||||
select * from xm_feeinstr
|
||||
<where>
|
||||
<if test="yq != null and yq != ''"> and yq = #{yq}</if>
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.czlis.liswork.mapper.dict.XmReqitemVsReportitemMapper">
|
||||
|
||||
<select id="query">
|
||||
<select id="query" resultType="com.czlis.common.core.domain.entity.lis.XmReqitemVsReportitem">
|
||||
select * from xm_reqitem_vs_reportitem
|
||||
<where>
|
||||
<if test="sqxmdh != null and sqxmdh != ''">and sqxmdh = #{sqxmdh}</if>
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.czlis.liswork.mapper.xtwh.LabTatctrlMapper">
|
||||
|
||||
<select id="queryDict">
|
||||
<select id="queryDict" resultType="com.czlis.common.core.domain.entity.lis.LabTatctrl">
|
||||
select * from lab_tatctrl
|
||||
<where>
|
||||
<if test="ruleid != null"> and ruleid = #{ruleid}</if>
|
||||
@ -13,14 +13,14 @@
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="queryReqitemclass">
|
||||
<select id="queryReqitemclass" resultType="com.czlis.common.core.domain.entity.lis.view.VwReqitemclass">
|
||||
select * from vw_reqitemclass
|
||||
<where>
|
||||
<if test="classno != null and classno !=''"> and classno = #{classno}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="queryXmHisreq">
|
||||
<select id="queryXmHisreq" resultType="com.czlis.common.core.domain.entity.lis.XmHisreq">
|
||||
select * from xm_hisreq
|
||||
<where>
|
||||
<if test="sqxmdh != null and sqxmdh != ''">and sqxmdh = #{sqxmdh}</if>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user