Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
13d931b6e2
2
pom.xml
2
pom.xml
@ -175,8 +175,6 @@
|
||||
<artifactId>jjwt</artifactId>
|
||||
<version>${jwt.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- 验证码 -->
|
||||
<dependency>
|
||||
<groupId>pro.fessional</groupId>
|
||||
|
@ -17,6 +17,12 @@
|
||||
<groupId>zhyc</groupId>
|
||||
<artifactId>zhyc-common</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.38</version> <!-- 使用最新版本 -->
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
@ -0,0 +1,105 @@
|
||||
package com.zhyc.module.biosafety.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.SwMedicType;
|
||||
import com.zhyc.module.biosafety.service.ISwMedicTypeService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.zhyc.common.annotation.Log;
|
||||
import com.zhyc.common.core.controller.BaseController;
|
||||
import com.zhyc.common.core.domain.AjaxResult;
|
||||
import com.zhyc.common.enums.BusinessType;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 药品类型Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/biosafety/type")
|
||||
public class SwMedicTypeController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISwMedicTypeService swMedicTypeService;
|
||||
|
||||
/**
|
||||
* 查询药品类型列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:type:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SwMedicType swMedicType)
|
||||
{
|
||||
startPage();
|
||||
List<SwMedicType> list = swMedicTypeService.selectSwMedicTypeList(swMedicType);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出药品类型列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:type:export')")
|
||||
@Log(title = "药品类型", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SwMedicType swMedicType)
|
||||
{
|
||||
List<SwMedicType> list = swMedicTypeService.selectSwMedicTypeList(swMedicType);
|
||||
ExcelUtil<SwMedicType> util = new ExcelUtil<SwMedicType>(SwMedicType.class);
|
||||
util.exportExcel(response, list, "药品类型数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取药品类型详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:type:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(swMedicTypeService.selectSwMedicTypeById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增药品类型
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:type:add')")
|
||||
@Log(title = "药品类型", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SwMedicType swMedicType)
|
||||
{
|
||||
return toAjax(swMedicTypeService.insertSwMedicType(swMedicType));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改药品类型
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:type:edit')")
|
||||
@Log(title = "药品类型", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SwMedicType swMedicType)
|
||||
{
|
||||
return toAjax(swMedicTypeService.updateSwMedicType(swMedicType));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除药品类型
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:type:remove')")
|
||||
@Log(title = "药品类型", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(swMedicTypeService.deleteSwMedicTypeByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
package com.zhyc.module.biosafety.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.SwMedicine;
|
||||
import com.zhyc.module.biosafety.service.ISwMedicineService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.zhyc.common.annotation.Log;
|
||||
import com.zhyc.common.core.controller.BaseController;
|
||||
import com.zhyc.common.core.domain.AjaxResult;
|
||||
import com.zhyc.common.enums.BusinessType;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 药品Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/medicine")
|
||||
public class SwMedicineController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISwMedicineService swMedicineService;
|
||||
|
||||
/**
|
||||
* 查询药品列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:medicine:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SwMedicine swMedicine)
|
||||
{
|
||||
startPage();
|
||||
List<SwMedicine> list = swMedicineService.selectSwMedicineList(swMedicine);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出药品列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:medicine:export')")
|
||||
@Log(title = "药品", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SwMedicine swMedicine)
|
||||
{
|
||||
List<SwMedicine> list = swMedicineService.selectSwMedicineList(swMedicine);
|
||||
ExcelUtil<SwMedicine> util = new ExcelUtil<SwMedicine>(SwMedicine.class);
|
||||
util.exportExcel(response, list, "药品数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取药品详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:medicine:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(swMedicineService.selectSwMedicineById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增药品
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:medicine:add')")
|
||||
@Log(title = "药品", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SwMedicine swMedicine)
|
||||
{
|
||||
return toAjax(swMedicineService.insertSwMedicine(swMedicine));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改药品
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:medicine:edit')")
|
||||
@Log(title = "药品", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SwMedicine swMedicine)
|
||||
{
|
||||
return toAjax(swMedicineService.updateSwMedicine(swMedicine));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除药品
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:medicine:remove')")
|
||||
@Log(title = "药品", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(swMedicineService.deleteSwMedicineByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
package com.zhyc.module.biosafety.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.SwMedicineUsage;
|
||||
import com.zhyc.module.biosafety.service.ISwMedicineUsageService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.zhyc.common.annotation.Log;
|
||||
import com.zhyc.common.core.controller.BaseController;
|
||||
import com.zhyc.common.core.domain.AjaxResult;
|
||||
import com.zhyc.common.enums.BusinessType;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 药品使用记录Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/biosafety/usageInfo")
|
||||
public class SwMedicineUsageController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISwMedicineUsageService swMedicineUsageService;
|
||||
|
||||
/**
|
||||
* 查询药品使用记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:usageInfo:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SwMedicineUsage swMedicineUsage)
|
||||
{
|
||||
startPage();
|
||||
List<SwMedicineUsage> list = swMedicineUsageService.selectSwMedicineUsageList(swMedicineUsage);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出药品使用记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:usageInfo:export')")
|
||||
@Log(title = "药品使用记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SwMedicineUsage swMedicineUsage)
|
||||
{
|
||||
List<SwMedicineUsage> list = swMedicineUsageService.selectSwMedicineUsageList(swMedicineUsage);
|
||||
ExcelUtil<SwMedicineUsage> util = new ExcelUtil<SwMedicineUsage>(SwMedicineUsage.class);
|
||||
util.exportExcel(response, list, "药品使用记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取药品使用记录详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:usageInfo:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(swMedicineUsageService.selectSwMedicineUsageById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增药品使用记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:usageInfo:add')")
|
||||
@Log(title = "药品使用记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SwMedicineUsage swMedicineUsage)
|
||||
{
|
||||
return toAjax(swMedicineUsageService.insertSwMedicineUsage(swMedicineUsage));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改药品使用记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:usageInfo:edit')")
|
||||
@Log(title = "药品使用记录", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SwMedicineUsage swMedicineUsage)
|
||||
{
|
||||
return toAjax(swMedicineUsageService.updateSwMedicineUsage(swMedicineUsage));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除药品使用记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:usageInfo:remove')")
|
||||
@Log(title = "药品使用记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(swMedicineUsageService.deleteSwMedicineUsageByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
package com.zhyc.module.biosafety.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zhyc.module.biosafety.service.ISwPrescriptionService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.zhyc.common.annotation.Log;
|
||||
import com.zhyc.common.core.controller.BaseController;
|
||||
import com.zhyc.common.core.domain.AjaxResult;
|
||||
import com.zhyc.common.enums.BusinessType;
|
||||
import com.zhyc.module.biosafety.domain.SwPrescription;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 处方Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/biosafety/prescription")
|
||||
public class SwPrescriptionController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISwPrescriptionService swPrescriptionService;
|
||||
|
||||
/**
|
||||
* 查询处方列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:prescription:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SwPrescription swPrescription)
|
||||
{
|
||||
startPage();
|
||||
List<SwPrescription> list = swPrescriptionService.selectSwPrescriptionList(swPrescription);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出处方列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:prescription:export')")
|
||||
@Log(title = "处方", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SwPrescription swPrescription)
|
||||
{
|
||||
List<SwPrescription> list = swPrescriptionService.selectSwPrescriptionList(swPrescription);
|
||||
ExcelUtil<SwPrescription> util = new ExcelUtil<SwPrescription>(SwPrescription.class);
|
||||
util.exportExcel(response, list, "处方数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取处方详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:prescription:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(swPrescriptionService.selectSwPrescriptionById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增处方
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:prescription:add')")
|
||||
@Log(title = "处方", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SwPrescription swPrescription)
|
||||
{
|
||||
return toAjax(swPrescriptionService.insertSwPrescription(swPrescription));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改处方
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:prescription:edit')")
|
||||
@Log(title = "处方", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SwPrescription swPrescription)
|
||||
{
|
||||
return toAjax(swPrescriptionService.updateSwPrescription(swPrescription));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除处方
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:prescription:remove')")
|
||||
@Log(title = "处方", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(swPrescriptionService.deleteSwPrescriptionByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
package com.zhyc.module.biosafety.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.SwUnit;
|
||||
import com.zhyc.module.biosafety.service.ISwUnitService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.zhyc.common.annotation.Log;
|
||||
import com.zhyc.common.core.controller.BaseController;
|
||||
import com.zhyc.common.core.domain.AjaxResult;
|
||||
import com.zhyc.common.enums.BusinessType;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 药品单位Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/biosafety/unit")
|
||||
public class SwUnitController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISwUnitService swUnitService;
|
||||
|
||||
/**
|
||||
* 查询药品单位列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:unit:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SwUnit swUnit)
|
||||
{
|
||||
startPage();
|
||||
List<SwUnit> list = swUnitService.selectSwUnitList(swUnit);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出药品单位列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:unit:export')")
|
||||
@Log(title = "药品单位", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SwUnit swUnit)
|
||||
{
|
||||
List<SwUnit> list = swUnitService.selectSwUnitList(swUnit);
|
||||
ExcelUtil<SwUnit> util = new ExcelUtil<SwUnit>(SwUnit.class);
|
||||
util.exportExcel(response, list, "药品单位数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取药品单位详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:unit:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(swUnitService.selectSwUnitById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增药品单位
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:unit:add')")
|
||||
@Log(title = "药品单位", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SwUnit swUnit)
|
||||
{
|
||||
return toAjax(swUnitService.insertSwUnit(swUnit));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改药品单位
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:unit:edit')")
|
||||
@Log(title = "药品单位", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SwUnit swUnit)
|
||||
{
|
||||
return toAjax(swUnitService.updateSwUnit(swUnit));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除药品单位
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:unit:remove')")
|
||||
@Log(title = "药品单位", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(swUnitService.deleteSwUnitByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
package com.zhyc.module.biosafety.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.SwUsage;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.zhyc.common.annotation.Log;
|
||||
import com.zhyc.common.core.controller.BaseController;
|
||||
import com.zhyc.common.core.domain.AjaxResult;
|
||||
import com.zhyc.common.enums.BusinessType;
|
||||
import com.zhyc.module.biosafety.service.ISwUsageService;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 药品使用方法Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/biosafety/usage")
|
||||
public class SwUsageController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISwUsageService swUsageService;
|
||||
|
||||
/**
|
||||
* 查询药品使用方法列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:usage:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SwUsage swUsage)
|
||||
{
|
||||
startPage();
|
||||
List<SwUsage> list = swUsageService.selectSwUsageList(swUsage);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出药品使用方法列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:usage:export')")
|
||||
@Log(title = "药品使用方法", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SwUsage swUsage)
|
||||
{
|
||||
List<SwUsage> list = swUsageService.selectSwUsageList(swUsage);
|
||||
ExcelUtil<SwUsage> util = new ExcelUtil<SwUsage>(SwUsage.class);
|
||||
util.exportExcel(response, list, "药品使用方法数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取药品使用方法详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:usage:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(swUsageService.selectSwUsageById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增药品使用方法
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:usage:add')")
|
||||
@Log(title = "药品使用方法", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SwUsage swUsage)
|
||||
{
|
||||
return toAjax(swUsageService.insertSwUsage(swUsage));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改药品使用方法
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:usage:edit')")
|
||||
@Log(title = "药品使用方法", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SwUsage swUsage)
|
||||
{
|
||||
return toAjax(swUsageService.updateSwUsage(swUsage));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除药品使用方法
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:usage:remove')")
|
||||
@Log(title = "药品使用方法", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(swUsageService.deleteSwUsageByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
package com.zhyc.module.biosafety.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.zhyc.common.annotation.Excel;
|
||||
import com.zhyc.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 药品类型对象 sw_medic_type
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public class SwMedicType extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 编号 */
|
||||
private Long id;
|
||||
|
||||
/** 药品类型 */
|
||||
@Excel(name = "药品类型")
|
||||
private String name;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
package com.zhyc.module.biosafety.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.zhyc.common.annotation.Excel;
|
||||
import com.zhyc.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 药品对象 sw_medicine
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class SwMedicine extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** */
|
||||
private Long id;
|
||||
|
||||
/** 药品编号 */
|
||||
@Excel(name = "药品编号")
|
||||
private String medica;
|
||||
|
||||
/** 药品名称 */
|
||||
@Excel(name = "药品名称")
|
||||
private String name;
|
||||
|
||||
/** 药品类型 */
|
||||
@Excel(name = "药品类型")
|
||||
private Long medicType;
|
||||
|
||||
/** 使用方法 */
|
||||
@Excel(name = "使用方法")
|
||||
private Long usageId;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String comment;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,86 @@
|
||||
package com.zhyc.module.biosafety.domain;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.zhyc.common.annotation.Excel;
|
||||
import com.zhyc.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 药品使用记录对象 sw_medicine_usage
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-12
|
||||
*/
|
||||
public class SwMedicineUsage extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 使用名称 */
|
||||
@Excel(name = "使用名称")
|
||||
private String name;
|
||||
|
||||
/** 使用类型 */
|
||||
@Excel(name = "使用类型")
|
||||
private String useType;
|
||||
|
||||
/** 药品使用记录详情信息 */
|
||||
private List<SwMedicineUsageDetails> swMedicineUsageDetailsList;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setUseType(String useType)
|
||||
{
|
||||
this.useType = useType;
|
||||
}
|
||||
|
||||
public String getUseType()
|
||||
{
|
||||
return useType;
|
||||
}
|
||||
|
||||
public List<SwMedicineUsageDetails> getSwMedicineUsageDetailsList()
|
||||
{
|
||||
return swMedicineUsageDetailsList;
|
||||
}
|
||||
|
||||
public void setSwMedicineUsageDetailsList(List<SwMedicineUsageDetails> swMedicineUsageDetailsList)
|
||||
{
|
||||
this.swMedicineUsageDetailsList = swMedicineUsageDetailsList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.append("useType", getUseType())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("swMedicineUsageDetailsList", getSwMedicineUsageDetailsList())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
package com.zhyc.module.biosafety.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.zhyc.common.annotation.Excel;
|
||||
import com.zhyc.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 药品使用记录详情对象 sw_medicine_usage_details
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-12
|
||||
*/
|
||||
@Data
|
||||
public class SwMedicineUsageDetails extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 药品使用记录id */
|
||||
@Excel(name = "药品使用记录id")
|
||||
private Long mediUsage;
|
||||
|
||||
/** 药品id */
|
||||
@Excel(name = "药品id")
|
||||
private Long mediId;
|
||||
|
||||
/** 药品名称*/
|
||||
@Excel(name = "药品名称")
|
||||
private String mediName;
|
||||
|
||||
/** 用量 */
|
||||
@Excel(name = "用量")
|
||||
private String dosage;
|
||||
|
||||
/** 单位 */
|
||||
@Excel(name = "单位")
|
||||
private String unit;
|
||||
|
||||
/** 使用方法 */
|
||||
@Excel(name = "使用方法")
|
||||
private String usageId;
|
||||
|
||||
/** 生产厂家 */
|
||||
@Excel(name = "生产厂家")
|
||||
private String manufacturer;
|
||||
|
||||
/** 生产批号 */
|
||||
@Excel(name = "生产批号")
|
||||
private String batchNumber;
|
||||
|
||||
}
|
@ -0,0 +1,107 @@
|
||||
package com.zhyc.module.biosafety.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.zhyc.common.annotation.Excel;
|
||||
import com.zhyc.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 处方详情对象 sw_pres_detail
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public class SwPresDetail extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 处方id */
|
||||
private Long persId;
|
||||
|
||||
/** 药品id */
|
||||
@Excel(name = "药品id")
|
||||
private Integer mediId;
|
||||
|
||||
/** 用量 */
|
||||
@Excel(name = "用量")
|
||||
private BigDecimal dosage;
|
||||
|
||||
/** 单位 */
|
||||
@Excel(name = "单位")
|
||||
private Integer unitId;
|
||||
|
||||
/** 使用方法 */
|
||||
@Excel(name = "使用方法")
|
||||
private Integer usageId;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setPersId(Long persId)
|
||||
{
|
||||
this.persId = persId;
|
||||
}
|
||||
|
||||
public Long getPersId()
|
||||
{
|
||||
return persId;
|
||||
}
|
||||
public void setMediId(Integer mediId)
|
||||
{
|
||||
this.mediId = mediId;
|
||||
}
|
||||
|
||||
public Integer getMediId()
|
||||
{
|
||||
return mediId;
|
||||
}
|
||||
public void setDosage(BigDecimal dosage)
|
||||
{
|
||||
this.dosage = dosage;
|
||||
}
|
||||
|
||||
public BigDecimal getDosage()
|
||||
{
|
||||
return dosage;
|
||||
}
|
||||
public void setUnitId(Integer unitId)
|
||||
{
|
||||
this.unitId = unitId;
|
||||
}
|
||||
|
||||
public Integer getUnitId()
|
||||
{
|
||||
return unitId;
|
||||
}
|
||||
public void setUsageId(Integer usageId)
|
||||
{
|
||||
this.usageId = usageId;
|
||||
}
|
||||
|
||||
public Integer getUsageId()
|
||||
{
|
||||
return usageId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("persId", getPersId())
|
||||
.append("mediId", getMediId())
|
||||
.append("dosage", getDosage())
|
||||
.append("unitId", getUnitId())
|
||||
.append("usageId", getUsageId())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,131 @@
|
||||
package com.zhyc.module.biosafety.domain;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.zhyc.common.annotation.Excel;
|
||||
import com.zhyc.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 处方对象 sw_prescription
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public class SwPrescription extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 处方编号 */
|
||||
@Excel(name = "处方编号")
|
||||
private String no;
|
||||
|
||||
/** 处方名称 */
|
||||
@Excel(name = "处方名称")
|
||||
private String name;
|
||||
|
||||
/** 类型(免疫/保健/驱虫/消毒/疾病治疗) */
|
||||
@Excel(name = "类型", readConverterExp = "免=疫/保健/驱虫/消毒/疾病治疗")
|
||||
private Integer persType;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String comment;
|
||||
|
||||
/** 状态(0禁用1启用) */
|
||||
@Excel(name = "状态(0禁用1启用)")
|
||||
private Integer status;
|
||||
|
||||
/** 处方详情信息 */
|
||||
private List<SwPresDetail> swPresDetailList;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setNo(String no)
|
||||
{
|
||||
this.no = no;
|
||||
}
|
||||
|
||||
public String getNo()
|
||||
{
|
||||
return no;
|
||||
}
|
||||
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setPersType(Integer persType)
|
||||
{
|
||||
this.persType = persType;
|
||||
}
|
||||
|
||||
public Integer getPersType()
|
||||
{
|
||||
return persType;
|
||||
}
|
||||
|
||||
public void setComment(String comment)
|
||||
{
|
||||
this.comment = comment;
|
||||
}
|
||||
|
||||
public String getComment()
|
||||
{
|
||||
return comment;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
public List<SwPresDetail> getSwPresDetailList()
|
||||
{
|
||||
return swPresDetailList;
|
||||
}
|
||||
|
||||
public void setSwPresDetailList(List<SwPresDetail> swPresDetailList)
|
||||
{
|
||||
this.swPresDetailList = swPresDetailList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("no", getNo())
|
||||
.append("name", getName())
|
||||
.append("persType", getPersType())
|
||||
.append("comment", getComment())
|
||||
.append("status", getStatus())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("swPresDetailList", getSwPresDetailList())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package com.zhyc.module.biosafety.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.zhyc.common.annotation.Excel;
|
||||
import com.zhyc.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 药品单位对象 sw_unit
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Data
|
||||
public class SwUnit extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 编号 */
|
||||
private Long id;
|
||||
|
||||
/** 单位 */
|
||||
@Excel(name = "单位")
|
||||
private String name;
|
||||
|
||||
/* 国际单位*/
|
||||
private String unit;
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
package com.zhyc.module.biosafety.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.zhyc.common.annotation.Excel;
|
||||
import com.zhyc.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 药品使用方法对象 sw_usage
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Data
|
||||
public class SwUsage extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 编号 */
|
||||
private Long id;
|
||||
|
||||
/** 使用方法 */
|
||||
@Excel(name = "使用方法")
|
||||
private String name;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.zhyc.module.biosafety.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.SwMedicType;
|
||||
|
||||
/**
|
||||
* 药品类型Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public interface SwMedicTypeMapper
|
||||
{
|
||||
/**
|
||||
* 查询药品类型
|
||||
*
|
||||
* @param id 药品类型主键
|
||||
* @return 药品类型
|
||||
*/
|
||||
public SwMedicType selectSwMedicTypeById(Long id);
|
||||
|
||||
/**
|
||||
* 查询药品类型列表
|
||||
*
|
||||
* @param swMedicType 药品类型
|
||||
* @return 药品类型集合
|
||||
*/
|
||||
public List<SwMedicType> selectSwMedicTypeList(SwMedicType swMedicType);
|
||||
|
||||
/**
|
||||
* 新增药品类型
|
||||
*
|
||||
* @param swMedicType 药品类型
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSwMedicType(SwMedicType swMedicType);
|
||||
|
||||
/**
|
||||
* 修改药品类型
|
||||
*
|
||||
* @param swMedicType 药品类型
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSwMedicType(SwMedicType swMedicType);
|
||||
|
||||
/**
|
||||
* 删除药品类型
|
||||
*
|
||||
* @param id 药品类型主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSwMedicTypeById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除药品类型
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSwMedicTypeByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.zhyc.module.biosafety.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.biosafety.domain.SwMedicine;
|
||||
|
||||
/**
|
||||
* 药品Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public interface SwMedicineMapper
|
||||
{
|
||||
/**
|
||||
* 查询药品
|
||||
*
|
||||
* @param id 药品主键
|
||||
* @return 药品
|
||||
*/
|
||||
public SwMedicine selectSwMedicineById(Long id);
|
||||
|
||||
/**
|
||||
* 查询药品列表
|
||||
*
|
||||
* @param swMedicine 药品
|
||||
* @return 药品集合
|
||||
*/
|
||||
public List<SwMedicine> selectSwMedicineList(SwMedicine swMedicine);
|
||||
|
||||
/**
|
||||
* 新增药品
|
||||
*
|
||||
* @param swMedicine 药品
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSwMedicine(SwMedicine swMedicine);
|
||||
|
||||
/**
|
||||
* 修改药品
|
||||
*
|
||||
* @param swMedicine 药品
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSwMedicine(SwMedicine swMedicine);
|
||||
|
||||
/**
|
||||
* 删除药品
|
||||
*
|
||||
* @param id 药品主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSwMedicineById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除药品
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSwMedicineByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,88 @@
|
||||
package com.zhyc.module.biosafety.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.SwMedicineUsage;
|
||||
import com.zhyc.module.biosafety.domain.SwMedicineUsageDetails;
|
||||
|
||||
/**
|
||||
* 药品使用记录Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-12
|
||||
*/
|
||||
public interface SwMedicineUsageMapper
|
||||
{
|
||||
/**
|
||||
* 查询药品使用记录
|
||||
*
|
||||
* @param id 药品使用记录主键
|
||||
* @return 药品使用记录
|
||||
*/
|
||||
public SwMedicineUsage selectSwMedicineUsageById(Long id);
|
||||
|
||||
/**
|
||||
* 查询药品使用记录列表
|
||||
*
|
||||
* @param swMedicineUsage 药品使用记录
|
||||
* @return 药品使用记录集合
|
||||
*/
|
||||
public List<SwMedicineUsage> selectSwMedicineUsageList(SwMedicineUsage swMedicineUsage);
|
||||
|
||||
/**
|
||||
* 新增药品使用记录
|
||||
*
|
||||
* @param swMedicineUsage 药品使用记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSwMedicineUsage(SwMedicineUsage swMedicineUsage);
|
||||
|
||||
/**
|
||||
* 修改药品使用记录
|
||||
*
|
||||
* @param swMedicineUsage 药品使用记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSwMedicineUsage(SwMedicineUsage swMedicineUsage);
|
||||
|
||||
/**
|
||||
* 删除药品使用记录
|
||||
*
|
||||
* @param id 药品使用记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSwMedicineUsageById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除药品使用记录
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSwMedicineUsageByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 批量删除药品使用记录详情
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSwMedicineUsageDetailsByMediUsages(Long[] ids);
|
||||
|
||||
/**
|
||||
* 批量新增药品使用记录详情
|
||||
*
|
||||
* @param swMedicineUsageDetailsList 药品使用记录详情列表
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchSwMedicineUsageDetails(List<SwMedicineUsageDetails> swMedicineUsageDetailsList);
|
||||
|
||||
|
||||
/**
|
||||
* 通过药品使用记录主键删除药品使用记录详情信息
|
||||
*
|
||||
* @param id 药品使用记录ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSwMedicineUsageDetailsByMediUsage(Long id);
|
||||
}
|
@ -0,0 +1,87 @@
|
||||
package com.zhyc.module.biosafety.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.biosafety.domain.SwPrescription;
|
||||
import com.zhyc.module.biosafety.domain.SwPresDetail;
|
||||
|
||||
/**
|
||||
* 处方Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public interface SwPrescriptionMapper
|
||||
{
|
||||
/**
|
||||
* 查询处方
|
||||
*
|
||||
* @param id 处方主键
|
||||
* @return 处方
|
||||
*/
|
||||
public SwPrescription selectSwPrescriptionById(Long id);
|
||||
|
||||
/**
|
||||
* 查询处方列表
|
||||
*
|
||||
* @param swPrescription 处方
|
||||
* @return 处方集合
|
||||
*/
|
||||
public List<SwPrescription> selectSwPrescriptionList(SwPrescription swPrescription);
|
||||
|
||||
/**
|
||||
* 新增处方
|
||||
*
|
||||
* @param swPrescription 处方
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSwPrescription(SwPrescription swPrescription);
|
||||
|
||||
/**
|
||||
* 修改处方
|
||||
*
|
||||
* @param swPrescription 处方
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSwPrescription(SwPrescription swPrescription);
|
||||
|
||||
/**
|
||||
* 删除处方
|
||||
*
|
||||
* @param id 处方主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSwPrescriptionById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除处方
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSwPrescriptionByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 批量删除处方详情
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSwPresDetailByPersIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 批量新增处方详情
|
||||
*
|
||||
* @param swPresDetailList 处方详情列表
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchSwPresDetail(List<SwPresDetail> swPresDetailList);
|
||||
|
||||
|
||||
/**
|
||||
* 通过处方主键删除处方详情信息
|
||||
*
|
||||
* @param id 处方ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSwPresDetailByPersId(Long id);
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.zhyc.module.biosafety.mapper;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.SwUnit;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 药品单位Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public interface SwUnitMapper
|
||||
{
|
||||
/**
|
||||
* 查询药品单位
|
||||
*
|
||||
* @param id 药品单位主键
|
||||
* @return 药品单位
|
||||
*/
|
||||
public SwUnit selectSwUnitById(Long id);
|
||||
|
||||
/**
|
||||
* 查询药品单位列表
|
||||
*
|
||||
* @param swUnit 药品单位
|
||||
* @return 药品单位集合
|
||||
*/
|
||||
public List<SwUnit> selectSwUnitList(SwUnit swUnit);
|
||||
|
||||
/**
|
||||
* 新增药品单位
|
||||
*
|
||||
* @param swUnit 药品单位
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSwUnit(SwUnit swUnit);
|
||||
|
||||
/**
|
||||
* 修改药品单位
|
||||
*
|
||||
* @param swUnit 药品单位
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSwUnit(SwUnit swUnit);
|
||||
|
||||
/**
|
||||
* 删除药品单位
|
||||
*
|
||||
* @param id 药品单位主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSwUnitById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除药品单位
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSwUnitByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.zhyc.module.biosafety.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.biosafety.domain.SwUsage;
|
||||
|
||||
/**
|
||||
* 药品使用方法Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public interface SwUsageMapper
|
||||
{
|
||||
/**
|
||||
* 查询药品使用方法
|
||||
*
|
||||
* @param id 药品使用方法主键
|
||||
* @return 药品使用方法
|
||||
*/
|
||||
public SwUsage selectSwUsageById(Long id);
|
||||
|
||||
/**
|
||||
* 查询药品使用方法列表
|
||||
*
|
||||
* @param swUsage 药品使用方法
|
||||
* @return 药品使用方法集合
|
||||
*/
|
||||
public List<SwUsage> selectSwUsageList(SwUsage swUsage);
|
||||
|
||||
/**
|
||||
* 新增药品使用方法
|
||||
*
|
||||
* @param swUsage 药品使用方法
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSwUsage(SwUsage swUsage);
|
||||
|
||||
/**
|
||||
* 修改药品使用方法
|
||||
*
|
||||
* @param swUsage 药品使用方法
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSwUsage(SwUsage swUsage);
|
||||
|
||||
/**
|
||||
* 删除药品使用方法
|
||||
*
|
||||
* @param id 药品使用方法主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSwUsageById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除药品使用方法
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSwUsageByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.zhyc.module.biosafety.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.SwMedicType;
|
||||
|
||||
/**
|
||||
* 药品类型Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public interface ISwMedicTypeService
|
||||
{
|
||||
/**
|
||||
* 查询药品类型
|
||||
*
|
||||
* @param id 药品类型主键
|
||||
* @return 药品类型
|
||||
*/
|
||||
public SwMedicType selectSwMedicTypeById(Long id);
|
||||
|
||||
/**
|
||||
* 查询药品类型列表
|
||||
*
|
||||
* @param swMedicType 药品类型
|
||||
* @return 药品类型集合
|
||||
*/
|
||||
public List<SwMedicType> selectSwMedicTypeList(SwMedicType swMedicType);
|
||||
|
||||
/**
|
||||
* 新增药品类型
|
||||
*
|
||||
* @param swMedicType 药品类型
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSwMedicType(SwMedicType swMedicType);
|
||||
|
||||
/**
|
||||
* 修改药品类型
|
||||
*
|
||||
* @param swMedicType 药品类型
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSwMedicType(SwMedicType swMedicType);
|
||||
|
||||
/**
|
||||
* 批量删除药品类型
|
||||
*
|
||||
* @param ids 需要删除的药品类型主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSwMedicTypeByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除药品类型信息
|
||||
*
|
||||
* @param id 药品类型主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSwMedicTypeById(Long id);
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.zhyc.module.biosafety.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.SwMedicine;
|
||||
|
||||
/**
|
||||
* 药品Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public interface ISwMedicineService
|
||||
{
|
||||
/**
|
||||
* 查询药品
|
||||
*
|
||||
* @param id 药品主键
|
||||
* @return 药品
|
||||
*/
|
||||
public SwMedicine selectSwMedicineById(Long id);
|
||||
|
||||
/**
|
||||
* 查询药品列表
|
||||
*
|
||||
* @param swMedicine 药品
|
||||
* @return 药品集合
|
||||
*/
|
||||
public List<SwMedicine> selectSwMedicineList(SwMedicine swMedicine);
|
||||
|
||||
/**
|
||||
* 新增药品
|
||||
*
|
||||
* @param swMedicine 药品
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSwMedicine(SwMedicine swMedicine);
|
||||
|
||||
/**
|
||||
* 修改药品
|
||||
*
|
||||
* @param swMedicine 药品
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSwMedicine(SwMedicine swMedicine);
|
||||
|
||||
/**
|
||||
* 批量删除药品
|
||||
*
|
||||
* @param ids 需要删除的药品主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSwMedicineByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除药品信息
|
||||
*
|
||||
* @param id 药品主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSwMedicineById(Long id);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.zhyc.module.biosafety.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.biosafety.domain.SwMedicineUsage;
|
||||
|
||||
/**
|
||||
* 药品使用记录Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-12
|
||||
*/
|
||||
public interface ISwMedicineUsageService
|
||||
{
|
||||
/**
|
||||
* 查询药品使用记录
|
||||
*
|
||||
* @param id 药品使用记录主键
|
||||
* @return 药品使用记录
|
||||
*/
|
||||
public SwMedicineUsage selectSwMedicineUsageById(Long id);
|
||||
|
||||
/**
|
||||
* 查询药品使用记录列表
|
||||
*
|
||||
* @param swMedicineUsage 药品使用记录
|
||||
* @return 药品使用记录集合
|
||||
*/
|
||||
public List<SwMedicineUsage> selectSwMedicineUsageList(SwMedicineUsage swMedicineUsage);
|
||||
|
||||
/**
|
||||
* 新增药品使用记录
|
||||
*
|
||||
* @param swMedicineUsage 药品使用记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSwMedicineUsage(SwMedicineUsage swMedicineUsage);
|
||||
|
||||
/**
|
||||
* 修改药品使用记录
|
||||
*
|
||||
* @param swMedicineUsage 药品使用记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSwMedicineUsage(SwMedicineUsage swMedicineUsage);
|
||||
|
||||
/**
|
||||
* 批量删除药品使用记录
|
||||
*
|
||||
* @param ids 需要删除的药品使用记录主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSwMedicineUsageByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除药品使用记录信息
|
||||
*
|
||||
* @param id 药品使用记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSwMedicineUsageById(Long id);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.zhyc.module.biosafety.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.biosafety.domain.SwPrescription;
|
||||
|
||||
/**
|
||||
* 处方Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public interface ISwPrescriptionService
|
||||
{
|
||||
/**
|
||||
* 查询处方
|
||||
*
|
||||
* @param id 处方主键
|
||||
* @return 处方
|
||||
*/
|
||||
public SwPrescription selectSwPrescriptionById(Long id);
|
||||
|
||||
/**
|
||||
* 查询处方列表
|
||||
*
|
||||
* @param swPrescription 处方
|
||||
* @return 处方集合
|
||||
*/
|
||||
public List<SwPrescription> selectSwPrescriptionList(SwPrescription swPrescription);
|
||||
|
||||
/**
|
||||
* 新增处方
|
||||
*
|
||||
* @param swPrescription 处方
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSwPrescription(SwPrescription swPrescription);
|
||||
|
||||
/**
|
||||
* 修改处方
|
||||
*
|
||||
* @param swPrescription 处方
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSwPrescription(SwPrescription swPrescription);
|
||||
|
||||
/**
|
||||
* 批量删除处方
|
||||
*
|
||||
* @param ids 需要删除的处方主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSwPrescriptionByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除处方信息
|
||||
*
|
||||
* @param id 处方主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSwPrescriptionById(Long id);
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.zhyc.module.biosafety.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.SwUnit;
|
||||
|
||||
/**
|
||||
* 药品单位Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public interface ISwUnitService
|
||||
{
|
||||
/**
|
||||
* 查询药品单位
|
||||
*
|
||||
* @param id 药品单位主键
|
||||
* @return 药品单位
|
||||
*/
|
||||
public SwUnit selectSwUnitById(Long id);
|
||||
|
||||
/**
|
||||
* 查询药品单位列表
|
||||
*
|
||||
* @param swUnit 药品单位
|
||||
* @return 药品单位集合
|
||||
*/
|
||||
public List<SwUnit> selectSwUnitList(SwUnit swUnit);
|
||||
|
||||
/**
|
||||
* 新增药品单位
|
||||
*
|
||||
* @param swUnit 药品单位
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSwUnit(SwUnit swUnit);
|
||||
|
||||
/**
|
||||
* 修改药品单位
|
||||
*
|
||||
* @param swUnit 药品单位
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSwUnit(SwUnit swUnit);
|
||||
|
||||
/**
|
||||
* 批量删除药品单位
|
||||
*
|
||||
* @param ids 需要删除的药品单位主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSwUnitByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除药品单位信息
|
||||
*
|
||||
* @param id 药品单位主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSwUnitById(Long id);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.zhyc.module.biosafety.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.biosafety.domain.SwUsage;
|
||||
|
||||
/**
|
||||
* 药品使用方法Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public interface ISwUsageService
|
||||
{
|
||||
/**
|
||||
* 查询药品使用方法
|
||||
*
|
||||
* @param id 药品使用方法主键
|
||||
* @return 药品使用方法
|
||||
*/
|
||||
public SwUsage selectSwUsageById(Long id);
|
||||
|
||||
/**
|
||||
* 查询药品使用方法列表
|
||||
*
|
||||
* @param swUsage 药品使用方法
|
||||
* @return 药品使用方法集合
|
||||
*/
|
||||
public List<SwUsage> selectSwUsageList(SwUsage swUsage);
|
||||
|
||||
/**
|
||||
* 新增药品使用方法
|
||||
*
|
||||
* @param swUsage 药品使用方法
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSwUsage(SwUsage swUsage);
|
||||
|
||||
/**
|
||||
* 修改药品使用方法
|
||||
*
|
||||
* @param swUsage 药品使用方法
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSwUsage(SwUsage swUsage);
|
||||
|
||||
/**
|
||||
* 批量删除药品使用方法
|
||||
*
|
||||
* @param ids 需要删除的药品使用方法主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSwUsageByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除药品使用方法信息
|
||||
*
|
||||
* @param id 药品使用方法主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSwUsageById(Long id);
|
||||
}
|
@ -0,0 +1,94 @@
|
||||
package com.zhyc.module.biosafety.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.SwMedicType;
|
||||
import com.zhyc.module.biosafety.mapper.SwMedicTypeMapper;
|
||||
import com.zhyc.module.biosafety.service.ISwMedicTypeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 药品类型Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Service
|
||||
public class SwMedicTypeServiceImpl implements ISwMedicTypeService
|
||||
{
|
||||
@Autowired
|
||||
private SwMedicTypeMapper swMedicTypeMapper;
|
||||
|
||||
/**
|
||||
* 查询药品类型
|
||||
*
|
||||
* @param id 药品类型主键
|
||||
* @return 药品类型
|
||||
*/
|
||||
@Override
|
||||
public SwMedicType selectSwMedicTypeById(Long id)
|
||||
{
|
||||
return swMedicTypeMapper.selectSwMedicTypeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询药品类型列表
|
||||
*
|
||||
* @param swMedicType 药品类型
|
||||
* @return 药品类型
|
||||
*/
|
||||
@Override
|
||||
public List<SwMedicType> selectSwMedicTypeList(SwMedicType swMedicType)
|
||||
{
|
||||
return swMedicTypeMapper.selectSwMedicTypeList(swMedicType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增药品类型
|
||||
*
|
||||
* @param swMedicType 药品类型
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSwMedicType(SwMedicType swMedicType)
|
||||
{
|
||||
return swMedicTypeMapper.insertSwMedicType(swMedicType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改药品类型
|
||||
*
|
||||
* @param swMedicType 药品类型
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSwMedicType(SwMedicType swMedicType)
|
||||
{
|
||||
return swMedicTypeMapper.updateSwMedicType(swMedicType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除药品类型
|
||||
*
|
||||
* @param ids 需要删除的药品类型主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSwMedicTypeByIds(Long[] ids)
|
||||
{
|
||||
return swMedicTypeMapper.deleteSwMedicTypeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除药品类型信息
|
||||
*
|
||||
* @param id 药品类型主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSwMedicTypeById(Long id)
|
||||
{
|
||||
return swMedicTypeMapper.deleteSwMedicTypeById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,94 @@
|
||||
package com.zhyc.module.biosafety.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.SwMedicine;
|
||||
import com.zhyc.module.biosafety.mapper.SwMedicineMapper;
|
||||
import com.zhyc.module.biosafety.service.ISwMedicineService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 药品Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Service
|
||||
public class SwMedicineServiceImpl implements ISwMedicineService
|
||||
{
|
||||
@Autowired
|
||||
private SwMedicineMapper swMedicineMapper;
|
||||
|
||||
/**
|
||||
* 查询药品
|
||||
*
|
||||
* @param id 药品主键
|
||||
* @return 药品
|
||||
*/
|
||||
@Override
|
||||
public SwMedicine selectSwMedicineById(Long id)
|
||||
{
|
||||
return swMedicineMapper.selectSwMedicineById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询药品列表
|
||||
*
|
||||
* @param swMedicine 药品
|
||||
* @return 药品
|
||||
*/
|
||||
@Override
|
||||
public List<SwMedicine> selectSwMedicineList(SwMedicine swMedicine)
|
||||
{
|
||||
return swMedicineMapper.selectSwMedicineList(swMedicine);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增药品
|
||||
*
|
||||
* @param swMedicine 药品
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSwMedicine(SwMedicine swMedicine)
|
||||
{
|
||||
return swMedicineMapper.insertSwMedicine(swMedicine);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改药品
|
||||
*
|
||||
* @param swMedicine 药品
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSwMedicine(SwMedicine swMedicine)
|
||||
{
|
||||
return swMedicineMapper.updateSwMedicine(swMedicine);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除药品
|
||||
*
|
||||
* @param ids 需要删除的药品主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSwMedicineByIds(Long[] ids)
|
||||
{
|
||||
return swMedicineMapper.deleteSwMedicineByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除药品信息
|
||||
*
|
||||
* @param id 药品主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSwMedicineById(Long id)
|
||||
{
|
||||
return swMedicineMapper.deleteSwMedicineById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,134 @@
|
||||
package com.zhyc.module.biosafety.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.common.utils.DateUtils;
|
||||
import com.zhyc.module.biosafety.service.ISwMedicineUsageService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.ArrayList;
|
||||
import com.zhyc.common.utils.StringUtils;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import com.zhyc.module.biosafety.domain.SwMedicineUsageDetails;
|
||||
import com.zhyc.module.biosafety.mapper.SwMedicineUsageMapper;
|
||||
import com.zhyc.module.biosafety.domain.SwMedicineUsage;
|
||||
|
||||
/**
|
||||
* 药品使用记录Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-12
|
||||
*/
|
||||
@Service
|
||||
public class SwMedicineUsageServiceImpl implements ISwMedicineUsageService
|
||||
{
|
||||
@Autowired
|
||||
private SwMedicineUsageMapper swMedicineUsageMapper;
|
||||
|
||||
/**
|
||||
* 查询药品使用记录
|
||||
*
|
||||
* @param id 药品使用记录主键
|
||||
* @return 药品使用记录
|
||||
*/
|
||||
@Override
|
||||
public SwMedicineUsage selectSwMedicineUsageById(Long id)
|
||||
{
|
||||
return swMedicineUsageMapper.selectSwMedicineUsageById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询药品使用记录列表
|
||||
*
|
||||
* @param swMedicineUsage 药品使用记录
|
||||
* @return 药品使用记录
|
||||
*/
|
||||
@Override
|
||||
public List<SwMedicineUsage> selectSwMedicineUsageList(SwMedicineUsage swMedicineUsage)
|
||||
{
|
||||
return swMedicineUsageMapper.selectSwMedicineUsageList(swMedicineUsage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增药品使用记录
|
||||
*
|
||||
* @param swMedicineUsage 药品使用记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int insertSwMedicineUsage(SwMedicineUsage swMedicineUsage)
|
||||
{
|
||||
swMedicineUsage.setCreateTime(DateUtils.getNowDate());
|
||||
int rows = swMedicineUsageMapper.insertSwMedicineUsage(swMedicineUsage);
|
||||
insertSwMedicineUsageDetails(swMedicineUsage);
|
||||
return rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改药品使用记录
|
||||
*
|
||||
* @param swMedicineUsage 药品使用记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int updateSwMedicineUsage(SwMedicineUsage swMedicineUsage)
|
||||
{
|
||||
swMedicineUsage.setUpdateTime(DateUtils.getNowDate());
|
||||
swMedicineUsageMapper.deleteSwMedicineUsageDetailsByMediUsage(swMedicineUsage.getId());
|
||||
insertSwMedicineUsageDetails(swMedicineUsage);
|
||||
return swMedicineUsageMapper.updateSwMedicineUsage(swMedicineUsage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除药品使用记录
|
||||
*
|
||||
* @param ids 需要删除的药品使用记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int deleteSwMedicineUsageByIds(Long[] ids)
|
||||
{
|
||||
swMedicineUsageMapper.deleteSwMedicineUsageDetailsByMediUsages(ids);
|
||||
return swMedicineUsageMapper.deleteSwMedicineUsageByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除药品使用记录信息
|
||||
*
|
||||
* @param id 药品使用记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int deleteSwMedicineUsageById(Long id)
|
||||
{
|
||||
swMedicineUsageMapper.deleteSwMedicineUsageDetailsByMediUsage(id);
|
||||
return swMedicineUsageMapper.deleteSwMedicineUsageById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增药品使用记录详情信息
|
||||
*
|
||||
* @param swMedicineUsage 药品使用记录对象
|
||||
*/
|
||||
public void insertSwMedicineUsageDetails(SwMedicineUsage swMedicineUsage)
|
||||
{
|
||||
List<SwMedicineUsageDetails> swMedicineUsageDetailsList = swMedicineUsage.getSwMedicineUsageDetailsList();
|
||||
Long id = swMedicineUsage.getId();
|
||||
if (StringUtils.isNotNull(swMedicineUsageDetailsList))
|
||||
{
|
||||
List<SwMedicineUsageDetails> list = new ArrayList<SwMedicineUsageDetails>();
|
||||
for (SwMedicineUsageDetails swMedicineUsageDetails : swMedicineUsageDetailsList)
|
||||
{
|
||||
swMedicineUsageDetails.setMediUsage(id);
|
||||
list.add(swMedicineUsageDetails);
|
||||
}
|
||||
if (list.size() > 0)
|
||||
{
|
||||
swMedicineUsageMapper.batchSwMedicineUsageDetails(list);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,134 @@
|
||||
package com.zhyc.module.biosafety.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.common.utils.DateUtils;
|
||||
import com.zhyc.module.biosafety.domain.SwPresDetail;
|
||||
import com.zhyc.module.biosafety.domain.SwPrescription;
|
||||
import com.zhyc.module.biosafety.mapper.SwPrescriptionMapper;
|
||||
import com.zhyc.module.biosafety.service.ISwPrescriptionService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.ArrayList;
|
||||
import com.zhyc.common.utils.StringUtils;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 处方Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Service
|
||||
public class SwPrescriptionServiceImpl implements ISwPrescriptionService
|
||||
{
|
||||
@Autowired
|
||||
private SwPrescriptionMapper swPrescriptionMapper;
|
||||
|
||||
/**
|
||||
* 查询处方
|
||||
*
|
||||
* @param id 处方主键
|
||||
* @return 处方
|
||||
*/
|
||||
@Override
|
||||
public SwPrescription selectSwPrescriptionById(Long id)
|
||||
{
|
||||
return swPrescriptionMapper.selectSwPrescriptionById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询处方列表
|
||||
*
|
||||
* @param swPrescription 处方
|
||||
* @return 处方
|
||||
*/
|
||||
@Override
|
||||
public List<SwPrescription> selectSwPrescriptionList(SwPrescription swPrescription)
|
||||
{
|
||||
return swPrescriptionMapper.selectSwPrescriptionList(swPrescription);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增处方
|
||||
*
|
||||
* @param swPrescription 处方
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int insertSwPrescription(SwPrescription swPrescription)
|
||||
{
|
||||
swPrescription.setCreateTime(DateUtils.getNowDate());
|
||||
int rows = swPrescriptionMapper.insertSwPrescription(swPrescription);
|
||||
insertSwPresDetail(swPrescription);
|
||||
return rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改处方
|
||||
*
|
||||
* @param swPrescription 处方
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int updateSwPrescription(SwPrescription swPrescription)
|
||||
{
|
||||
swPrescription.setUpdateTime(DateUtils.getNowDate());
|
||||
swPrescriptionMapper.deleteSwPresDetailByPersId(swPrescription.getId());
|
||||
insertSwPresDetail(swPrescription);
|
||||
return swPrescriptionMapper.updateSwPrescription(swPrescription);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除处方
|
||||
*
|
||||
* @param ids 需要删除的处方主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int deleteSwPrescriptionByIds(Long[] ids)
|
||||
{
|
||||
swPrescriptionMapper.deleteSwPresDetailByPersIds(ids);
|
||||
return swPrescriptionMapper.deleteSwPrescriptionByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除处方信息
|
||||
*
|
||||
* @param id 处方主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int deleteSwPrescriptionById(Long id)
|
||||
{
|
||||
swPrescriptionMapper.deleteSwPresDetailByPersId(id);
|
||||
return swPrescriptionMapper.deleteSwPrescriptionById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增处方详情信息
|
||||
*
|
||||
* @param swPrescription 处方对象
|
||||
*/
|
||||
public void insertSwPresDetail(SwPrescription swPrescription)
|
||||
{
|
||||
List<SwPresDetail> swPresDetailList = swPrescription.getSwPresDetailList();
|
||||
Long id = swPrescription.getId();
|
||||
if (StringUtils.isNotNull(swPresDetailList))
|
||||
{
|
||||
List<SwPresDetail> list = new ArrayList<SwPresDetail>();
|
||||
for (SwPresDetail swPresDetail : swPresDetailList)
|
||||
{
|
||||
swPresDetail.setPersId(id);
|
||||
list.add(swPresDetail);
|
||||
}
|
||||
if (list.size() > 0)
|
||||
{
|
||||
swPrescriptionMapper.batchSwPresDetail(list);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,95 @@
|
||||
package com.zhyc.module.biosafety.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.SwUnit;
|
||||
import com.zhyc.module.biosafety.mapper.SwUnitMapper;
|
||||
import com.zhyc.module.biosafety.service.ISwUnitService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
||||
/**
|
||||
* 药品单位Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Service
|
||||
public class SwUnitServiceImpl implements ISwUnitService
|
||||
{
|
||||
@Autowired
|
||||
private SwUnitMapper swUnitMapper;
|
||||
|
||||
/**
|
||||
* 查询药品单位
|
||||
*
|
||||
* @param id 药品单位主键
|
||||
* @return 药品单位
|
||||
*/
|
||||
@Override
|
||||
public SwUnit selectSwUnitById(Long id)
|
||||
{
|
||||
return swUnitMapper.selectSwUnitById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询药品单位列表
|
||||
*
|
||||
* @param swUnit 药品单位
|
||||
* @return 药品单位
|
||||
*/
|
||||
@Override
|
||||
public List<SwUnit> selectSwUnitList(SwUnit swUnit)
|
||||
{
|
||||
return swUnitMapper.selectSwUnitList(swUnit);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增药品单位
|
||||
*
|
||||
* @param swUnit 药品单位
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSwUnit(SwUnit swUnit)
|
||||
{
|
||||
return swUnitMapper.insertSwUnit(swUnit);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改药品单位
|
||||
*
|
||||
* @param swUnit 药品单位
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSwUnit(SwUnit swUnit)
|
||||
{
|
||||
return swUnitMapper.updateSwUnit(swUnit);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除药品单位
|
||||
*
|
||||
* @param ids 需要删除的药品单位主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSwUnitByIds(Long[] ids)
|
||||
{
|
||||
return swUnitMapper.deleteSwUnitByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除药品单位信息
|
||||
*
|
||||
* @param id 药品单位主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSwUnitById(Long id)
|
||||
{
|
||||
return swUnitMapper.deleteSwUnitById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,94 @@
|
||||
package com.zhyc.module.biosafety.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.SwUsage;
|
||||
import com.zhyc.module.biosafety.mapper.SwUsageMapper;
|
||||
import com.zhyc.module.biosafety.service.ISwUsageService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 药品使用方法Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Service
|
||||
public class SwUsageServiceImpl implements ISwUsageService
|
||||
{
|
||||
@Autowired
|
||||
private SwUsageMapper swUsageMapper;
|
||||
|
||||
/**
|
||||
* 查询药品使用方法
|
||||
*
|
||||
* @param id 药品使用方法主键
|
||||
* @return 药品使用方法
|
||||
*/
|
||||
@Override
|
||||
public SwUsage selectSwUsageById(Long id)
|
||||
{
|
||||
return swUsageMapper.selectSwUsageById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询药品使用方法列表
|
||||
*
|
||||
* @param swUsage 药品使用方法
|
||||
* @return 药品使用方法
|
||||
*/
|
||||
@Override
|
||||
public List<SwUsage> selectSwUsageList(SwUsage swUsage)
|
||||
{
|
||||
return swUsageMapper.selectSwUsageList(swUsage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增药品使用方法
|
||||
*
|
||||
* @param swUsage 药品使用方法
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSwUsage(SwUsage swUsage)
|
||||
{
|
||||
return swUsageMapper.insertSwUsage(swUsage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改药品使用方法
|
||||
*
|
||||
* @param swUsage 药品使用方法
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSwUsage(SwUsage swUsage)
|
||||
{
|
||||
return swUsageMapper.updateSwUsage(swUsage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除药品使用方法
|
||||
*
|
||||
* @param ids 需要删除的药品使用方法主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSwUsageByIds(Long[] ids)
|
||||
{
|
||||
return swUsageMapper.deleteSwUsageByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除药品使用方法信息
|
||||
*
|
||||
* @param id 药品使用方法主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSwUsageById(Long id)
|
||||
{
|
||||
return swUsageMapper.deleteSwUsageById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,137 @@
|
||||
package com.zhyc.module.produce.breed.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.zhyc.common.annotation.Log;
|
||||
import com.zhyc.common.core.controller.BaseController;
|
||||
import com.zhyc.common.core.domain.AjaxResult;
|
||||
import com.zhyc.common.enums.BusinessType;
|
||||
import com.zhyc.module.produce.breed.domain.ScLambingRecord;
|
||||
import com.zhyc.module.produce.breed.domain.ScLambDetail;
|
||||
import com.zhyc.module.produce.breed.service.IScLambingRecordService;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 产羔记录Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/breed/lambing_records")
|
||||
public class ScLambingRecordController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IScLambingRecordService scLambingRecordService;
|
||||
|
||||
/**
|
||||
* 查询产羔记录列表(包含关联信息)
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('breed:lambing_records:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ScLambingRecord scLambingRecord)
|
||||
{
|
||||
startPage();
|
||||
List<ScLambingRecord> list = scLambingRecordService.selectScLambingRecordList(scLambingRecord);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出产羔记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('breed:lambing_records:export')")
|
||||
@Log(title = "产羔记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ScLambingRecord scLambingRecord)
|
||||
{
|
||||
List<ScLambingRecord> list = scLambingRecordService.selectScLambingRecordList(scLambingRecord);
|
||||
ExcelUtil<ScLambingRecord> util = new ExcelUtil<ScLambingRecord>(ScLambingRecord.class);
|
||||
util.exportExcel(response, list, "产羔记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取产羔记录详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('breed:lambing_records:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(scLambingRecordService.selectScLambingRecordById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取产羔记录详细信息(包含关联信息)
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('breed:lambing_records:query')")
|
||||
@GetMapping(value = "/detail/{id}")
|
||||
public AjaxResult getDetailInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(scLambingRecordService.selectScLambingRecordDetailById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询产羔详情(羔羊信息列表)
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('breed:lambing_records:query')")
|
||||
@GetMapping("/lamb_detail/{lambingRecordId}")
|
||||
public AjaxResult getLambDetail(@PathVariable("lambingRecordId") Long lambingRecordId)
|
||||
{
|
||||
List<ScLambDetail> list = scLambingRecordService.selectLambDetailByLambingRecordId(lambingRecordId);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增产羔记录(包含羔羊详情)
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('breed:lambing_records:add')")
|
||||
@Log(title = "产羔记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ScLambingRecord scLambingRecord)
|
||||
{
|
||||
return toAjax(scLambingRecordService.insertScLambingRecord(scLambingRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改产羔记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('breed:lambing_records:edit')")
|
||||
@Log(title = "产羔记录", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ScLambingRecord scLambingRecord)
|
||||
{
|
||||
return toAjax(scLambingRecordService.updateScLambingRecord(scLambingRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除产羔记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('breed:lambing_records:remove')")
|
||||
@Log(title = "产羔记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(scLambingRecordService.deleteScLambingRecordByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量新增羔羊详情
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('breed:lambing_records:add')")
|
||||
@Log(title = "羔羊详情", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/lamb_details/batch")
|
||||
public AjaxResult addLambDetailsBatch(@RequestBody List<ScLambDetail> lambDetails)
|
||||
{
|
||||
return toAjax(scLambingRecordService.insertLambDetailsBatch(lambDetails));
|
||||
}
|
||||
}
|
@ -0,0 +1,163 @@
|
||||
package com.zhyc.module.produce.breed.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.zhyc.common.annotation.Excel;
|
||||
import com.zhyc.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 羔羊详情对象 sc_lamb_detail
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public class ScLambDetail extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 产羔记录ID */
|
||||
@Excel(name = "产羔记录ID")
|
||||
private Long lambingRecordId;
|
||||
|
||||
/** 羔羊耳号 */
|
||||
@Excel(name = "羔羊耳号")
|
||||
private String lambEarNumber;
|
||||
|
||||
/** 羔羊品种 */
|
||||
@Excel(name = "羔羊品种")
|
||||
private String lambBreed;
|
||||
|
||||
/** 性别 */
|
||||
@Excel(name = "性别")
|
||||
private String gender;
|
||||
|
||||
/** 出生重量 */
|
||||
@Excel(name = "出生重量")
|
||||
private BigDecimal birthWeight;
|
||||
|
||||
/** 是否留养 */
|
||||
@Excel(name = "是否留养")
|
||||
private Boolean isRetained;
|
||||
|
||||
/** 家系 */
|
||||
@Excel(name = "家系")
|
||||
private String lineage;
|
||||
|
||||
/** 生日 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "生日", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date birthday;
|
||||
|
||||
// getter和setter方法
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setLambingRecordId(Long lambingRecordId)
|
||||
{
|
||||
this.lambingRecordId = lambingRecordId;
|
||||
}
|
||||
|
||||
public Long getLambingRecordId()
|
||||
{
|
||||
return lambingRecordId;
|
||||
}
|
||||
|
||||
public void setLambEarNumber(String lambEarNumber)
|
||||
{
|
||||
this.lambEarNumber = lambEarNumber;
|
||||
}
|
||||
|
||||
public String getLambEarNumber()
|
||||
{
|
||||
return lambEarNumber;
|
||||
}
|
||||
|
||||
public void setLambBreed(String lambBreed)
|
||||
{
|
||||
this.lambBreed = lambBreed;
|
||||
}
|
||||
|
||||
public String getLambBreed()
|
||||
{
|
||||
return lambBreed;
|
||||
}
|
||||
|
||||
public void setGender(String gender)
|
||||
{
|
||||
this.gender = gender;
|
||||
}
|
||||
|
||||
public String getGender()
|
||||
{
|
||||
return gender;
|
||||
}
|
||||
|
||||
public void setBirthWeight(BigDecimal birthWeight)
|
||||
{
|
||||
this.birthWeight = birthWeight;
|
||||
}
|
||||
|
||||
public BigDecimal getBirthWeight()
|
||||
{
|
||||
return birthWeight;
|
||||
}
|
||||
|
||||
public void setIsRetained(Boolean isRetained)
|
||||
{
|
||||
this.isRetained = isRetained;
|
||||
}
|
||||
|
||||
public Boolean getIsRetained()
|
||||
{
|
||||
return isRetained;
|
||||
}
|
||||
|
||||
public void setLineage(String lineage)
|
||||
{
|
||||
this.lineage = lineage;
|
||||
}
|
||||
|
||||
public String getLineage()
|
||||
{
|
||||
return lineage;
|
||||
}
|
||||
|
||||
public void setBirthday(Date birthday)
|
||||
{
|
||||
this.birthday = birthday;
|
||||
}
|
||||
|
||||
public Date getBirthday()
|
||||
{
|
||||
return birthday;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("lambingRecordId", getLambingRecordId())
|
||||
.append("lambEarNumber", getLambEarNumber())
|
||||
.append("lambBreed", getLambBreed())
|
||||
.append("gender", getGender())
|
||||
.append("birthWeight", getBirthWeight())
|
||||
.append("isRetained", getIsRetained())
|
||||
.append("lineage", getLineage())
|
||||
.append("birthday", getBirthday())
|
||||
.append("createTime", getCreateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,390 @@
|
||||
package com.zhyc.module.produce.breed.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.zhyc.common.annotation.Excel;
|
||||
import com.zhyc.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 产羔记录对象 sc_lambing_record
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public class ScLambingRecord extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 羊只id */
|
||||
@Excel(name = "羊只id")
|
||||
private String sheepId;
|
||||
|
||||
/** 胎次 */
|
||||
@Excel(name = "胎次")
|
||||
private Long parity;
|
||||
|
||||
/** 产羔数量 */
|
||||
@Excel(name = "产羔数量")
|
||||
private Long lambsBorn;
|
||||
|
||||
/** 活羔数量 */
|
||||
@Excel(name = "活羔数量")
|
||||
private Long survival;
|
||||
|
||||
/** 技术员 */
|
||||
@Excel(name = "技术员")
|
||||
private String technician;
|
||||
|
||||
/** 产羔评分 */
|
||||
@Excel(name = "产羔评分")
|
||||
private Long score;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String comment;
|
||||
|
||||
/** 创建日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createTme;
|
||||
|
||||
// ========== 关联查询字段(简化版) ==========
|
||||
|
||||
/** 母羊耳号 */
|
||||
@Excel(name = "母羊耳号")
|
||||
private String femaleEarNumber;
|
||||
|
||||
/** 母羊品种 */
|
||||
@Excel(name = "母羊品种")
|
||||
private String femaleBreed;
|
||||
|
||||
/** 月龄 */
|
||||
@Excel(name = "月龄")
|
||||
private Integer monthAge;
|
||||
|
||||
/** 当前羊舍 */
|
||||
@Excel(name = "当前羊舍")
|
||||
private String currentShed;
|
||||
|
||||
/** 所在牧场 */
|
||||
@Excel(name = "所在牧场")
|
||||
private String farm;
|
||||
|
||||
/** 配种日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "配种日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date breedingDate;
|
||||
|
||||
/** 公羊耳号 */
|
||||
@Excel(name = "公羊耳号")
|
||||
private String maleEarNumber;
|
||||
|
||||
/** 公羊品种 */
|
||||
@Excel(name = "公羊品种")
|
||||
private String maleBreed;
|
||||
|
||||
/** 产羔时怀孕天数 */
|
||||
@Excel(name = "产羔时怀孕天数")
|
||||
private Integer pregnancyDays;
|
||||
|
||||
/** 折损数(计算字段) */
|
||||
@Excel(name = "折损数")
|
||||
private Integer loss;
|
||||
|
||||
/** 公羔数量(从羊只信息表统计) */
|
||||
@Excel(name = "公羔数量")
|
||||
private Integer maleCount;
|
||||
|
||||
/** 母羔数量(从羊只信息表统计) */
|
||||
@Excel(name = "母羔数量")
|
||||
private Integer femaleCount;
|
||||
|
||||
/** 留养公羔数量 */
|
||||
@Excel(name = "留养公羔数量")
|
||||
private Integer retainedMaleCount;
|
||||
|
||||
/** 留养母羔数量 */
|
||||
@Excel(name = "留养母羔数量")
|
||||
private Integer retainedFemaleCount;
|
||||
|
||||
/** 未留养公羔数量 */
|
||||
@Excel(name = "未留养公羔数量")
|
||||
private Integer unretainedMaleCount;
|
||||
|
||||
/** 未留养母羔数量 */
|
||||
@Excel(name = "未留养母羔数量")
|
||||
private Integer unretainedFemaleCount;
|
||||
|
||||
/** 羔羊信息列表(从羊只信息表查询) */
|
||||
private List<SheepLambInfo> lambInfoList;
|
||||
|
||||
// ========== 原有getter和setter方法 ==========
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setSheepId(String sheepId)
|
||||
{
|
||||
this.sheepId = sheepId;
|
||||
}
|
||||
|
||||
public String getSheepId()
|
||||
{
|
||||
return sheepId;
|
||||
}
|
||||
|
||||
public void setParity(Long parity)
|
||||
{
|
||||
this.parity = parity;
|
||||
}
|
||||
|
||||
public Long getParity()
|
||||
{
|
||||
return parity;
|
||||
}
|
||||
|
||||
public void setLambsBorn(Long lambsBorn)
|
||||
{
|
||||
this.lambsBorn = lambsBorn;
|
||||
}
|
||||
|
||||
public Long getLambsBorn()
|
||||
{
|
||||
return lambsBorn;
|
||||
}
|
||||
|
||||
public void setSurvival(Long survival)
|
||||
{
|
||||
this.survival = survival;
|
||||
}
|
||||
|
||||
public Long getSurvival()
|
||||
{
|
||||
return survival;
|
||||
}
|
||||
|
||||
public void setTechnician(String technician)
|
||||
{
|
||||
this.technician = technician;
|
||||
}
|
||||
|
||||
public String getTechnician()
|
||||
{
|
||||
return technician;
|
||||
}
|
||||
|
||||
public void setScore(Long score)
|
||||
{
|
||||
this.score = score;
|
||||
}
|
||||
|
||||
public Long getScore()
|
||||
{
|
||||
return score;
|
||||
}
|
||||
|
||||
public void setComment(String comment)
|
||||
{
|
||||
this.comment = comment;
|
||||
}
|
||||
|
||||
public String getComment()
|
||||
{
|
||||
return comment;
|
||||
}
|
||||
|
||||
public void setCreateTme(Date createTme)
|
||||
{
|
||||
this.createTme = createTme;
|
||||
}
|
||||
|
||||
public Date getCreateTme()
|
||||
{
|
||||
return createTme;
|
||||
}
|
||||
|
||||
// ========== 简化版关联字段的getter和setter方法 ==========
|
||||
|
||||
public String getFemaleEarNumber() {
|
||||
return femaleEarNumber;
|
||||
}
|
||||
|
||||
public void setFemaleEarNumber(String femaleEarNumber) {
|
||||
this.femaleEarNumber = femaleEarNumber;
|
||||
}
|
||||
|
||||
public String getFemaleBreed() {
|
||||
return femaleBreed;
|
||||
}
|
||||
|
||||
public void setFemaleBreed(String femaleBreed) {
|
||||
this.femaleBreed = femaleBreed;
|
||||
}
|
||||
|
||||
public Integer getMonthAge() {
|
||||
return monthAge;
|
||||
}
|
||||
|
||||
public void setMonthAge(Integer monthAge) {
|
||||
this.monthAge = monthAge;
|
||||
}
|
||||
|
||||
public String getCurrentShed() {
|
||||
return currentShed;
|
||||
}
|
||||
|
||||
public void setCurrentShed(String currentShed) {
|
||||
this.currentShed = currentShed;
|
||||
}
|
||||
|
||||
public String getFarm() {
|
||||
return farm;
|
||||
}
|
||||
|
||||
public void setFarm(String farm) {
|
||||
this.farm = farm;
|
||||
}
|
||||
|
||||
public Date getBreedingDate() {
|
||||
return breedingDate;
|
||||
}
|
||||
|
||||
public void setBreedingDate(Date breedingDate) {
|
||||
this.breedingDate = breedingDate;
|
||||
}
|
||||
|
||||
public String getMaleEarNumber() {
|
||||
return maleEarNumber;
|
||||
}
|
||||
|
||||
public void setMaleEarNumber(String maleEarNumber) {
|
||||
this.maleEarNumber = maleEarNumber;
|
||||
}
|
||||
|
||||
public String getMaleBreed() {
|
||||
return maleBreed;
|
||||
}
|
||||
|
||||
public void setMaleBreed(String maleBreed) {
|
||||
this.maleBreed = maleBreed;
|
||||
}
|
||||
|
||||
public Integer getPregnancyDays() {
|
||||
return pregnancyDays;
|
||||
}
|
||||
|
||||
public void setPregnancyDays(Integer pregnancyDays) {
|
||||
this.pregnancyDays = pregnancyDays;
|
||||
}
|
||||
|
||||
public Integer getLoss() {
|
||||
return loss;
|
||||
}
|
||||
|
||||
public void setLoss(Integer loss) {
|
||||
this.loss = loss;
|
||||
}
|
||||
|
||||
public Integer getMaleCount() {
|
||||
return maleCount;
|
||||
}
|
||||
|
||||
public void setMaleCount(Integer maleCount) {
|
||||
this.maleCount = maleCount;
|
||||
}
|
||||
|
||||
public Integer getFemaleCount() {
|
||||
return femaleCount;
|
||||
}
|
||||
|
||||
public void setFemaleCount(Integer femaleCount) {
|
||||
this.femaleCount = femaleCount;
|
||||
}
|
||||
|
||||
public Integer getRetainedMaleCount() {
|
||||
return retainedMaleCount;
|
||||
}
|
||||
|
||||
public void setRetainedMaleCount(Integer retainedMaleCount) {
|
||||
this.retainedMaleCount = retainedMaleCount;
|
||||
}
|
||||
|
||||
public Integer getRetainedFemaleCount() {
|
||||
return retainedFemaleCount;
|
||||
}
|
||||
|
||||
public void setRetainedFemaleCount(Integer retainedFemaleCount) {
|
||||
this.retainedFemaleCount = retainedFemaleCount;
|
||||
}
|
||||
|
||||
public Integer getUnretainedMaleCount() {
|
||||
return unretainedMaleCount;
|
||||
}
|
||||
|
||||
public void setUnretainedMaleCount(Integer unretainedMaleCount) {
|
||||
this.unretainedMaleCount = unretainedMaleCount;
|
||||
}
|
||||
|
||||
public Integer getUnretainedFemaleCount() {
|
||||
return unretainedFemaleCount;
|
||||
}
|
||||
|
||||
public void setUnretainedFemaleCount(Integer unretainedFemaleCount) {
|
||||
this.unretainedFemaleCount = unretainedFemaleCount;
|
||||
}
|
||||
|
||||
public List<SheepLambInfo> getLambInfoList() {
|
||||
return lambInfoList;
|
||||
}
|
||||
|
||||
public void setLambInfoList(List<SheepLambInfo> lambInfoList) {
|
||||
this.lambInfoList = lambInfoList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("sheepId", getSheepId())
|
||||
.append("parity", getParity())
|
||||
.append("lambsBorn", getLambsBorn())
|
||||
.append("survival", getSurvival())
|
||||
.append("technician", getTechnician())
|
||||
.append("score", getScore())
|
||||
.append("comment", getComment())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTme", getCreateTme())
|
||||
.append("femaleEarNumber", getFemaleEarNumber())
|
||||
.append("femaleBreed", getFemaleBreed())
|
||||
.append("farm", getFarm())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 羊只羔羊信息对象(用于产羔详情显示)
|
||||
*/
|
||||
class SheepLambInfo {
|
||||
private String lambEarNumber; // 羔羊耳号
|
||||
private String lambBreed; // 羔羊品种
|
||||
private String gender; // 性别
|
||||
private Double birthWeight; // 出生重量
|
||||
private Boolean isRetained; // 是否留养
|
||||
private String lineage; // 家系
|
||||
private Date birthday; // 生日
|
||||
|
||||
// getter和setter方法...
|
||||
}
|
@ -0,0 +1,85 @@
|
||||
package com.zhyc.module.produce.breed.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.produce.breed.domain.ScLambDetail;
|
||||
|
||||
/**
|
||||
* 羔羊详情Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public interface ScLambDetailMapper
|
||||
{
|
||||
/**
|
||||
* 查询羔羊详情
|
||||
*
|
||||
* @param id 羔羊详情主键
|
||||
* @return 羔羊详情
|
||||
*/
|
||||
public ScLambDetail selectScLambDetailById(Long id);
|
||||
|
||||
/**
|
||||
* 查询羔羊详情列表
|
||||
*
|
||||
* @param scLambDetail 羔羊详情
|
||||
* @return 羔羊详情集合
|
||||
*/
|
||||
public List<ScLambDetail> selectScLambDetailList(ScLambDetail scLambDetail);
|
||||
|
||||
/**
|
||||
* 根据产羔记录ID查询羔羊详情列表
|
||||
*
|
||||
* @param lambingRecordId 产羔记录ID
|
||||
* @return 羔羊详情集合
|
||||
*/
|
||||
public List<ScLambDetail> selectScLambDetailByLambingRecordId(Long lambingRecordId);
|
||||
|
||||
/**
|
||||
* 新增羔羊详情
|
||||
*
|
||||
* @param scLambDetail 羔羊详情
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertScLambDetail(ScLambDetail scLambDetail);
|
||||
|
||||
/**
|
||||
* 批量新增羔羊详情
|
||||
*
|
||||
* @param lambDetails 羔羊详情列表
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertScLambDetailBatch(List<ScLambDetail> lambDetails);
|
||||
|
||||
/**
|
||||
* 修改羔羊详情
|
||||
*
|
||||
* @param scLambDetail 羔羊详情
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateScLambDetail(ScLambDetail scLambDetail);
|
||||
|
||||
/**
|
||||
* 删除羔羊详情
|
||||
*
|
||||
* @param id 羔羊详情主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteScLambDetailById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除羔羊详情
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteScLambDetailByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 根据产羔记录ID删除羔羊详情
|
||||
*
|
||||
* @param lambingRecordId 产羔记录ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteScLambDetailByLambingRecordId(Long lambingRecordId);
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
package com.zhyc.module.produce.breed.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.produce.breed.domain.ScLambingRecord;
|
||||
import com.zhyc.module.produce.breed.domain.ScLambDetail;
|
||||
|
||||
/**
|
||||
* 产羔记录Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public interface ScLambingRecordMapper
|
||||
{
|
||||
/**
|
||||
* 查询产羔记录
|
||||
*
|
||||
* @param id 产羔记录主键
|
||||
* @return 产羔记录
|
||||
*/
|
||||
public ScLambingRecord selectScLambingRecordById(Long id);
|
||||
|
||||
/**
|
||||
* 查询产羔记录列表(包含关联信息)
|
||||
*
|
||||
* @param scLambingRecord 产羔记录
|
||||
* @return 产羔记录集合
|
||||
*/
|
||||
public List<ScLambingRecord> selectScLambingRecordList(ScLambingRecord scLambingRecord);
|
||||
|
||||
/**
|
||||
* 查询产羔记录详细信息(包含关联信息)
|
||||
*
|
||||
* @param id 产羔记录主键
|
||||
* @return 产羔记录
|
||||
*/
|
||||
public ScLambingRecord selectScLambingRecordDetailById(Long id);
|
||||
|
||||
/**
|
||||
* 新增产羔记录
|
||||
*
|
||||
* @param scLambingRecord 产羔记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertScLambingRecord(ScLambingRecord scLambingRecord);
|
||||
|
||||
/**
|
||||
* 修改产羔记录
|
||||
*
|
||||
* @param scLambingRecord 产羔记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateScLambingRecord(ScLambingRecord scLambingRecord);
|
||||
|
||||
/**
|
||||
* 删除产羔记录
|
||||
*
|
||||
* @param id 产羔记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteScLambingRecordById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除产羔记录
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteScLambingRecordByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,86 @@
|
||||
package com.zhyc.module.produce.breed.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.produce.breed.domain.ScLambingRecord;
|
||||
import com.zhyc.module.produce.breed.domain.ScLambDetail;
|
||||
|
||||
/**
|
||||
* 产羔记录Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public interface IScLambingRecordService
|
||||
{
|
||||
/**
|
||||
* 查询产羔记录
|
||||
*
|
||||
* @param id 产羔记录主键
|
||||
* @return 产羔记录
|
||||
*/
|
||||
public ScLambingRecord selectScLambingRecordById(Long id);
|
||||
|
||||
/**
|
||||
* 查询产羔记录列表(包含关联信息)
|
||||
*
|
||||
* @param scLambingRecord 产羔记录
|
||||
* @return 产羔记录集合
|
||||
*/
|
||||
public List<ScLambingRecord> selectScLambingRecordList(ScLambingRecord scLambingRecord);
|
||||
|
||||
/**
|
||||
* 查询产羔记录详细信息(包含关联信息)
|
||||
*
|
||||
* @param id 产羔记录主键
|
||||
* @return 产羔记录
|
||||
*/
|
||||
public ScLambingRecord selectScLambingRecordDetailById(Long id);
|
||||
|
||||
/**
|
||||
* 新增产羔记录(包含羔羊详情)
|
||||
*
|
||||
* @param scLambingRecord 产羔记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertScLambingRecord(ScLambingRecord scLambingRecord);
|
||||
|
||||
/**
|
||||
* 修改产羔记录
|
||||
*
|
||||
* @param scLambingRecord 产羔记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateScLambingRecord(ScLambingRecord scLambingRecord);
|
||||
|
||||
/**
|
||||
* 批量删除产羔记录
|
||||
*
|
||||
* @param ids 需要删除的产羔记录主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteScLambingRecordByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除产羔记录信息
|
||||
*
|
||||
* @param id 产羔记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteScLambingRecordById(Long id);
|
||||
|
||||
/**
|
||||
* 根据产羔记录ID查询羔羊详情列表
|
||||
*
|
||||
* @param lambingRecordId 产羔记录ID
|
||||
* @return 羔羊详情列表
|
||||
*/
|
||||
public List<ScLambDetail> selectLambDetailByLambingRecordId(Long lambingRecordId);
|
||||
|
||||
/**
|
||||
* 批量新增羔羊详情
|
||||
*
|
||||
* @param lambDetails 羔羊详情列表
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertLambDetailsBatch(List<ScLambDetail> lambDetails);
|
||||
}
|
@ -0,0 +1,112 @@
|
||||
package com.zhyc.module.produce.breed.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zhyc.module.produce.breed.domain.ScLambDetail;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.zhyc.module.produce.breed.mapper.ScLambingRecordMapper;
|
||||
import com.zhyc.module.produce.breed.domain.ScLambingRecord;
|
||||
import com.zhyc.module.produce.breed.service.IScLambingRecordService;
|
||||
import java.util.Collections;
|
||||
|
||||
/**
|
||||
* 产羔记录Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Service
|
||||
public class ScLambingRecordServiceImpl implements IScLambingRecordService
|
||||
{
|
||||
@Autowired
|
||||
private ScLambingRecordMapper scLambingRecordMapper;
|
||||
|
||||
/**
|
||||
* 查询产羔记录
|
||||
*
|
||||
* @param id 产羔记录主键
|
||||
* @return 产羔记录
|
||||
*/
|
||||
@Override
|
||||
public ScLambingRecord selectScLambingRecordById(Long id)
|
||||
{
|
||||
return scLambingRecordMapper.selectScLambingRecordById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询产羔记录列表
|
||||
*
|
||||
* @param scLambingRecord 产羔记录
|
||||
* @return 产羔记录
|
||||
*/
|
||||
@Override
|
||||
public List<ScLambingRecord> selectScLambingRecordList(ScLambingRecord scLambingRecord)
|
||||
{
|
||||
return scLambingRecordMapper.selectScLambingRecordList(scLambingRecord);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ScLambingRecord selectScLambingRecordDetailById(Long id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增产羔记录
|
||||
*
|
||||
* @param scLambingRecord 产羔记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertScLambingRecord(ScLambingRecord scLambingRecord)
|
||||
{
|
||||
return scLambingRecordMapper.insertScLambingRecord(scLambingRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改产羔记录
|
||||
*
|
||||
* @param scLambingRecord 产羔记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateScLambingRecord(ScLambingRecord scLambingRecord)
|
||||
{
|
||||
return scLambingRecordMapper.updateScLambingRecord(scLambingRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除产羔记录
|
||||
*
|
||||
* @param ids 需要删除的产羔记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteScLambingRecordByIds(Long[] ids)
|
||||
{
|
||||
return scLambingRecordMapper.deleteScLambingRecordByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除产羔记录信息
|
||||
*
|
||||
* @param id 产羔记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteScLambingRecordById(Long id)
|
||||
{
|
||||
return scLambingRecordMapper.deleteScLambingRecordById(id);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<ScLambDetail> selectLambDetailByLambingRecordId(Long lambingRecordId) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertLambDetailsBatch(List<ScLambDetail> lambDetails) {
|
||||
return 0;
|
||||
}
|
||||
}
|
@ -0,0 +1,90 @@
|
||||
package com.zhyc.module.produce.manage_sheep.add_sheep.controller;
|
||||
|
||||
import com.zhyc.common.annotation.Log;
|
||||
import com.zhyc.common.core.domain.AjaxResult;
|
||||
import com.zhyc.common.enums.BusinessType;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.module.produce.manage_sheep.add_sheep.domain.ScAddSheep;
|
||||
import com.zhyc.module.produce.manage_sheep.add_sheep.service.IScAddSheepService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static com.zhyc.common.core.domain.AjaxResult.success;
|
||||
import static com.zhyc.common.utils.SecurityUtils.getUsername;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("produce/manage_sheep/add_sheep")
|
||||
public class ScAddSheepController {
|
||||
@Autowired
|
||||
private IScAddSheepService scAddSheepService;
|
||||
|
||||
//新增羊只验证
|
||||
@PreAuthorize("@ss.hasPermi('produce:add_sheep:add')")
|
||||
@Log(title = "新增", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult addSheep(@RequestBody ScAddSheep scAddSheep) {
|
||||
if (scAddSheep.getSheepId() == null || scAddSheep.getSheepId().isEmpty()) {
|
||||
return AjaxResult.error("羊只id不能为空");
|
||||
}
|
||||
if (scAddSheep.getSheepfold() == null || scAddSheep.getSheepfold() == 0) {
|
||||
return AjaxResult.error("羊舍不能为空");
|
||||
}
|
||||
if (scAddSheep.getBornWeight() == null) {
|
||||
return AjaxResult.error("出生体重不能为空");
|
||||
}
|
||||
if (scAddSheep.getBirthday() == null) {
|
||||
return AjaxResult.error("出生日期不能为空");
|
||||
}
|
||||
if (scAddSheep.getGender() == null) {
|
||||
return AjaxResult.error("性别不能为空");
|
||||
}
|
||||
if (scAddSheep.getVarietyId() == null) {
|
||||
return AjaxResult.error("品种不能为空");
|
||||
}
|
||||
|
||||
boolean success = scAddSheepService.insertScAddSheep(scAddSheep);
|
||||
if (success) {
|
||||
return success("新增成功");
|
||||
} else {
|
||||
return AjaxResult.error("新增失败");
|
||||
}
|
||||
}
|
||||
|
||||
//导出表单
|
||||
@PostMapping("/exportForm")
|
||||
@Log(title = "羊只信息", businessType = BusinessType.EXPORT)
|
||||
public void exportForm(HttpServletResponse response, @RequestBody ScAddSheep scAddSheep) throws IOException {
|
||||
ExcelUtil<ScAddSheep> util = new ExcelUtil<>(ScAddSheep.class);
|
||||
List<ScAddSheep> list = new ArrayList<>();
|
||||
list.add(scAddSheep);
|
||||
util.exportExcel(response, list, "羊只信息");
|
||||
}
|
||||
|
||||
//导入
|
||||
@PostMapping("/importData")
|
||||
@PreAuthorize("@ss.hasPermi('produce:add_sheep:import')")
|
||||
@Log(title = "羊只信息", businessType = BusinessType.IMPORT)
|
||||
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception {
|
||||
ExcelUtil<ScAddSheep> util = new ExcelUtil<>(ScAddSheep.class);
|
||||
List<ScAddSheep> list = util.importExcel(file.getInputStream());
|
||||
String message = scAddSheepService.importSheep(list, updateSupport, getUsername());
|
||||
return success(message);
|
||||
}
|
||||
|
||||
@PostMapping("/importTemplate")
|
||||
@PreAuthorize("@ss.hasPermi('produce:add_sheep:import')")
|
||||
public void importTemplate(HttpServletResponse response) {
|
||||
ExcelUtil<ScAddSheep> util = new ExcelUtil<>(ScAddSheep.class);
|
||||
util.importTemplateExcel(response, "羊只信息模板");
|
||||
}
|
||||
}
|
@ -0,0 +1,192 @@
|
||||
package com.zhyc.module.produce.manage_sheep.add_sheep.domain;
|
||||
|
||||
import com.zhyc.common.annotation.Excel;
|
||||
import com.zhyc.common.core.domain.BaseEntity;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
public class ScAddSheep extends BaseEntity {
|
||||
/**
|
||||
* 羊只
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-10
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Excel(name = "主键")
|
||||
private Long id; // 如果数据库主键叫 id,就加这一行
|
||||
/** 羊只ID */
|
||||
@Excel(name = "羊只ID")
|
||||
private String sheepId;
|
||||
|
||||
/** 羊舍编号 */
|
||||
@Excel(name = "羊舍")
|
||||
private Integer sheepfold;
|
||||
|
||||
/** 父号 */
|
||||
@Excel(name = "父号")
|
||||
private String father;
|
||||
|
||||
/** 母号 */
|
||||
@Excel(name = "母号")
|
||||
private String mother;
|
||||
|
||||
/** 出生体重 */
|
||||
@Excel(name = "出生体重")
|
||||
private BigDecimal bornWeight;
|
||||
|
||||
/** 出生日期 */
|
||||
@Excel(name = "出生日期", dateFormat = "yyyy-MM-dd")
|
||||
private Date birthday;
|
||||
|
||||
/** 性别 1公 0母 */
|
||||
@Excel(name = "性别", readConverterExp = "1=公,0=母")
|
||||
private Integer gender;
|
||||
|
||||
/** 胎次 */
|
||||
@Excel(name = "胎次")
|
||||
private Integer parity;
|
||||
|
||||
/** 品种编号 */
|
||||
@Excel(name = "品种编号")
|
||||
private Integer varietyId;
|
||||
|
||||
/** 入群日期 */
|
||||
@Excel(name = "入群日期", dateFormat = "yyyy-MM-dd")
|
||||
private Date joinDate;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String comment;
|
||||
|
||||
/** 技术员 */
|
||||
@Excel(name = "技术员")
|
||||
private String technician;
|
||||
|
||||
/* 以下字段不导出 */
|
||||
private String createBy;
|
||||
private Date createTime;
|
||||
|
||||
// Getters and Setters
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getSheepId() {
|
||||
return sheepId;
|
||||
}
|
||||
|
||||
public void setSheepId(String sheepId) {
|
||||
this.sheepId = sheepId;
|
||||
}
|
||||
|
||||
public Integer getSheepfold() {
|
||||
return sheepfold;
|
||||
}
|
||||
|
||||
public void setSheepfold(Integer sheepfold) {
|
||||
this.sheepfold = sheepfold;
|
||||
}
|
||||
|
||||
public String getFather() {
|
||||
return father;
|
||||
}
|
||||
|
||||
public void setFather(String father) {
|
||||
this.father = father;
|
||||
}
|
||||
|
||||
public String getMother() {
|
||||
return mother;
|
||||
}
|
||||
|
||||
public void setMother(String mother) {
|
||||
this.mother = mother;
|
||||
}
|
||||
|
||||
public BigDecimal getBornWeight() {
|
||||
return bornWeight;
|
||||
}
|
||||
|
||||
public void setBornWeight(BigDecimal bornWeight) {
|
||||
this.bornWeight = bornWeight;
|
||||
}
|
||||
|
||||
public Date getBirthday() {
|
||||
return birthday;
|
||||
}
|
||||
|
||||
public void setBirthday(Date birthday) {
|
||||
this.birthday = birthday;
|
||||
}
|
||||
|
||||
public Integer getGender() {
|
||||
return gender;
|
||||
}
|
||||
|
||||
public void setGender(Integer gender) {
|
||||
this.gender = gender;
|
||||
}
|
||||
|
||||
public Integer getParity() {
|
||||
return parity;
|
||||
}
|
||||
|
||||
public void setParity(Integer parity) {
|
||||
this.parity = parity;
|
||||
}
|
||||
|
||||
public Integer getVarietyId() {
|
||||
return varietyId;
|
||||
}
|
||||
|
||||
public void setVarietyId(Integer varietyId) {
|
||||
this.varietyId = varietyId;
|
||||
}
|
||||
|
||||
public Date getJoinDate() {
|
||||
return joinDate;
|
||||
}
|
||||
|
||||
public void setJoinDate(Date joinDate) {
|
||||
this.joinDate = joinDate;
|
||||
}
|
||||
|
||||
public String getComment() {
|
||||
return comment;
|
||||
}
|
||||
|
||||
public void setComment(String comment) {
|
||||
this.comment = comment;
|
||||
}
|
||||
|
||||
public String getTechnician() {
|
||||
return technician;
|
||||
}
|
||||
|
||||
public void setTechnician(String technician) {
|
||||
this.technician = technician;
|
||||
}
|
||||
|
||||
public String getCreateBy() {
|
||||
return createBy;
|
||||
}
|
||||
|
||||
public void setCreateBy(String createBy) {
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,15 @@
|
||||
package com.zhyc.module.produce.manage_sheep.add_sheep.mapper;
|
||||
|
||||
import com.zhyc.module.produce.manage_sheep.add_sheep.domain.ScAddSheep;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface ScAddSheepMapper {
|
||||
int insert(ScAddSheep scAddSheep);
|
||||
List<ScAddSheep> selectScAddSheepList(ScAddSheep scAddSheep);
|
||||
int updateScAddSheep(ScAddSheep scAddSheep);
|
||||
int deleteScAddSheepByIds(Long[] ids);
|
||||
}
|
||||
|
@ -0,0 +1,17 @@
|
||||
package com.zhyc.module.produce.manage_sheep.add_sheep.service;
|
||||
|
||||
import com.zhyc.common.core.domain.AjaxResult;
|
||||
import com.zhyc.module.produce.manage_sheep.add_sheep.domain.ScAddSheep;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public interface IScAddSheepService {
|
||||
boolean insertScAddSheep(ScAddSheep scAddSheep);
|
||||
|
||||
List<ScAddSheep> selectScAddSheepList(ScAddSheep scAddSheep);
|
||||
boolean updateScAddSheep(ScAddSheep scAddSheep);
|
||||
boolean deleteScAddSheepByIds(Long[] ids);
|
||||
String importSheep(List<ScAddSheep> list, boolean updateSupport, String operName);
|
||||
}
|
||||
|
@ -0,0 +1,67 @@
|
||||
package com.zhyc.module.produce.manage_sheep.add_sheep.service.impl;
|
||||
|
||||
import com.zhyc.common.exception.ServiceException;
|
||||
import com.zhyc.common.utils.StringUtils;
|
||||
import com.zhyc.module.produce.manage_sheep.add_sheep.domain.ScAddSheep;
|
||||
import com.zhyc.module.produce.manage_sheep.add_sheep.mapper.ScAddSheepMapper;
|
||||
import com.zhyc.module.produce.manage_sheep.add_sheep.service.IScAddSheepService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class ScAddSheepServiceImpl implements IScAddSheepService {
|
||||
@Autowired
|
||||
private ScAddSheepMapper scAddSheepMapper;
|
||||
|
||||
@Override
|
||||
public boolean insertScAddSheep(ScAddSheep scAddSheep) {
|
||||
return scAddSheepMapper.insert(scAddSheep) > 0;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<ScAddSheep> selectScAddSheepList(ScAddSheep scAddSheep) {
|
||||
return scAddSheepMapper.selectScAddSheepList(scAddSheep);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateScAddSheep(ScAddSheep scAddSheep) {
|
||||
return scAddSheepMapper.updateScAddSheep(scAddSheep) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteScAddSheepByIds(Long[] ids) {
|
||||
return scAddSheepMapper.deleteScAddSheepByIds(ids) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String importSheep(List<ScAddSheep> list, boolean updateSupport, String operName) {
|
||||
if (list == null || list.isEmpty()) {
|
||||
throw new ServiceException("导入数据不能为空!");
|
||||
}
|
||||
int success = 0, failure = 0;
|
||||
StringBuilder failureMsg = new StringBuilder();
|
||||
for (ScAddSheep sheep : list) {
|
||||
try {
|
||||
if (StringUtils.isBlank(sheep.getSheepId())) {
|
||||
failure++; failureMsg.append("<br/>第").append(success + failure + 1).append("行:羊只ID不能为空"); continue;
|
||||
}
|
||||
if (updateSupport && sheep.getId() != null) {
|
||||
sheep.setUpdateBy(operName);
|
||||
updateScAddSheep(sheep);
|
||||
} else {
|
||||
sheep.setCreateBy(operName);
|
||||
insertScAddSheep(sheep);
|
||||
}
|
||||
success++;
|
||||
} catch (Exception e) {
|
||||
failure++; failureMsg.append("<br/>第").append(success + failure + 1).append("行:").append(e.getMessage());
|
||||
}
|
||||
}
|
||||
if (failure > 0) throw new ServiceException("导入失败!共 " + failure + " 条:" + failureMsg);
|
||||
return "导入成功!共 " + success + " 条";
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,105 @@
|
||||
package com.zhyc.module.produce.manage_sheep.trans_group.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zhyc.module.produce.manage_sheep.trans_group.domain.ScTransGroup;
|
||||
import com.zhyc.module.produce.manage_sheep.trans_group.service.IScTransGroupService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.zhyc.common.annotation.Log;
|
||||
import com.zhyc.common.core.controller.BaseController;
|
||||
import com.zhyc.common.core.domain.AjaxResult;
|
||||
import com.zhyc.common.enums.BusinessType;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 转群记录Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-10
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("produce/manage_sheep/trans_group")
|
||||
public class ScTransGroupController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IScTransGroupService scTransGroupService;
|
||||
|
||||
/**
|
||||
* 查询转群记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('produce:trans_group:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ScTransGroup scTransGroup)
|
||||
{
|
||||
startPage();
|
||||
List<ScTransGroup> list = scTransGroupService.selectScTransGroupList(scTransGroup);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出转群记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('produce:trans_group:export')")
|
||||
@Log(title = "转群记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ScTransGroup scTransGroup)
|
||||
{
|
||||
List<ScTransGroup> list = scTransGroupService.selectScTransGroupList(scTransGroup);
|
||||
ExcelUtil<ScTransGroup> util = new ExcelUtil<ScTransGroup>(ScTransGroup.class);
|
||||
util.exportExcel(response, list, "转群记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取转群记录详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('produce:trans_group:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Integer id)
|
||||
{
|
||||
return success(scTransGroupService.selectScTransGroupById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增转群记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('produce:trans_group:add')")
|
||||
@Log(title = "转群记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ScTransGroup scTransGroup)
|
||||
{
|
||||
return toAjax(scTransGroupService.insertScTransGroup(scTransGroup));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改转群记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('produce:trans_group:edit')")
|
||||
@Log(title = "转群记录", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ScTransGroup scTransGroup)
|
||||
{
|
||||
return toAjax(scTransGroupService.updateScTransGroup(scTransGroup));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除转群记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('produce:trans_group:remove')")
|
||||
@Log(title = "转群记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Integer[] ids)
|
||||
{
|
||||
return toAjax(scTransGroupService.deleteScTransGroupByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,144 @@
|
||||
package com.zhyc.module.produce.manage_sheep.trans_group.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.zhyc.common.annotation.Excel;
|
||||
import com.zhyc.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 转群记录对象 sc_trans_group
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-10
|
||||
*/
|
||||
public class ScTransGroup extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Integer id;
|
||||
|
||||
/** 羊只id */
|
||||
@Excel(name = "羊只id")
|
||||
private Integer sheepId;
|
||||
|
||||
/** 转入羊舍 */
|
||||
@Excel(name = "转入羊舍")
|
||||
private String foldTo;
|
||||
|
||||
/** 转出羊舍 */
|
||||
@Excel(name = "转出羊舍")
|
||||
private String foldFrom;
|
||||
|
||||
/** 转群原因 */
|
||||
@Excel(name = "转群原因")
|
||||
private String reason;
|
||||
|
||||
/** 技术员 */
|
||||
@Excel(name = "技术员")
|
||||
private String technician;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private Integer status;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String comment;
|
||||
|
||||
public void setId(Integer id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setSheepId(Integer sheepId)
|
||||
{
|
||||
this.sheepId = sheepId;
|
||||
}
|
||||
|
||||
public Integer getSheepId()
|
||||
{
|
||||
return sheepId;
|
||||
}
|
||||
|
||||
public void setFoldTo(String foldTo)
|
||||
{
|
||||
this.foldTo = foldTo;
|
||||
}
|
||||
|
||||
public String getFoldTo()
|
||||
{
|
||||
return foldTo;
|
||||
}
|
||||
|
||||
public void setFoldFrom(String foldFrom)
|
||||
{
|
||||
this.foldFrom = foldFrom;
|
||||
}
|
||||
|
||||
public String getFoldFrom()
|
||||
{
|
||||
return foldFrom;
|
||||
}
|
||||
|
||||
public void setReason(String reason)
|
||||
{
|
||||
this.reason = reason;
|
||||
}
|
||||
|
||||
public String getReason()
|
||||
{
|
||||
return reason;
|
||||
}
|
||||
|
||||
public void setTechnician(String technician)
|
||||
{
|
||||
this.technician = technician;
|
||||
}
|
||||
|
||||
public String getTechnician()
|
||||
{
|
||||
return technician;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setComment(String comment)
|
||||
{
|
||||
this.comment = comment;
|
||||
}
|
||||
|
||||
public String getComment()
|
||||
{
|
||||
return comment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("sheepId", getSheepId())
|
||||
.append("foldTo", getFoldTo())
|
||||
.append("foldFrom", getFoldFrom())
|
||||
.append("reason", getReason())
|
||||
.append("technician", getTechnician())
|
||||
.append("status", getStatus())
|
||||
.append("comment", getComment())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.zhyc.module.produce.manage_sheep.trans_group.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.produce.manage_sheep.trans_group.domain.ScTransGroup;
|
||||
|
||||
/**
|
||||
* 转群记录Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-10
|
||||
*/
|
||||
public interface ScTransGroupMapper
|
||||
{
|
||||
/**
|
||||
* 查询转群记录
|
||||
*
|
||||
* @param id 转群记录主键
|
||||
* @return 转群记录
|
||||
*/
|
||||
public ScTransGroup selectScTransGroupById(Integer id);
|
||||
|
||||
/**
|
||||
* 查询转群记录列表
|
||||
*
|
||||
* @param scTransGroup 转群记录
|
||||
* @return 转群记录集合
|
||||
*/
|
||||
public List<ScTransGroup> selectScTransGroupList(ScTransGroup scTransGroup);
|
||||
|
||||
/**
|
||||
* 新增转群记录
|
||||
*
|
||||
* @param scTransGroup 转群记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertScTransGroup(ScTransGroup scTransGroup);
|
||||
|
||||
/**
|
||||
* 修改转群记录
|
||||
*
|
||||
* @param scTransGroup 转群记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateScTransGroup(ScTransGroup scTransGroup);
|
||||
|
||||
/**
|
||||
* 删除转群记录
|
||||
*
|
||||
* @param id 转群记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteScTransGroupById(Integer id);
|
||||
|
||||
/**
|
||||
* 批量删除转群记录
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteScTransGroupByIds(Integer[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.zhyc.module.produce.manage_sheep.trans_group.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.produce.manage_sheep.trans_group.domain.ScTransGroup;
|
||||
|
||||
/**
|
||||
* 转群记录Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-10
|
||||
*/
|
||||
public interface IScTransGroupService
|
||||
{
|
||||
/**
|
||||
* 查询转群记录
|
||||
*
|
||||
* @param id 转群记录主键
|
||||
* @return 转群记录
|
||||
*/
|
||||
public ScTransGroup selectScTransGroupById(Integer id);
|
||||
|
||||
/**
|
||||
* 查询转群记录列表
|
||||
*
|
||||
* @param scTransGroup 转群记录
|
||||
* @return 转群记录集合
|
||||
*/
|
||||
public List<ScTransGroup> selectScTransGroupList(ScTransGroup scTransGroup);
|
||||
|
||||
/**
|
||||
* 新增转群记录
|
||||
*
|
||||
* @param scTransGroup 转群记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertScTransGroup(ScTransGroup scTransGroup);
|
||||
|
||||
/**
|
||||
* 修改转群记录
|
||||
*
|
||||
* @param scTransGroup 转群记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateScTransGroup(ScTransGroup scTransGroup);
|
||||
|
||||
/**
|
||||
* 批量删除转群记录
|
||||
*
|
||||
* @param ids 需要删除的转群记录主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteScTransGroupByIds(Integer[] ids);
|
||||
|
||||
/**
|
||||
* 删除转群记录信息
|
||||
*
|
||||
* @param id 转群记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteScTransGroupById(Integer id);
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package com.zhyc.module.produce.manage_sheep.trans_group.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.common.utils.DateUtils;
|
||||
import com.zhyc.module.produce.manage_sheep.trans_group.domain.ScTransGroup;
|
||||
import com.zhyc.module.produce.manage_sheep.trans_group.mapper.ScTransGroupMapper;
|
||||
import com.zhyc.module.produce.manage_sheep.trans_group.service.IScTransGroupService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 转群记录Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-10
|
||||
*/
|
||||
@Service
|
||||
public class ScTransGroupServiceImpl implements IScTransGroupService
|
||||
{
|
||||
@Autowired
|
||||
private ScTransGroupMapper scTransGroupMapper;
|
||||
|
||||
/**
|
||||
* 查询转群记录
|
||||
*
|
||||
* @param id 转群记录主键
|
||||
* @return 转群记录
|
||||
*/
|
||||
@Override
|
||||
public ScTransGroup selectScTransGroupById(Integer id)
|
||||
{
|
||||
return scTransGroupMapper.selectScTransGroupById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询转群记录列表
|
||||
*
|
||||
* @param scTransGroup 转群记录
|
||||
* @return 转群记录
|
||||
*/
|
||||
@Override
|
||||
public List<ScTransGroup> selectScTransGroupList(ScTransGroup scTransGroup)
|
||||
{
|
||||
return scTransGroupMapper.selectScTransGroupList(scTransGroup);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增转群记录
|
||||
*
|
||||
* @param scTransGroup 转群记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertScTransGroup(ScTransGroup scTransGroup)
|
||||
{
|
||||
scTransGroup.setStatus(0);
|
||||
scTransGroup.setCreateTime(DateUtils.getNowDate());
|
||||
return scTransGroupMapper.insertScTransGroup(scTransGroup);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改转群记录
|
||||
*
|
||||
* @param scTransGroup 转群记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateScTransGroup(ScTransGroup scTransGroup)
|
||||
{
|
||||
return scTransGroupMapper.updateScTransGroup(scTransGroup);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除转群记录
|
||||
*
|
||||
* @param ids 需要删除的转群记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteScTransGroupByIds(Integer[] ids)
|
||||
{
|
||||
return scTransGroupMapper.deleteScTransGroupByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除转群记录信息
|
||||
*
|
||||
* @param id 转群记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteScTransGroupById(Integer id)
|
||||
{
|
||||
return scTransGroupMapper.deleteScTransGroupById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,104 @@
|
||||
package com.zhyc.module.produce.manage_sheep.transition_info.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.zhyc.common.annotation.Log;
|
||||
import com.zhyc.common.core.controller.BaseController;
|
||||
import com.zhyc.common.core.domain.AjaxResult;
|
||||
import com.zhyc.common.enums.BusinessType;
|
||||
import com.zhyc.module.produce.manage_sheep.transition_info.domain.ScTransitionInfo;
|
||||
import com.zhyc.module.produce.manage_sheep.transition_info.service.IScTransitionInfoService;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 转场Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-10
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("produce/manage_sheep/transition_info")
|
||||
public class ScTransitionInfoController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IScTransitionInfoService scTransitionInfoService;
|
||||
|
||||
/**
|
||||
* 查询转场列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('produce:transition_info:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ScTransitionInfo scTransitionInfo)
|
||||
{
|
||||
startPage();
|
||||
List<ScTransitionInfo> list = scTransitionInfoService.selectScTransitionInfoList(scTransitionInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出转场列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('produce:transition_info:export')")
|
||||
@Log(title = "转场", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ScTransitionInfo scTransitionInfo)
|
||||
{
|
||||
List<ScTransitionInfo> list = scTransitionInfoService.selectScTransitionInfoList(scTransitionInfo);
|
||||
ExcelUtil<ScTransitionInfo> util = new ExcelUtil<ScTransitionInfo>(ScTransitionInfo.class);
|
||||
util.exportExcel(response, list, "转场数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取转场详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('produce:transition_info:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Integer id)
|
||||
{
|
||||
return success(scTransitionInfoService.selectScTransitionInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增转场
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('produce:transition_info:add')")
|
||||
@Log(title = "转场", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ScTransitionInfo scTransitionInfo)
|
||||
{
|
||||
return toAjax(scTransitionInfoService.insertScTransitionInfo(scTransitionInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改转场
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('produce:transition_info:edit')")
|
||||
@Log(title = "转场", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ScTransitionInfo scTransitionInfo)
|
||||
{
|
||||
return toAjax(scTransitionInfoService.updateScTransitionInfo(scTransitionInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除转场
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('produce:transition_info:remove')")
|
||||
@Log(title = "转场", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Integer[] ids)
|
||||
{
|
||||
return toAjax(scTransitionInfoService.deleteScTransitionInfoByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,144 @@
|
||||
package com.zhyc.module.produce.manage_sheep.transition_info.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.zhyc.common.annotation.Excel;
|
||||
import com.zhyc.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 转场对象 sc_transition_info
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-10
|
||||
*/
|
||||
public class ScTransitionInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** */
|
||||
private Integer id;
|
||||
|
||||
/** 羊只id */
|
||||
@Excel(name = "羊只id")
|
||||
private Integer sheepId;
|
||||
|
||||
/** 转入牧场 */
|
||||
@Excel(name = "转入牧场")
|
||||
private String transTo;
|
||||
|
||||
/** 当前牧场 */
|
||||
@Excel(name = "当前牧场")
|
||||
private String transFrom;
|
||||
|
||||
/** 转场类型 */
|
||||
@Excel(name = "转场类型")
|
||||
private Long transType;
|
||||
|
||||
/** 技术员 */
|
||||
@Excel(name = "技术员")
|
||||
private String technician;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private Integer status;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String comment;
|
||||
|
||||
public void setId(Integer id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setSheepId(Integer sheepId)
|
||||
{
|
||||
this.sheepId = sheepId;
|
||||
}
|
||||
|
||||
public Integer getSheepId()
|
||||
{
|
||||
return sheepId;
|
||||
}
|
||||
|
||||
public void setTransTo(String transTo)
|
||||
{
|
||||
this.transTo = transTo;
|
||||
}
|
||||
|
||||
public String getTransTo()
|
||||
{
|
||||
return transTo;
|
||||
}
|
||||
|
||||
public void setTransFrom(String transFrom)
|
||||
{
|
||||
this.transFrom = transFrom;
|
||||
}
|
||||
|
||||
public String getTransFrom()
|
||||
{
|
||||
return transFrom;
|
||||
}
|
||||
|
||||
public void setTransType(Long transType)
|
||||
{
|
||||
this.transType = transType;
|
||||
}
|
||||
|
||||
public Long getTransType()
|
||||
{
|
||||
return transType;
|
||||
}
|
||||
|
||||
public void setTechnician(String technician)
|
||||
{
|
||||
this.technician = technician;
|
||||
}
|
||||
|
||||
public String getTechnician()
|
||||
{
|
||||
return technician;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setComment(String comment)
|
||||
{
|
||||
this.comment = comment;
|
||||
}
|
||||
|
||||
public String getComment()
|
||||
{
|
||||
return comment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("sheepId", getSheepId())
|
||||
.append("transTo", getTransTo())
|
||||
.append("transFrom", getTransFrom())
|
||||
.append("transType", getTransType())
|
||||
.append("technician", getTechnician())
|
||||
.append("status", getStatus())
|
||||
.append("comment", getComment())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.zhyc.module.produce.manage_sheep.transition_info.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zhyc.module.produce.manage_sheep.transition_info.domain.ScTransitionInfo;
|
||||
|
||||
/**
|
||||
* 转场Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-10
|
||||
*/
|
||||
public interface ScTransitionInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询转场
|
||||
*
|
||||
* @param id 转场主键
|
||||
* @return 转场
|
||||
*/
|
||||
public ScTransitionInfo selectScTransitionInfoById(Integer id);
|
||||
|
||||
/**
|
||||
* 查询转场列表
|
||||
*
|
||||
* @param scTransitionInfo 转场
|
||||
* @return 转场集合
|
||||
*/
|
||||
public List<ScTransitionInfo> selectScTransitionInfoList(ScTransitionInfo scTransitionInfo);
|
||||
|
||||
/**
|
||||
* 新增转场
|
||||
*
|
||||
* @param scTransitionInfo 转场
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertScTransitionInfo(ScTransitionInfo scTransitionInfo);
|
||||
|
||||
/**
|
||||
* 修改转场
|
||||
*
|
||||
* @param scTransitionInfo 转场
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateScTransitionInfo(ScTransitionInfo scTransitionInfo);
|
||||
|
||||
/**
|
||||
* 删除转场
|
||||
*
|
||||
* @param id 转场主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteScTransitionInfoById(Integer id);
|
||||
|
||||
/**
|
||||
* 批量删除转场
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteScTransitionInfoByIds(Integer[] ids);
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.zhyc.module.produce.manage_sheep.transition_info.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zhyc.module.produce.manage_sheep.transition_info.domain.ScTransitionInfo;
|
||||
|
||||
/**
|
||||
* 转场Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-10
|
||||
*/
|
||||
public interface IScTransitionInfoService
|
||||
{
|
||||
/**
|
||||
* 查询转场
|
||||
*
|
||||
* @param id 转场主键
|
||||
* @return 转场
|
||||
*/
|
||||
public ScTransitionInfo selectScTransitionInfoById(Integer id);
|
||||
|
||||
/**
|
||||
* 查询转场列表
|
||||
*
|
||||
* @param scTransitionInfo 转场
|
||||
* @return 转场集合
|
||||
*/
|
||||
public List<ScTransitionInfo> selectScTransitionInfoList(ScTransitionInfo scTransitionInfo);
|
||||
|
||||
/**
|
||||
* 新增转场
|
||||
*
|
||||
* @param scTransitionInfo 转场
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertScTransitionInfo(ScTransitionInfo scTransitionInfo);
|
||||
|
||||
/**
|
||||
* 修改转场
|
||||
*
|
||||
* @param scTransitionInfo 转场
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateScTransitionInfo(ScTransitionInfo scTransitionInfo);
|
||||
|
||||
/**
|
||||
* 批量删除转场
|
||||
*
|
||||
* @param ids 需要删除的转场主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteScTransitionInfoByIds(Integer[] ids);
|
||||
|
||||
/**
|
||||
* 删除转场信息
|
||||
*
|
||||
* @param id 转场主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteScTransitionInfoById(Integer id);
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package com.zhyc.module.produce.manage_sheep.transition_info.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.common.utils.DateUtils;
|
||||
import com.zhyc.module.produce.manage_sheep.transition_info.domain.ScTransitionInfo;
|
||||
import com.zhyc.module.produce.manage_sheep.transition_info.mapper.ScTransitionInfoMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.zhyc.module.produce.manage_sheep.transition_info.service.IScTransitionInfoService;
|
||||
|
||||
/**
|
||||
* 转场Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-10
|
||||
*/
|
||||
@Service
|
||||
public class ScTransitionInfoServiceImpl implements IScTransitionInfoService
|
||||
{
|
||||
@Autowired
|
||||
private ScTransitionInfoMapper scTransitionInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询转场
|
||||
*
|
||||
* @param id 转场主键
|
||||
* @return 转场
|
||||
*/
|
||||
@Override
|
||||
public ScTransitionInfo selectScTransitionInfoById(Integer id)
|
||||
{
|
||||
return scTransitionInfoMapper.selectScTransitionInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询转场列表
|
||||
*
|
||||
* @param scTransitionInfo 转场
|
||||
* @return 转场
|
||||
*/
|
||||
@Override
|
||||
public List<ScTransitionInfo> selectScTransitionInfoList(ScTransitionInfo scTransitionInfo)
|
||||
{
|
||||
return scTransitionInfoMapper.selectScTransitionInfoList(scTransitionInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增转场
|
||||
*
|
||||
* @param scTransitionInfo 转场
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertScTransitionInfo(ScTransitionInfo scTransitionInfo)
|
||||
{
|
||||
scTransitionInfo.setStatus(0);
|
||||
scTransitionInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return scTransitionInfoMapper.insertScTransitionInfo(scTransitionInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改转场
|
||||
*
|
||||
* @param scTransitionInfo 转场
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateScTransitionInfo(ScTransitionInfo scTransitionInfo)
|
||||
{
|
||||
return scTransitionInfoMapper.updateScTransitionInfo(scTransitionInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除转场
|
||||
*
|
||||
* @param ids 需要删除的转场主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteScTransitionInfoByIds(Integer[] ids)
|
||||
{
|
||||
return scTransitionInfoMapper.deleteScTransitionInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除转场信息
|
||||
*
|
||||
* @param id 转场主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteScTransitionInfoById(Integer id)
|
||||
{
|
||||
return scTransitionInfoMapper.deleteScTransitionInfoById(id);
|
||||
}
|
||||
}
|
@ -1,10 +1,10 @@
|
||||
package com.zhyc.module.produce.controller;
|
||||
package com.zhyc.module.produce.other.castrate.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zhyc.module.produce.domain.ScCastrate;
|
||||
import com.zhyc.module.produce.service.IScCastrateService;
|
||||
import com.zhyc.module.produce.other.castrate.domain.ScCastrate;
|
||||
import com.zhyc.module.produce.other.castrate.service.IScCastrateService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@ -29,7 +29,7 @@ import com.zhyc.common.core.page.TableDataInfo;
|
||||
* @date 2025-07-09
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/produce/castrate")
|
||||
@RequestMapping("/produce/other/castrate")
|
||||
public class ScCastrateController extends BaseController
|
||||
{
|
||||
@Autowired
|
@ -0,0 +1,112 @@
|
||||
package com.zhyc.module.produce.other.castrate.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.zhyc.common.annotation.Excel;
|
||||
import com.zhyc.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 去势对象 sc_castrate
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-09
|
||||
*/
|
||||
public class ScCastrate extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 羊只id
|
||||
*/
|
||||
@Excel(name = "羊只id")
|
||||
private String sheepId;
|
||||
|
||||
/**
|
||||
* 羊舍id
|
||||
*/
|
||||
private Long sheepfold;
|
||||
|
||||
/**
|
||||
* 用于通过羊舍id获取羊舍名称
|
||||
*/
|
||||
@Excel(name = "羊舍名称")
|
||||
private String sheepfoldName;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Excel(name = "备注")
|
||||
private String comment;
|
||||
|
||||
/**
|
||||
* 技术员
|
||||
*/
|
||||
@Excel(name = "技术员")
|
||||
private String technician;
|
||||
|
||||
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setSheepId(String sheepId) {
|
||||
this.sheepId = sheepId;
|
||||
}
|
||||
|
||||
public String getSheepId() {
|
||||
return sheepId;
|
||||
}
|
||||
|
||||
public void setSheepfold(Long sheepfold) {
|
||||
this.sheepfold = sheepfold;
|
||||
}
|
||||
|
||||
public Long getSheepfold() {
|
||||
return sheepfold;
|
||||
}
|
||||
|
||||
public void setComment(String comment) {
|
||||
this.comment = comment;
|
||||
}
|
||||
|
||||
public String getComment() {
|
||||
return comment;
|
||||
}
|
||||
|
||||
public void setTechnician(String technician) {
|
||||
this.technician = technician;
|
||||
}
|
||||
|
||||
public String getTechnician() {
|
||||
return technician;
|
||||
}
|
||||
|
||||
public String getSheepfoldName() {
|
||||
return sheepfoldName;
|
||||
}
|
||||
public void setSheepfoldName(String sheepfoldName) {
|
||||
this.sheepfoldName = sheepfoldName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("sheepId", getSheepId())
|
||||
.append("sheepfold", getSheepfold())
|
||||
.append("comment", getComment())
|
||||
.append("technician", getTechnician())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -1,7 +1,8 @@
|
||||
package com.zhyc.module.produce.mapper;
|
||||
package com.zhyc.module.produce.other.castrate.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.produce.domain.ScCastrate;
|
||||
|
||||
import com.zhyc.module.produce.other.castrate.domain.ScCastrate;
|
||||
|
||||
/**
|
||||
* 去势Mapper接口
|
@ -1,7 +1,8 @@
|
||||
package com.zhyc.module.produce.service;
|
||||
package com.zhyc.module.produce.other.castrate.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.produce.domain.ScCastrate;
|
||||
|
||||
import com.zhyc.module.produce.other.castrate.domain.ScCastrate;
|
||||
|
||||
/**
|
||||
* 去势Service接口
|
@ -1,10 +1,10 @@
|
||||
package com.zhyc.module.produce.service.impl;
|
||||
package com.zhyc.module.produce.other.castrate.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.common.utils.DateUtils;
|
||||
import com.zhyc.module.produce.domain.ScCastrate;
|
||||
import com.zhyc.module.produce.mapper.ScCastrateMapper;
|
||||
import com.zhyc.module.produce.service.IScCastrateService;
|
||||
import com.zhyc.module.produce.other.castrate.domain.ScCastrate;
|
||||
import com.zhyc.module.produce.other.castrate.mapper.ScCastrateMapper;
|
||||
import com.zhyc.module.produce.other.castrate.service.IScCastrateService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -0,0 +1,108 @@
|
||||
package com.zhyc.module.produce.other.fixHoof.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zhyc.module.produce.other.fixHoof.domain.ScFixHoof;
|
||||
import com.zhyc.module.produce.other.fixHoof.service.IScFixHoofService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.zhyc.common.annotation.Log;
|
||||
import com.zhyc.common.core.controller.BaseController;
|
||||
import com.zhyc.common.core.domain.AjaxResult;
|
||||
import com.zhyc.common.enums.BusinessType;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 修蹄Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-10
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/produce/other/fixHoof")
|
||||
public class ScFixHoofController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IScFixHoofService scFixHoofService;
|
||||
|
||||
/**
|
||||
* 查询修蹄列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('produce:fixHoof:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ScFixHoof scFixHoof)
|
||||
{
|
||||
startPage();
|
||||
List<ScFixHoof> list = scFixHoofService.selectScFixHoofList(scFixHoof);
|
||||
return getDataTable(list);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出修蹄列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('produce:fixHoof:export')")
|
||||
@Log(title = "修蹄", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ScFixHoof scFixHoof)
|
||||
{
|
||||
List<ScFixHoof> list = scFixHoofService.selectScFixHoofList(scFixHoof);
|
||||
ExcelUtil<ScFixHoof> util = new ExcelUtil<ScFixHoof>(ScFixHoof.class);
|
||||
util.exportExcel(response, list, "修蹄数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取修蹄详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('produce:fixHoof:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(scFixHoofService.selectScFixHoofById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增修蹄
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('produce:fixHoof:add')")
|
||||
@Log(title = "修蹄", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ScFixHoof scFixHoof)
|
||||
{
|
||||
return toAjax(scFixHoofService.insertScFixHoof(scFixHoof));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改修蹄
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('produce:fixHoof:edit')")
|
||||
@Log(title = "修蹄", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ScFixHoof scFixHoof)
|
||||
{
|
||||
return toAjax(scFixHoofService.updateScFixHoof(scFixHoof));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除修蹄
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('produce:fixHoof:remove')")
|
||||
@Log(title = "修蹄", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(scFixHoofService.deleteScFixHoofByIds(ids));
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package com.zhyc.module.produce.domain;
|
||||
package com.zhyc.module.produce.other.fixHoof.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
@ -6,12 +6,12 @@ import com.zhyc.common.annotation.Excel;
|
||||
import com.zhyc.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 去势对象 sc_castrate
|
||||
* 修蹄对象 sc_fix_hoof
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-09
|
||||
* @date 2025-07-10
|
||||
*/
|
||||
public class ScCastrate extends BaseEntity
|
||||
public class ScFixHoof extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ -20,7 +20,7 @@ public class ScCastrate extends BaseEntity
|
||||
|
||||
/** 羊只id */
|
||||
@Excel(name = "羊只id")
|
||||
private String sheepId;
|
||||
private Long sheepId;
|
||||
|
||||
/** 羊舍id */
|
||||
@Excel(name = "羊舍id")
|
||||
@ -44,12 +44,12 @@ public class ScCastrate extends BaseEntity
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setSheepId(String sheepId)
|
||||
public void setSheepId(Long sheepId)
|
||||
{
|
||||
this.sheepId = sheepId;
|
||||
}
|
||||
|
||||
public String getSheepId()
|
||||
public Long getSheepId()
|
||||
{
|
||||
return sheepId;
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.zhyc.module.produce.other.fixHoof.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.produce.other.fixHoof.domain.ScFixHoof;
|
||||
|
||||
/**
|
||||
* 修蹄Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-10
|
||||
*/
|
||||
public interface ScFixHoofMapper
|
||||
{
|
||||
/**
|
||||
* 查询修蹄
|
||||
*
|
||||
* @param id 修蹄主键
|
||||
* @return 修蹄
|
||||
*/
|
||||
public ScFixHoof selectScFixHoofById(Long id);
|
||||
|
||||
/**
|
||||
* 查询修蹄列表
|
||||
*
|
||||
* @param scFixHoof 修蹄
|
||||
* @return 修蹄集合
|
||||
*/
|
||||
public List<ScFixHoof> selectScFixHoofList(ScFixHoof scFixHoof);
|
||||
|
||||
/**
|
||||
* 新增修蹄
|
||||
*
|
||||
* @param scFixHoof 修蹄
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertScFixHoof(ScFixHoof scFixHoof);
|
||||
|
||||
/**
|
||||
* 修改修蹄
|
||||
*
|
||||
* @param scFixHoof 修蹄
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateScFixHoof(ScFixHoof scFixHoof);
|
||||
|
||||
/**
|
||||
* 删除修蹄
|
||||
*
|
||||
* @param id 修蹄主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteScFixHoofById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除修蹄
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteScFixHoofByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.zhyc.module.produce.other.fixHoof.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.produce.other.fixHoof.domain.ScFixHoof;
|
||||
|
||||
/**
|
||||
* 修蹄Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-10
|
||||
*/
|
||||
public interface IScFixHoofService
|
||||
{
|
||||
/**
|
||||
* 查询修蹄
|
||||
*
|
||||
* @param id 修蹄主键
|
||||
* @return 修蹄
|
||||
*/
|
||||
public ScFixHoof selectScFixHoofById(Long id);
|
||||
|
||||
/**
|
||||
* 查询修蹄列表
|
||||
*
|
||||
* @param scFixHoof 修蹄
|
||||
* @return 修蹄集合
|
||||
*/
|
||||
public List<ScFixHoof> selectScFixHoofList(ScFixHoof scFixHoof);
|
||||
|
||||
/**
|
||||
* 新增修蹄
|
||||
*
|
||||
* @param scFixHoof 修蹄
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertScFixHoof(ScFixHoof scFixHoof);
|
||||
|
||||
/**
|
||||
* 修改修蹄
|
||||
*
|
||||
* @param scFixHoof 修蹄
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateScFixHoof(ScFixHoof scFixHoof);
|
||||
|
||||
/**
|
||||
* 批量删除修蹄
|
||||
*
|
||||
* @param ids 需要删除的修蹄主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteScFixHoofByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除修蹄信息
|
||||
*
|
||||
* @param id 修蹄主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteScFixHoofById(Long id);
|
||||
}
|
@ -0,0 +1,95 @@
|
||||
package com.zhyc.module.produce.other.fixHoof.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.common.utils.DateUtils;
|
||||
import com.zhyc.module.produce.other.fixHoof.domain.ScFixHoof;
|
||||
import com.zhyc.module.produce.other.fixHoof.mapper.ScFixHoofMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.zhyc.module.produce.other.fixHoof.service.IScFixHoofService;
|
||||
|
||||
/**
|
||||
* 修蹄Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-10
|
||||
*/
|
||||
@Service
|
||||
public class ScFixHoofServiceImpl implements IScFixHoofService
|
||||
{
|
||||
@Autowired
|
||||
private ScFixHoofMapper scFixHoofMapper;
|
||||
|
||||
/**
|
||||
* 查询修蹄
|
||||
*
|
||||
* @param id 修蹄主键
|
||||
* @return 修蹄
|
||||
*/
|
||||
@Override
|
||||
public ScFixHoof selectScFixHoofById(Long id)
|
||||
{
|
||||
return scFixHoofMapper.selectScFixHoofById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询修蹄列表
|
||||
*
|
||||
* @param scFixHoof 修蹄
|
||||
* @return 修蹄
|
||||
*/
|
||||
@Override
|
||||
public List<ScFixHoof> selectScFixHoofList(ScFixHoof scFixHoof)
|
||||
{
|
||||
return scFixHoofMapper.selectScFixHoofList(scFixHoof);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增修蹄
|
||||
*
|
||||
* @param scFixHoof 修蹄
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertScFixHoof(ScFixHoof scFixHoof)
|
||||
{
|
||||
scFixHoof.setCreateTime(DateUtils.getNowDate());
|
||||
return scFixHoofMapper.insertScFixHoof(scFixHoof);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改修蹄
|
||||
*
|
||||
* @param scFixHoof 修蹄
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateScFixHoof(ScFixHoof scFixHoof)
|
||||
{
|
||||
return scFixHoofMapper.updateScFixHoof(scFixHoof);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除修蹄
|
||||
*
|
||||
* @param ids 需要删除的修蹄主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteScFixHoofByIds(Long[] ids)
|
||||
{
|
||||
return scFixHoofMapper.deleteScFixHoofByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除修蹄信息
|
||||
*
|
||||
* @param id 修蹄主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteScFixHoofById(Long id)
|
||||
{
|
||||
return scFixHoofMapper.deleteScFixHoofById(id);
|
||||
}
|
||||
}
|
@ -16,89 +16,89 @@ import com.zhyc.common.annotation.Log;
|
||||
import com.zhyc.common.core.controller.BaseController;
|
||||
import com.zhyc.common.core.domain.AjaxResult;
|
||||
import com.zhyc.common.enums.BusinessType;
|
||||
import com.zhyc.module.sheep_file.domain.BasSheep;
|
||||
import com.zhyc.module.sheep_file.service.IBasSheepService;
|
||||
import com.zhyc.module.sheep_file.domain.SheepFile;
|
||||
import com.zhyc.module.sheep_file.service.ISheepFileService;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 羊只基本信息Controller
|
||||
* 羊只档案Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-10
|
||||
* @author wyt
|
||||
* @date 2025-07-13
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/sheep_file/sheep_file")
|
||||
public class BasSheepController extends BaseController
|
||||
public class SheepFileController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IBasSheepService basSheepService;
|
||||
private ISheepFileService sheepFileService;
|
||||
|
||||
/**
|
||||
* 查询羊只基本信息列表
|
||||
* 查询羊只档案列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('sheep_file:sheep_file:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BasSheep basSheep)
|
||||
public TableDataInfo list(SheepFile sheepFile)
|
||||
{
|
||||
startPage();
|
||||
List<BasSheep> list = basSheepService.selectBasSheepList(basSheep);
|
||||
List<SheepFile> list = sheepFileService.selectSheepFileList(sheepFile);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出羊只基本信息列表
|
||||
* 导出羊只档案列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('sheep_file:sheep_file:export')")
|
||||
@Log(title = "羊只基本信息", businessType = BusinessType.EXPORT)
|
||||
@Log(title = "羊只档案", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BasSheep basSheep)
|
||||
public void export(HttpServletResponse response, SheepFile sheepFile)
|
||||
{
|
||||
List<BasSheep> list = basSheepService.selectBasSheepList(basSheep);
|
||||
ExcelUtil<BasSheep> util = new ExcelUtil<BasSheep>(BasSheep.class);
|
||||
util.exportExcel(response, list, "羊只基本信息数据");
|
||||
List<SheepFile> list = sheepFileService.selectSheepFileList(sheepFile);
|
||||
ExcelUtil<SheepFile> util = new ExcelUtil<SheepFile>(SheepFile.class);
|
||||
util.exportExcel(response, list, "羊只档案数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取羊只基本信息详细信息
|
||||
* 获取羊只档案详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('sheep_file:sheep_file:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(basSheepService.selectBasSheepById(id));
|
||||
return success(sheepFileService.selectSheepFileById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增羊只基本信息
|
||||
* 新增羊只档案
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('sheep_file:sheep_file:add')")
|
||||
@Log(title = "羊只基本信息", businessType = BusinessType.INSERT)
|
||||
@Log(title = "羊只档案", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BasSheep basSheep)
|
||||
public AjaxResult add(@RequestBody SheepFile sheepFile)
|
||||
{
|
||||
return toAjax(basSheepService.insertBasSheep(basSheep));
|
||||
return toAjax(sheepFileService.insertSheepFile(sheepFile));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改羊只基本信息
|
||||
* 修改羊只档案
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('sheep_file:sheep_file:edit')")
|
||||
@Log(title = "羊只基本信息", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "羊只档案", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BasSheep basSheep)
|
||||
public AjaxResult edit(@RequestBody SheepFile sheepFile)
|
||||
{
|
||||
return toAjax(basSheepService.updateBasSheep(basSheep));
|
||||
return toAjax(sheepFileService.updateSheepFile(sheepFile));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除羊只基本信息
|
||||
* 删除羊只档案
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('sheep_file:sheep_file:remove')")
|
||||
@Log(title = "羊只基本信息", businessType = BusinessType.DELETE)
|
||||
@Log(title = "羊只档案", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(basSheepService.deleteBasSheepByIds(ids));
|
||||
return toAjax(sheepFileService.deleteSheepFileByIds(ids));
|
||||
}
|
||||
}
|
@ -8,12 +8,12 @@ import com.zhyc.common.annotation.Excel;
|
||||
import com.zhyc.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 羊只基本信息对象 bas_sheep
|
||||
* 羊只档案对象 sheep_file
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-10
|
||||
* @author wyt
|
||||
* @date 2025-07-13
|
||||
*/
|
||||
public class BasSheep extends BaseEntity
|
||||
public class SheepFile extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ -22,16 +22,24 @@ public class BasSheep extends BaseEntity
|
||||
|
||||
/** 管理耳号 */
|
||||
@Excel(name = "管理耳号")
|
||||
private String manageTags;
|
||||
private String bsManageTags;
|
||||
|
||||
/** 牧场id */
|
||||
@Excel(name = "牧场id")
|
||||
private Long ranchId;
|
||||
|
||||
/** 牧场名称 */
|
||||
@Excel(name = "牧场名称")
|
||||
private String drRanch;
|
||||
|
||||
/** 羊舍id */
|
||||
@Excel(name = "羊舍id")
|
||||
private Long sheepfoldId;
|
||||
|
||||
/** 羊舍名称 */
|
||||
@Excel(name = "羊舍名称")
|
||||
private String sheepfoldName;
|
||||
|
||||
/** 电子耳号 */
|
||||
@Excel(name = "电子耳号")
|
||||
private String electronicTags;
|
||||
@ -40,13 +48,17 @@ public class BasSheep extends BaseEntity
|
||||
@Excel(name = "品种id")
|
||||
private Long varietyId;
|
||||
|
||||
/** 品种 */
|
||||
@Excel(name = "品种")
|
||||
private String variety;
|
||||
|
||||
/** 家系 */
|
||||
@Excel(name = "家系")
|
||||
private String family;
|
||||
|
||||
/** 羊只类别 */
|
||||
@Excel(name = "羊只类别")
|
||||
private Long typeId;
|
||||
/** 羊只类型 */
|
||||
@Excel(name = "羊只类型")
|
||||
private String name;
|
||||
|
||||
/** 性别 */
|
||||
@Excel(name = "性别")
|
||||
@ -57,43 +69,103 @@ public class BasSheep extends BaseEntity
|
||||
@Excel(name = "出生日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date birthday;
|
||||
|
||||
/** 出生体重 */
|
||||
@Excel(name = "出生体重")
|
||||
private Long birthWeight;
|
||||
/** 日龄 */
|
||||
@Excel(name = "日龄")
|
||||
private Long dayAge;
|
||||
|
||||
/** 月龄 */
|
||||
@Excel(name = "月龄")
|
||||
private Long monthAge;
|
||||
|
||||
/** 胎次 */
|
||||
@Excel(name = "胎次")
|
||||
private Long parity;
|
||||
|
||||
/** 羊只状态 */
|
||||
@Excel(name = "羊只状态")
|
||||
private Long statusId;
|
||||
/** 出生体重 */
|
||||
@Excel(name = "出生体重")
|
||||
private Long birthWeight;
|
||||
|
||||
/** 断奶日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "断奶日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date weaningDate;
|
||||
|
||||
/** 羊只状态 */
|
||||
@Excel(name = "羊只状态")
|
||||
private Long statusId;
|
||||
|
||||
/** 断奶体重 */
|
||||
@Excel(name = "断奶体重")
|
||||
private Long weaningWeight;
|
||||
|
||||
/** 当前体重 */
|
||||
@Excel(name = "当前体重")
|
||||
private Long currentWeight;
|
||||
|
||||
/** 繁育状态id */
|
||||
@Excel(name = "繁育状态id")
|
||||
private Long breedStatusId;
|
||||
|
||||
/** 繁殖状态 */
|
||||
@Excel(name = "繁殖状态")
|
||||
private String breed;
|
||||
|
||||
/** 父号id */
|
||||
@Excel(name = "父号id")
|
||||
private Long fatherId;
|
||||
private Long bsFatherId;
|
||||
|
||||
/** 父亲管理耳号 */
|
||||
@Excel(name = "父亲管理耳号")
|
||||
private String fatherManageTags;
|
||||
|
||||
/** 母号id */
|
||||
@Excel(name = "母号id")
|
||||
private Long motherId;
|
||||
private Long bsMotherId;
|
||||
|
||||
/** 母亲管理耳号 */
|
||||
@Excel(name = "母亲管理耳号")
|
||||
private String motherManageTags;
|
||||
|
||||
/** 受体id */
|
||||
@Excel(name = "受体id")
|
||||
private Long receptorId;
|
||||
|
||||
/** 受体管理耳号 */
|
||||
@Excel(name = "受体管理耳号")
|
||||
private String receptorManageTags;
|
||||
|
||||
/** 祖父号id */
|
||||
@Excel(name = "祖父号id")
|
||||
private Long fatherFatherId;
|
||||
|
||||
/** 祖父管理耳号 */
|
||||
@Excel(name = "祖父管理耳号")
|
||||
private String grandfatherManageTags;
|
||||
|
||||
/** 祖母号id */
|
||||
@Excel(name = "祖母号id")
|
||||
private Long fatherMotherId;
|
||||
|
||||
/** 祖母管理耳号 */
|
||||
@Excel(name = "祖母管理耳号")
|
||||
private String grandmotherManageTags;
|
||||
|
||||
/** 外祖父号id */
|
||||
@Excel(name = "外祖父号id")
|
||||
private Long fatherId;
|
||||
|
||||
/** 外祖父管理耳号 */
|
||||
@Excel(name = "外祖父管理耳号")
|
||||
private String maternalGrandfatherManageTags;
|
||||
|
||||
/** 外祖母号id */
|
||||
@Excel(name = "外祖母号id")
|
||||
private Long motherId;
|
||||
|
||||
/** 外祖母管理耳号 */
|
||||
@Excel(name = "外祖母管理耳号")
|
||||
private String maternalGrandmotherManageTags;
|
||||
|
||||
/** 配种日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "配种日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@ -117,27 +189,51 @@ public class BasSheep extends BaseEntity
|
||||
@Excel(name = "产羔时怀孕天数")
|
||||
private Long lambingDay;
|
||||
|
||||
/** 配后天数 */
|
||||
@Excel(name = "配后天数")
|
||||
private Long matingDay;
|
||||
|
||||
/** 怀孕天数 */
|
||||
@Excel(name = "怀孕天数")
|
||||
private Long gestationDay;
|
||||
|
||||
/** 预产日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "预产日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date expectedDate;
|
||||
|
||||
/** 是否性控 */
|
||||
@Excel(name = "是否性控")
|
||||
private Long controlled;
|
||||
/** 产后天数 */
|
||||
@Excel(name = "产后天数")
|
||||
private Long postLambingDay;
|
||||
|
||||
/** 泌乳天数 */
|
||||
@Excel(name = "泌乳天数")
|
||||
private Long lactationDay;
|
||||
|
||||
/** 空怀天数 */
|
||||
@Excel(name = "空怀天数")
|
||||
private Long anestrousDay;
|
||||
|
||||
/** 配种次数 */
|
||||
@Excel(name = "配种次数")
|
||||
private Long matingCounts;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
/** 累计配种次数 */
|
||||
@Excel(name = "累计配种次数")
|
||||
private Long matingTotal;
|
||||
|
||||
/** 累计流产次数 */
|
||||
@Excel(name = "累计流产次数")
|
||||
private Long miscarriageCounts;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String comment;
|
||||
|
||||
/** 是否性控 */
|
||||
@Excel(name = "是否性控")
|
||||
private Long controlled;
|
||||
|
||||
/** 体况评分 */
|
||||
@Excel(name = "体况评分")
|
||||
private Long body;
|
||||
@ -153,18 +249,17 @@ public class BasSheep extends BaseEntity
|
||||
/** 入群日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "入群日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date soureDate;
|
||||
private Date sourceDate;
|
||||
|
||||
/** 来源牧场id */
|
||||
@Excel(name = "来源牧场id")
|
||||
private Long sourceRanchId;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String comment;
|
||||
/** 来源牧场 */
|
||||
@Excel(name = "来源牧场")
|
||||
private String sourceRanch;
|
||||
|
||||
/** 是否删除 */
|
||||
@Excel(name = "是否删除")
|
||||
private Long isDelete;
|
||||
|
||||
public void setId(Long id)
|
||||
@ -177,14 +272,14 @@ public class BasSheep extends BaseEntity
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setManageTags(String manageTags)
|
||||
public void setBsManageTags(String bsManageTags)
|
||||
{
|
||||
this.manageTags = manageTags;
|
||||
this.bsManageTags = bsManageTags;
|
||||
}
|
||||
|
||||
public String getManageTags()
|
||||
public String getBsManageTags()
|
||||
{
|
||||
return manageTags;
|
||||
return bsManageTags;
|
||||
}
|
||||
|
||||
public void setRanchId(Long ranchId)
|
||||
@ -197,6 +292,16 @@ public class BasSheep extends BaseEntity
|
||||
return ranchId;
|
||||
}
|
||||
|
||||
public void setDrRanch(String drRanch)
|
||||
{
|
||||
this.drRanch = drRanch;
|
||||
}
|
||||
|
||||
public String getDrRanch()
|
||||
{
|
||||
return drRanch;
|
||||
}
|
||||
|
||||
public void setSheepfoldId(Long sheepfoldId)
|
||||
{
|
||||
this.sheepfoldId = sheepfoldId;
|
||||
@ -207,6 +312,16 @@ public class BasSheep extends BaseEntity
|
||||
return sheepfoldId;
|
||||
}
|
||||
|
||||
public void setSheepfoldName(String sheepfoldName)
|
||||
{
|
||||
this.sheepfoldName = sheepfoldName;
|
||||
}
|
||||
|
||||
public String getSheepfoldName()
|
||||
{
|
||||
return sheepfoldName;
|
||||
}
|
||||
|
||||
public void setElectronicTags(String electronicTags)
|
||||
{
|
||||
this.electronicTags = electronicTags;
|
||||
@ -227,6 +342,16 @@ public class BasSheep extends BaseEntity
|
||||
return varietyId;
|
||||
}
|
||||
|
||||
public void setVariety(String variety)
|
||||
{
|
||||
this.variety = variety;
|
||||
}
|
||||
|
||||
public String getVariety()
|
||||
{
|
||||
return variety;
|
||||
}
|
||||
|
||||
public void setFamily(String family)
|
||||
{
|
||||
this.family = family;
|
||||
@ -237,14 +362,14 @@ public class BasSheep extends BaseEntity
|
||||
return family;
|
||||
}
|
||||
|
||||
public void setTypeId(Long typeId)
|
||||
public void setName(String name)
|
||||
{
|
||||
this.typeId = typeId;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Long getTypeId()
|
||||
public String getName()
|
||||
{
|
||||
return typeId;
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setGender(Long gender)
|
||||
@ -267,14 +392,24 @@ public class BasSheep extends BaseEntity
|
||||
return birthday;
|
||||
}
|
||||
|
||||
public void setBirthWeight(Long birthWeight)
|
||||
public void setDayAge(Long dayAge)
|
||||
{
|
||||
this.birthWeight = birthWeight;
|
||||
this.dayAge = dayAge;
|
||||
}
|
||||
|
||||
public Long getBirthWeight()
|
||||
public Long getDayAge()
|
||||
{
|
||||
return birthWeight;
|
||||
return dayAge;
|
||||
}
|
||||
|
||||
public void setMonthAge(Long monthAge)
|
||||
{
|
||||
this.monthAge = monthAge;
|
||||
}
|
||||
|
||||
public Long getMonthAge()
|
||||
{
|
||||
return monthAge;
|
||||
}
|
||||
|
||||
public void setParity(Long parity)
|
||||
@ -287,14 +422,14 @@ public class BasSheep extends BaseEntity
|
||||
return parity;
|
||||
}
|
||||
|
||||
public void setStatusId(Long statusId)
|
||||
public void setBirthWeight(Long birthWeight)
|
||||
{
|
||||
this.statusId = statusId;
|
||||
this.birthWeight = birthWeight;
|
||||
}
|
||||
|
||||
public Long getStatusId()
|
||||
public Long getBirthWeight()
|
||||
{
|
||||
return statusId;
|
||||
return birthWeight;
|
||||
}
|
||||
|
||||
public void setWeaningDate(Date weaningDate)
|
||||
@ -307,6 +442,16 @@ public class BasSheep extends BaseEntity
|
||||
return weaningDate;
|
||||
}
|
||||
|
||||
public void setStatusId(Long statusId)
|
||||
{
|
||||
this.statusId = statusId;
|
||||
}
|
||||
|
||||
public Long getStatusId()
|
||||
{
|
||||
return statusId;
|
||||
}
|
||||
|
||||
public void setWeaningWeight(Long weaningWeight)
|
||||
{
|
||||
this.weaningWeight = weaningWeight;
|
||||
@ -317,6 +462,16 @@ public class BasSheep extends BaseEntity
|
||||
return weaningWeight;
|
||||
}
|
||||
|
||||
public void setCurrentWeight(Long currentWeight)
|
||||
{
|
||||
this.currentWeight = currentWeight;
|
||||
}
|
||||
|
||||
public Long getCurrentWeight()
|
||||
{
|
||||
return currentWeight;
|
||||
}
|
||||
|
||||
public void setBreedStatusId(Long breedStatusId)
|
||||
{
|
||||
this.breedStatusId = breedStatusId;
|
||||
@ -327,6 +482,116 @@ public class BasSheep extends BaseEntity
|
||||
return breedStatusId;
|
||||
}
|
||||
|
||||
public void setBreed(String breed)
|
||||
{
|
||||
this.breed = breed;
|
||||
}
|
||||
|
||||
public String getBreed()
|
||||
{
|
||||
return breed;
|
||||
}
|
||||
|
||||
public void setBsFatherId(Long bsFatherId)
|
||||
{
|
||||
this.bsFatherId = bsFatherId;
|
||||
}
|
||||
|
||||
public Long getBsFatherId()
|
||||
{
|
||||
return bsFatherId;
|
||||
}
|
||||
|
||||
public void setFatherManageTags(String fatherManageTags)
|
||||
{
|
||||
this.fatherManageTags = fatherManageTags;
|
||||
}
|
||||
|
||||
public String getFatherManageTags()
|
||||
{
|
||||
return fatherManageTags;
|
||||
}
|
||||
|
||||
public void setBsMotherId(Long bsMotherId)
|
||||
{
|
||||
this.bsMotherId = bsMotherId;
|
||||
}
|
||||
|
||||
public Long getBsMotherId()
|
||||
{
|
||||
return bsMotherId;
|
||||
}
|
||||
|
||||
public void setMotherManageTags(String motherManageTags)
|
||||
{
|
||||
this.motherManageTags = motherManageTags;
|
||||
}
|
||||
|
||||
public String getMotherManageTags()
|
||||
{
|
||||
return motherManageTags;
|
||||
}
|
||||
|
||||
public void setReceptorId(Long receptorId)
|
||||
{
|
||||
this.receptorId = receptorId;
|
||||
}
|
||||
|
||||
public Long getReceptorId()
|
||||
{
|
||||
return receptorId;
|
||||
}
|
||||
|
||||
public void setReceptorManageTags(String receptorManageTags)
|
||||
{
|
||||
this.receptorManageTags = receptorManageTags;
|
||||
}
|
||||
|
||||
public String getReceptorManageTags()
|
||||
{
|
||||
return receptorManageTags;
|
||||
}
|
||||
|
||||
public void setFatherFatherId(Long fatherFatherId)
|
||||
{
|
||||
this.fatherFatherId = fatherFatherId;
|
||||
}
|
||||
|
||||
public Long getFatherFatherId()
|
||||
{
|
||||
return fatherFatherId;
|
||||
}
|
||||
|
||||
public void setGrandfatherManageTags(String grandfatherManageTags)
|
||||
{
|
||||
this.grandfatherManageTags = grandfatherManageTags;
|
||||
}
|
||||
|
||||
public String getGrandfatherManageTags()
|
||||
{
|
||||
return grandfatherManageTags;
|
||||
}
|
||||
|
||||
public void setFatherMotherId(Long fatherMotherId)
|
||||
{
|
||||
this.fatherMotherId = fatherMotherId;
|
||||
}
|
||||
|
||||
public Long getFatherMotherId()
|
||||
{
|
||||
return fatherMotherId;
|
||||
}
|
||||
|
||||
public void setGrandmotherManageTags(String grandmotherManageTags)
|
||||
{
|
||||
this.grandmotherManageTags = grandmotherManageTags;
|
||||
}
|
||||
|
||||
public String getGrandmotherManageTags()
|
||||
{
|
||||
return grandmotherManageTags;
|
||||
}
|
||||
|
||||
public void setFatherId(Long fatherId)
|
||||
{
|
||||
this.fatherId = fatherId;
|
||||
@ -337,6 +602,16 @@ public class BasSheep extends BaseEntity
|
||||
return fatherId;
|
||||
}
|
||||
|
||||
public void setMaternalGrandfatherManageTags(String maternalGrandfatherManageTags)
|
||||
{
|
||||
this.maternalGrandfatherManageTags = maternalGrandfatherManageTags;
|
||||
}
|
||||
|
||||
public String getMaternalGrandfatherManageTags()
|
||||
{
|
||||
return maternalGrandfatherManageTags;
|
||||
}
|
||||
|
||||
public void setMotherId(Long motherId)
|
||||
{
|
||||
this.motherId = motherId;
|
||||
@ -347,14 +622,14 @@ public class BasSheep extends BaseEntity
|
||||
return motherId;
|
||||
}
|
||||
|
||||
public void setReceptorId(Long receptorId)
|
||||
public void setMaternalGrandmotherManageTags(String maternalGrandmotherManageTags)
|
||||
{
|
||||
this.receptorId = receptorId;
|
||||
this.maternalGrandmotherManageTags = maternalGrandmotherManageTags;
|
||||
}
|
||||
|
||||
public Long getReceptorId()
|
||||
public String getMaternalGrandmotherManageTags()
|
||||
{
|
||||
return receptorId;
|
||||
return maternalGrandmotherManageTags;
|
||||
}
|
||||
|
||||
public void setMatingDate(Date matingDate)
|
||||
@ -407,6 +682,26 @@ public class BasSheep extends BaseEntity
|
||||
return lambingDay;
|
||||
}
|
||||
|
||||
public void setMatingDay(Long matingDay)
|
||||
{
|
||||
this.matingDay = matingDay;
|
||||
}
|
||||
|
||||
public Long getMatingDay()
|
||||
{
|
||||
return matingDay;
|
||||
}
|
||||
|
||||
public void setGestationDay(Long gestationDay)
|
||||
{
|
||||
this.gestationDay = gestationDay;
|
||||
}
|
||||
|
||||
public Long getGestationDay()
|
||||
{
|
||||
return gestationDay;
|
||||
}
|
||||
|
||||
public void setExpectedDate(Date expectedDate)
|
||||
{
|
||||
this.expectedDate = expectedDate;
|
||||
@ -417,14 +712,34 @@ public class BasSheep extends BaseEntity
|
||||
return expectedDate;
|
||||
}
|
||||
|
||||
public void setControlled(Long controlled)
|
||||
public void setPostLambingDay(Long postLambingDay)
|
||||
{
|
||||
this.controlled = controlled;
|
||||
this.postLambingDay = postLambingDay;
|
||||
}
|
||||
|
||||
public Long getControlled()
|
||||
public Long getPostLambingDay()
|
||||
{
|
||||
return controlled;
|
||||
return postLambingDay;
|
||||
}
|
||||
|
||||
public void setLactationDay(Long lactationDay)
|
||||
{
|
||||
this.lactationDay = lactationDay;
|
||||
}
|
||||
|
||||
public Long getLactationDay()
|
||||
{
|
||||
return lactationDay;
|
||||
}
|
||||
|
||||
public void setAnestrousDay(Long anestrousDay)
|
||||
{
|
||||
this.anestrousDay = anestrousDay;
|
||||
}
|
||||
|
||||
public Long getAnestrousDay()
|
||||
{
|
||||
return anestrousDay;
|
||||
}
|
||||
|
||||
public void setMatingCounts(Long matingCounts)
|
||||
@ -457,6 +772,26 @@ public class BasSheep extends BaseEntity
|
||||
return miscarriageCounts;
|
||||
}
|
||||
|
||||
public void setComment(String comment)
|
||||
{
|
||||
this.comment = comment;
|
||||
}
|
||||
|
||||
public String getComment()
|
||||
{
|
||||
return comment;
|
||||
}
|
||||
|
||||
public void setControlled(Long controlled)
|
||||
{
|
||||
this.controlled = controlled;
|
||||
}
|
||||
|
||||
public Long getControlled()
|
||||
{
|
||||
return controlled;
|
||||
}
|
||||
|
||||
public void setBody(Long body)
|
||||
{
|
||||
this.body = body;
|
||||
@ -487,14 +822,14 @@ public class BasSheep extends BaseEntity
|
||||
return source;
|
||||
}
|
||||
|
||||
public void setSoureDate(Date soureDate)
|
||||
public void setSourceDate(Date sourceDate)
|
||||
{
|
||||
this.soureDate = soureDate;
|
||||
this.sourceDate = sourceDate;
|
||||
}
|
||||
|
||||
public Date getSoureDate()
|
||||
public Date getSourceDate()
|
||||
{
|
||||
return soureDate;
|
||||
return sourceDate;
|
||||
}
|
||||
|
||||
public void setSourceRanchId(Long sourceRanchId)
|
||||
@ -507,14 +842,14 @@ public class BasSheep extends BaseEntity
|
||||
return sourceRanchId;
|
||||
}
|
||||
|
||||
public void setComment(String comment)
|
||||
public void setSourceRanch(String sourceRanch)
|
||||
{
|
||||
this.comment = comment;
|
||||
this.sourceRanch = sourceRanch;
|
||||
}
|
||||
|
||||
public String getComment()
|
||||
public String getSourceRanch()
|
||||
{
|
||||
return comment;
|
||||
return sourceRanch;
|
||||
}
|
||||
|
||||
public void setIsDelete(Long isDelete)
|
||||
@ -531,40 +866,64 @@ public class BasSheep extends BaseEntity
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("manageTags", getManageTags())
|
||||
.append("bsManageTags", getBsManageTags())
|
||||
.append("ranchId", getRanchId())
|
||||
.append("drRanch", getDrRanch())
|
||||
.append("sheepfoldId", getSheepfoldId())
|
||||
.append("sheepfoldName", getSheepfoldName())
|
||||
.append("electronicTags", getElectronicTags())
|
||||
.append("varietyId", getVarietyId())
|
||||
.append("variety", getVariety())
|
||||
.append("family", getFamily())
|
||||
.append("typeId", getTypeId())
|
||||
.append("name", getName())
|
||||
.append("gender", getGender())
|
||||
.append("birthday", getBirthday())
|
||||
.append("birthWeight", getBirthWeight())
|
||||
.append("dayAge", getDayAge())
|
||||
.append("monthAge", getMonthAge())
|
||||
.append("parity", getParity())
|
||||
.append("statusId", getStatusId())
|
||||
.append("birthWeight", getBirthWeight())
|
||||
.append("weaningDate", getWeaningDate())
|
||||
.append("statusId", getStatusId())
|
||||
.append("weaningWeight", getWeaningWeight())
|
||||
.append("currentWeight", getCurrentWeight())
|
||||
.append("breedStatusId", getBreedStatusId())
|
||||
.append("fatherId", getFatherId())
|
||||
.append("motherId", getMotherId())
|
||||
.append("breed", getBreed())
|
||||
.append("bsFatherId", getBsFatherId())
|
||||
.append("fatherManageTags", getFatherManageTags())
|
||||
.append("bsMotherId", getBsMotherId())
|
||||
.append("motherManageTags", getMotherManageTags())
|
||||
.append("receptorId", getReceptorId())
|
||||
.append("receptorManageTags", getReceptorManageTags())
|
||||
.append("fatherFatherId", getFatherFatherId())
|
||||
.append("grandfatherManageTags", getGrandfatherManageTags())
|
||||
.append("fatherMotherId", getFatherMotherId())
|
||||
.append("grandmotherManageTags", getGrandmotherManageTags())
|
||||
.append("fatherId", getFatherId())
|
||||
.append("maternalGrandfatherManageTags", getMaternalGrandfatherManageTags())
|
||||
.append("motherId", getMotherId())
|
||||
.append("maternalGrandmotherManageTags", getMaternalGrandmotherManageTags())
|
||||
.append("matingDate", getMatingDate())
|
||||
.append("matingTypeId", getMatingTypeId())
|
||||
.append("pregDate", getPregDate())
|
||||
.append("lambingDate", getLambingDate())
|
||||
.append("lambingDay", getLambingDay())
|
||||
.append("matingDay", getMatingDay())
|
||||
.append("gestationDay", getGestationDay())
|
||||
.append("expectedDate", getExpectedDate())
|
||||
.append("controlled", getControlled())
|
||||
.append("postLambingDay", getPostLambingDay())
|
||||
.append("lactationDay", getLactationDay())
|
||||
.append("anestrousDay", getAnestrousDay())
|
||||
.append("matingCounts", getMatingCounts())
|
||||
.append("matingTotal", getMatingTotal())
|
||||
.append("miscarriageCounts", getMiscarriageCounts())
|
||||
.append("comment", getComment())
|
||||
.append("controlled", getControlled())
|
||||
.append("body", getBody())
|
||||
.append("breast", getBreast())
|
||||
.append("source", getSource())
|
||||
.append("soureDate", getSoureDate())
|
||||
.append("sourceDate", getSourceDate())
|
||||
.append("sourceRanchId", getSourceRanchId())
|
||||
.append("comment", getComment())
|
||||
.append("sourceRanch", getSourceRanch())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("createBy", getCreateBy())
|
@ -1,61 +0,0 @@
|
||||
package com.zhyc.module.sheep_file.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.sheep_file.domain.BasSheep;
|
||||
|
||||
/**
|
||||
* 羊只基本信息Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-10
|
||||
*/
|
||||
public interface BasSheepMapper
|
||||
{
|
||||
/**
|
||||
* 查询羊只基本信息
|
||||
*
|
||||
* @param id 羊只基本信息主键
|
||||
* @return 羊只基本信息
|
||||
*/
|
||||
public BasSheep selectBasSheepById(Long id);
|
||||
|
||||
/**
|
||||
* 查询羊只基本信息列表
|
||||
*
|
||||
* @param basSheep 羊只基本信息
|
||||
* @return 羊只基本信息集合
|
||||
*/
|
||||
public List<BasSheep> selectBasSheepList(BasSheep basSheep);
|
||||
|
||||
/**
|
||||
* 新增羊只基本信息
|
||||
*
|
||||
* @param basSheep 羊只基本信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBasSheep(BasSheep basSheep);
|
||||
|
||||
/**
|
||||
* 修改羊只基本信息
|
||||
*
|
||||
* @param basSheep 羊只基本信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBasSheep(BasSheep basSheep);
|
||||
|
||||
/**
|
||||
* 删除羊只基本信息
|
||||
*
|
||||
* @param id 羊只基本信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasSheepById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除羊只基本信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasSheepByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.zhyc.module.sheep_file.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.sheep_file.domain.SheepFile;
|
||||
|
||||
/**
|
||||
* 羊只档案Mapper接口
|
||||
*
|
||||
* @author wyt
|
||||
* @date 2025-07-13
|
||||
*/
|
||||
public interface SheepFileMapper
|
||||
{
|
||||
/**
|
||||
* 查询羊只档案
|
||||
*
|
||||
* @param id 羊只档案主键
|
||||
* @return 羊只档案
|
||||
*/
|
||||
public SheepFile selectSheepFileById(Long id);
|
||||
|
||||
/**
|
||||
* 查询羊只档案列表
|
||||
*
|
||||
* @param sheepFile 羊只档案
|
||||
* @return 羊只档案集合
|
||||
*/
|
||||
public List<SheepFile> selectSheepFileList(SheepFile sheepFile);
|
||||
|
||||
/**
|
||||
* 新增羊只档案
|
||||
*
|
||||
* @param sheepFile 羊只档案
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSheepFile(SheepFile sheepFile);
|
||||
|
||||
/**
|
||||
* 修改羊只档案
|
||||
*
|
||||
* @param sheepFile 羊只档案
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSheepFile(SheepFile sheepFile);
|
||||
|
||||
/**
|
||||
* 删除羊只档案
|
||||
*
|
||||
* @param id 羊只档案主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSheepFileById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除羊只档案
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSheepFileByIds(Long[] ids);
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
package com.zhyc.module.sheep_file.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.sheep_file.domain.BasSheep;
|
||||
|
||||
/**
|
||||
* 羊只基本信息Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-10
|
||||
*/
|
||||
public interface IBasSheepService
|
||||
{
|
||||
/**
|
||||
* 查询羊只基本信息
|
||||
*
|
||||
* @param id 羊只基本信息主键
|
||||
* @return 羊只基本信息
|
||||
*/
|
||||
public BasSheep selectBasSheepById(Long id);
|
||||
|
||||
/**
|
||||
* 查询羊只基本信息列表
|
||||
*
|
||||
* @param basSheep 羊只基本信息
|
||||
* @return 羊只基本信息集合
|
||||
*/
|
||||
public List<BasSheep> selectBasSheepList(BasSheep basSheep);
|
||||
|
||||
/**
|
||||
* 新增羊只基本信息
|
||||
*
|
||||
* @param basSheep 羊只基本信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBasSheep(BasSheep basSheep);
|
||||
|
||||
/**
|
||||
* 修改羊只基本信息
|
||||
*
|
||||
* @param basSheep 羊只基本信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBasSheep(BasSheep basSheep);
|
||||
|
||||
/**
|
||||
* 批量删除羊只基本信息
|
||||
*
|
||||
* @param ids 需要删除的羊只基本信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasSheepByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除羊只基本信息信息
|
||||
*
|
||||
* @param id 羊只基本信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasSheepById(Long id);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.zhyc.module.sheep_file.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.sheep_file.domain.SheepFile;
|
||||
|
||||
/**
|
||||
* 羊只档案Service接口
|
||||
*
|
||||
* @author wyt
|
||||
* @date 2025-07-13
|
||||
*/
|
||||
public interface ISheepFileService
|
||||
{
|
||||
/**
|
||||
* 查询羊只档案
|
||||
*
|
||||
* @param id 羊只档案主键
|
||||
* @return 羊只档案
|
||||
*/
|
||||
public SheepFile selectSheepFileById(Long id);
|
||||
|
||||
/**
|
||||
* 查询羊只档案列表
|
||||
*
|
||||
* @param sheepFile 羊只档案
|
||||
* @return 羊只档案集合
|
||||
*/
|
||||
public List<SheepFile> selectSheepFileList(SheepFile sheepFile);
|
||||
|
||||
/**
|
||||
* 新增羊只档案
|
||||
*
|
||||
* @param sheepFile 羊只档案
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSheepFile(SheepFile sheepFile);
|
||||
|
||||
/**
|
||||
* 修改羊只档案
|
||||
*
|
||||
* @param sheepFile 羊只档案
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSheepFile(SheepFile sheepFile);
|
||||
|
||||
/**
|
||||
* 批量删除羊只档案
|
||||
*
|
||||
* @param ids 需要删除的羊只档案主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSheepFileByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除羊只档案信息
|
||||
*
|
||||
* @param id 羊只档案主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSheepFileById(Long id);
|
||||
}
|
@ -1,96 +0,0 @@
|
||||
package com.zhyc.module.sheep_file.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.zhyc.module.sheep_file.mapper.BasSheepMapper;
|
||||
import com.zhyc.module.sheep_file.domain.BasSheep;
|
||||
import com.zhyc.module.sheep_file.service.IBasSheepService;
|
||||
|
||||
/**
|
||||
* 羊只基本信息Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-10
|
||||
*/
|
||||
@Service
|
||||
public class BasSheepServiceImpl implements IBasSheepService
|
||||
{
|
||||
@Autowired
|
||||
private BasSheepMapper basSheepMapper;
|
||||
|
||||
/**
|
||||
* 查询羊只基本信息
|
||||
*
|
||||
* @param id 羊只基本信息主键
|
||||
* @return 羊只基本信息
|
||||
*/
|
||||
@Override
|
||||
public BasSheep selectBasSheepById(Long id)
|
||||
{
|
||||
return basSheepMapper.selectBasSheepById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询羊只基本信息列表
|
||||
*
|
||||
* @param basSheep 羊只基本信息
|
||||
* @return 羊只基本信息
|
||||
*/
|
||||
@Override
|
||||
public List<BasSheep> selectBasSheepList(BasSheep basSheep)
|
||||
{
|
||||
return basSheepMapper.selectBasSheepList(basSheep);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增羊只基本信息
|
||||
*
|
||||
* @param basSheep 羊只基本信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBasSheep(BasSheep basSheep)
|
||||
{
|
||||
basSheep.setCreateTime(DateUtils.getNowDate());
|
||||
return basSheepMapper.insertBasSheep(basSheep);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改羊只基本信息
|
||||
*
|
||||
* @param basSheep 羊只基本信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBasSheep(BasSheep basSheep)
|
||||
{
|
||||
basSheep.setUpdateTime(DateUtils.getNowDate());
|
||||
return basSheepMapper.updateBasSheep(basSheep);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除羊只基本信息
|
||||
*
|
||||
* @param ids 需要删除的羊只基本信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBasSheepByIds(Long[] ids)
|
||||
{
|
||||
return basSheepMapper.deleteBasSheepByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除羊只基本信息信息
|
||||
*
|
||||
* @param id 羊只基本信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBasSheepById(Long id)
|
||||
{
|
||||
return basSheepMapper.deleteBasSheepById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package com.zhyc.module.sheep_file.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.zhyc.module.sheep_file.mapper.SheepFileMapper;
|
||||
import com.zhyc.module.sheep_file.domain.SheepFile;
|
||||
import com.zhyc.module.sheep_file.service.ISheepFileService;
|
||||
|
||||
/**
|
||||
* 羊只档案Service业务层处理
|
||||
*
|
||||
* @author wyt
|
||||
* @date 2025-07-13
|
||||
*/
|
||||
@Service
|
||||
public class SheepFileServiceImpl implements ISheepFileService
|
||||
{
|
||||
@Autowired
|
||||
private SheepFileMapper sheepFileMapper;
|
||||
|
||||
/**
|
||||
* 查询羊只档案
|
||||
*
|
||||
* @param id 羊只档案主键
|
||||
* @return 羊只档案
|
||||
*/
|
||||
@Override
|
||||
public SheepFile selectSheepFileById(Long id)
|
||||
{
|
||||
return sheepFileMapper.selectSheepFileById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询羊只档案列表
|
||||
*
|
||||
* @param sheepFile 羊只档案
|
||||
* @return 羊只档案
|
||||
*/
|
||||
@Override
|
||||
public List<SheepFile> selectSheepFileList(SheepFile sheepFile)
|
||||
{
|
||||
return sheepFileMapper.selectSheepFileList(sheepFile);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增羊只档案
|
||||
*
|
||||
* @param sheepFile 羊只档案
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSheepFile(SheepFile sheepFile)
|
||||
{
|
||||
sheepFile.setCreateTime(DateUtils.getNowDate());
|
||||
return sheepFileMapper.insertSheepFile(sheepFile);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改羊只档案
|
||||
*
|
||||
* @param sheepFile 羊只档案
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSheepFile(SheepFile sheepFile)
|
||||
{
|
||||
sheepFile.setUpdateTime(DateUtils.getNowDate());
|
||||
return sheepFileMapper.updateSheepFile(sheepFile);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除羊只档案
|
||||
*
|
||||
* @param ids 需要删除的羊只档案主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSheepFileByIds(Long[] ids)
|
||||
{
|
||||
return sheepFileMapper.deleteSheepFileByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除羊只档案信息
|
||||
*
|
||||
* @param id 羊只档案主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSheepFileById(Long id)
|
||||
{
|
||||
return sheepFileMapper.deleteSheepFileById(id);
|
||||
}
|
||||
}
|
@ -58,4 +58,5 @@ public interface DaSheepfoldMapper
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDaSheepfoldByIds(Long[] ids);
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,56 @@
|
||||
<?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.zhyc.module.biosafety.mapper.SwMedicTypeMapper">
|
||||
|
||||
<resultMap type="SwMedicType" id="SwMedicTypeResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSwMedicTypeVo">
|
||||
select id, name from sw_medic_type
|
||||
</sql>
|
||||
|
||||
<select id="selectSwMedicTypeList" parameterType="SwMedicType" resultMap="SwMedicTypeResult">
|
||||
<include refid="selectSwMedicTypeVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSwMedicTypeById" parameterType="Long" resultMap="SwMedicTypeResult">
|
||||
<include refid="selectSwMedicTypeVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertSwMedicType" parameterType="SwMedicType" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sw_medic_type
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">name,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">#{name},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSwMedicType" parameterType="SwMedicType">
|
||||
update sw_medic_type
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null">name = #{name},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSwMedicTypeById" parameterType="Long">
|
||||
delete from sw_medic_type where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSwMedicTypeByIds" parameterType="String">
|
||||
delete from sw_medic_type where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,76 @@
|
||||
<?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.zhyc.module.biosafety.mapper.SwMedicineMapper">
|
||||
|
||||
<resultMap type="SwMedicine" id="SwMedicineResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="medica" column="medica" />
|
||||
<result property="name" column="name" />
|
||||
<result property="medicType" column="medic_type" />
|
||||
<result property="usageId" column="usage_id" />
|
||||
<result property="comment" column="comment" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSwMedicineVo">
|
||||
select id, medica, name, medic_type, usage_id, comment from sw_medicine
|
||||
</sql>
|
||||
|
||||
<select id="selectSwMedicineList" parameterType="SwMedicine" resultMap="SwMedicineResult">
|
||||
<include refid="selectSwMedicineVo"/>
|
||||
<where>
|
||||
<if test="medica != null and medica != ''"> and medica = #{medica}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="medicType != null "> and medic_type = #{medicType}</if>
|
||||
<if test="usageId != null "> and usage_id = #{usageId}</if>
|
||||
<if test="comment != null and comment != ''"> and comment = #{comment}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSwMedicineById" parameterType="Long" resultMap="SwMedicineResult">
|
||||
<include refid="selectSwMedicineVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertSwMedicine" parameterType="SwMedicine" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sw_medicine
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="medica != null">medica,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="medicType != null">medic_type,</if>
|
||||
<if test="usageId != null">usage_id,</if>
|
||||
<if test="comment != null">comment,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="medica != null">#{medica},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="medicType != null">#{medicType},</if>
|
||||
<if test="usageId != null">#{usageId},</if>
|
||||
<if test="comment != null">#{comment},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSwMedicine" parameterType="SwMedicine">
|
||||
update sw_medicine
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="medica != null">medica = #{medica},</if>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="medicType != null">medic_type = #{medicType},</if>
|
||||
<if test="usageId != null">usage_id = #{usageId},</if>
|
||||
<if test="comment != null">comment = #{comment},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSwMedicineById" parameterType="Long">
|
||||
delete from sw_medicine where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSwMedicineByIds" parameterType="String">
|
||||
delete from sw_medicine where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,121 @@
|
||||
<?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.zhyc.module.biosafety.mapper.SwMedicineUsageMapper">
|
||||
|
||||
<resultMap type="SwMedicineUsage" id="SwMedicineUsageResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="useType" column="use_type" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="SwMedicineUsageSwMedicineUsageDetailsResult" type="SwMedicineUsage" extends="SwMedicineUsageResult">
|
||||
<collection property="swMedicineUsageDetailsList" ofType="SwMedicineUsageDetails" column="id" select="selectSwMedicineUsageDetailsList" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="SwMedicineUsageDetails" id="SwMedicineUsageDetailsResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="mediUsage" column="medi_usage" />
|
||||
<result property="mediId" column="medi_id" />
|
||||
<result property="mediName" column="name"/>
|
||||
<result property="dosage" column="dosage" />
|
||||
<result property="unit" column="unit" />
|
||||
<result property="usageId" column="usageId" />
|
||||
<result property="manufacturer" column="manufacturer" />
|
||||
<result property="batchNumber" column="batch_number" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSwMedicineUsageVo">
|
||||
select id, name, use_type, update_by, update_time, create_by, create_time from sw_medicine_usage
|
||||
</sql>
|
||||
|
||||
<select id="selectSwMedicineUsageList" parameterType="SwMedicineUsage" resultMap="SwMedicineUsageResult">
|
||||
<include refid="selectSwMedicineUsageVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="useType != null and useType != ''"> and use_type = #{useType}</if>
|
||||
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSwMedicineUsageById" parameterType="Long" resultMap="SwMedicineUsageSwMedicineUsageDetailsResult">
|
||||
select id, name, use_type, update_by, update_time, create_by, create_time
|
||||
from sw_medicine_usage
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectSwMedicineUsageDetailsList" resultMap="SwMedicineUsageDetailsResult">
|
||||
select smud.id, medi_usage, medi_id, dosage, unit, usageId, manufacturer, batch_number,
|
||||
sm.name
|
||||
from sw_medicine_usage_details smud
|
||||
join sw_medicine sm on smud.medi_id = sm.id
|
||||
where medi_usage = #{medi_usage}
|
||||
</select>
|
||||
|
||||
<insert id="insertSwMedicineUsage" parameterType="SwMedicineUsage" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sw_medicine_usage
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">name,</if>
|
||||
<if test="useType != null">use_type,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="useType != null">#{useType},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSwMedicineUsage" parameterType="SwMedicineUsage">
|
||||
update sw_medicine_usage
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="useType != null">use_type = #{useType},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSwMedicineUsageById" parameterType="Long">
|
||||
delete from sw_medicine_usage where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSwMedicineUsageByIds" parameterType="String">
|
||||
delete from sw_medicine_usage where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSwMedicineUsageDetailsByMediUsages" parameterType="String">
|
||||
delete from sw_medicine_usage_details where medi_usage in
|
||||
<foreach item="mediUsage" collection="array" open="(" separator="," close=")">
|
||||
#{mediUsage}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSwMedicineUsageDetailsByMediUsage" parameterType="Long">
|
||||
delete from sw_medicine_usage_details where medi_usage = #{mediUsage}
|
||||
</delete>
|
||||
|
||||
<insert id="batchSwMedicineUsageDetails">
|
||||
insert into sw_medicine_usage_details( id, medi_usage, medi_id, dosage, unit, usageId, manufacturer, batch_number) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.id}, #{item.mediUsage}, #{item.mediId}, #{item.dosage}, #{item.unit}, #{item.usageId}, #{item.manufacturer}, #{item.batchNumber})
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -0,0 +1,129 @@
|
||||
<?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.zhyc.module.biosafety.mapper.SwPrescriptionMapper">
|
||||
|
||||
<resultMap type="SwPrescription" id="SwPrescriptionResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="no" column="no" />
|
||||
<result property="name" column="name" />
|
||||
<result property="persType" column="pers_type" />
|
||||
<result property="comment" column="comment" />
|
||||
<result property="status" column="status" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="SwPrescriptionSwPresDetailResult" type="SwPrescription" extends="SwPrescriptionResult">
|
||||
<collection property="swPresDetailList" ofType="SwPresDetail" column="id" select="selectSwPresDetailList" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="SwPresDetail" id="SwPresDetailResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="persId" column="pers_id" />
|
||||
<result property="mediId" column="medi_id" />
|
||||
<result property="dosage" column="dosage" />
|
||||
<result property="unitId" column="unit_id" />
|
||||
<result property="usageId" column="usage_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSwPrescriptionVo">
|
||||
select id, no, name, pers_type, comment, status, update_by, update_time, create_by, create_time from sw_prescription
|
||||
</sql>
|
||||
|
||||
<select id="selectSwPrescriptionList" parameterType="SwPrescription" resultMap="SwPrescriptionResult">
|
||||
<include refid="selectSwPrescriptionVo"/>
|
||||
<where>
|
||||
<if test="no != null and no != ''"> and no like concat('%', #{no}, '%')</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="persType != null "> and pers_type = #{persType}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSwPrescriptionById" parameterType="Long" resultMap="SwPrescriptionSwPresDetailResult">
|
||||
select id, no, name, pers_type, comment, status, update_by, update_time, create_by, create_time
|
||||
from sw_prescription
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectSwPresDetailList" resultMap="SwPresDetailResult">
|
||||
select id, pers_id, medi_id, dosage, unit_id, usage_id
|
||||
from sw_pres_detail
|
||||
where pers_id = #{pers_id}
|
||||
</select>
|
||||
|
||||
<insert id="insertSwPrescription" parameterType="SwPrescription" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sw_prescription
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="no != null">no,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="persType != null">pers_type,</if>
|
||||
<if test="comment != null">comment,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="no != null">#{no},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="persType != null">#{persType},</if>
|
||||
<if test="comment != null">#{comment},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSwPrescription" parameterType="SwPrescription">
|
||||
update sw_prescription
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="no != null">no = #{no},</if>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="persType != null">pers_type = #{persType},</if>
|
||||
<if test="comment != null">comment = #{comment},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSwPrescriptionById" parameterType="Long">
|
||||
delete from sw_prescription where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSwPrescriptionByIds" parameterType="String">
|
||||
delete from sw_prescription where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSwPresDetailByPersIds" parameterType="String">
|
||||
delete from sw_pres_detail where pers_id in
|
||||
<foreach item="persId" collection="array" open="(" separator="," close=")">
|
||||
#{persId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSwPresDetailByPersId" parameterType="Long">
|
||||
delete from sw_pres_detail where pers_id = #{persId}
|
||||
</delete>
|
||||
|
||||
<insert id="batchSwPresDetail">
|
||||
insert into sw_pres_detail( id, pers_id, medi_id, dosage, unit_id, usage_id) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.id}, #{item.persId}, #{item.mediId}, #{item.dosage}, #{item.unitId}, #{item.usageId})
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -0,0 +1,59 @@
|
||||
<?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.zhyc.module.biosafety.mapper.SwUnitMapper">
|
||||
|
||||
<resultMap type="SwUnit" id="SwUnitResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="unit" column="unit" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSwUnitVo">
|
||||
select id, name,unit from sw_unit
|
||||
</sql>
|
||||
|
||||
<select id="selectSwUnitList" parameterType="SwUnit" resultMap="SwUnitResult">
|
||||
<include refid="selectSwUnitVo"/>
|
||||
<where>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSwUnitById" parameterType="Long" resultMap="SwUnitResult">
|
||||
<include refid="selectSwUnitVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertSwUnit" parameterType="SwUnit" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sw_unit
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">name,</if>
|
||||
<if test="unit != null">unit,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="unit != null">#{unit},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSwUnit" parameterType="SwUnit">
|
||||
update sw_unit
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="unit != null">unit = #{unit},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSwUnitById" parameterType="Long">
|
||||
delete from sw_unit where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSwUnitByIds" parameterType="String">
|
||||
delete from sw_unit where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,56 @@
|
||||
<?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.zhyc.module.biosafety.mapper.SwUsageMapper">
|
||||
|
||||
<resultMap type="SwUsage" id="SwUsageResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSwUsageVo">
|
||||
select id, name from sw_usage
|
||||
</sql>
|
||||
|
||||
<select id="selectSwUsageList" parameterType="SwUsage" resultMap="SwUsageResult">
|
||||
<include refid="selectSwUsageVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSwUsageById" parameterType="Long" resultMap="SwUsageResult">
|
||||
<include refid="selectSwUsageVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertSwUsage" parameterType="SwUsage" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sw_usage
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">name,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">#{name},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSwUsage" parameterType="SwUsage">
|
||||
update sw_usage
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null">name = #{name},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSwUsageById" parameterType="Long">
|
||||
delete from sw_usage where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSwUsageByIds" parameterType="String">
|
||||
delete from sw_usage where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,216 @@
|
||||
<?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.zhyc.module.produce.breed.mapper.ScLambingRecordMapper">
|
||||
|
||||
<!-- 基础结果映射 -->
|
||||
<resultMap type="ScLambingRecord" id="ScLambingRecordResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="sheepId" column="sheep_id" />
|
||||
<result property="parity" column="parity" />
|
||||
<result property="lambsBorn" column="lambs_born" />
|
||||
<result property="survival" column="survival" />
|
||||
<result property="technician" column="technician" />
|
||||
<result property="score" column="score" />
|
||||
<result property="comment" column="comment" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTme" column="create_tme" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 详细结果映射(包含关联信息) -->
|
||||
<resultMap type="ScLambingRecord" id="ScLambingRecordDetailResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="sheepId" column="sheep_id" />
|
||||
<result property="parity" column="parity" />
|
||||
<result property="lambsBorn" column="lambs_born" />
|
||||
<result property="survival" column="survival" />
|
||||
<result property="technician" column="technician" />
|
||||
<result property="score" column="score" />
|
||||
<result property="comment" column="comment" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTme" column="create_tme" />
|
||||
|
||||
<!-- 母羊信息 -->
|
||||
<result property="femaleEarNumber" column="female_ear_number" />
|
||||
<result property="femaleBreed" column="female_breed" />
|
||||
<result property="monthAge" column="month_age" />
|
||||
<result property="currentShed" column="current_shed" />
|
||||
<result property="farm" column="farm" />
|
||||
|
||||
<!-- 公羊信息 -->
|
||||
<result property="maleEarNumber" column="male_ear_number" />
|
||||
<result property="maleBreed" column="male_breed" />
|
||||
|
||||
<!-- 配种信息 -->
|
||||
<result property="breedingDate" column="breeding_date" />
|
||||
<result property="pregnancyDays" column="pregnancy_days" />
|
||||
|
||||
<!-- 统计信息 -->
|
||||
<result property="maleCount" column="male_count" />
|
||||
<result property="femaleCount" column="female_count" />
|
||||
<result property="retainedMaleCount" column="retained_male_count" />
|
||||
<result property="retainedFemaleCount" column="retained_female_count" />
|
||||
<result property="unretainedMaleCount" column="unretained_male_count" />
|
||||
<result property="unretainedFemaleCount" column="unretained_female_count" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 基础查询SQL -->
|
||||
<sql id="selectScLambingRecordVo">
|
||||
select id, sheep_id, parity, lambs_born, survival, technician, score, comment, create_by, create_tme from sc_lambing_record
|
||||
</sql>
|
||||
|
||||
<!-- 详细查询SQL(包含关联信息) -->
|
||||
<sql id="selectScLambingRecordDetailVo">
|
||||
SELECT
|
||||
lr.id, lr.sheep_id, lr.parity, lr.lambs_born, lr.survival,
|
||||
lr.technician, lr.score, lr.comment, lr.create_by, lr.create_tme,
|
||||
|
||||
-- 从bas_sheep表获取母羊信息
|
||||
mother.manage_tags as female_ear_number,
|
||||
mother.variety_id as female_breed,
|
||||
TIMESTAMPDIFF(MONTH, mother.birthday, NOW()) as month_age,
|
||||
mother.sheepfold_id as current_shed,
|
||||
mother.ranch_id as farm,
|
||||
|
||||
-- 从sc_breed_record表获取配种信息
|
||||
br.create_time as breeding_date,
|
||||
DATEDIFF(lr.create_tme, br.create_time) as pregnancy_days,
|
||||
|
||||
-- 从bas_sheep表获取公羊信息
|
||||
father.manage_tags as male_ear_number,
|
||||
father.variety_id as male_breed,
|
||||
|
||||
-- 统计羔羊信息(从bas_sheep表统计,根据母羊ID)
|
||||
(SELECT COUNT(*) FROM bas_sheep lamb WHERE lamb.mother_id = lr.sheep_id AND lamb.gender = 1 AND lamb.is_delete = 0) as male_count,
|
||||
(SELECT COUNT(*) FROM bas_sheep lamb WHERE lamb.mother_id = lr.sheep_id AND lamb.gender = 0 AND lamb.is_delete = 0) as female_count,
|
||||
(SELECT COUNT(*) FROM bas_sheep lamb WHERE lamb.mother_id = lr.sheep_id AND lamb.gender = 1 AND lamb.status_id = 1 AND lamb.is_delete = 0) as retained_male_count,
|
||||
(SELECT COUNT(*) FROM bas_sheep lamb WHERE lamb.mother_id = lr.sheep_id AND lamb.gender = 0 AND lamb.status_id = 1 AND lamb.is_delete = 0) as retained_female_count,
|
||||
(SELECT COUNT(*) FROM bas_sheep lamb WHERE lamb.mother_id = lr.sheep_id AND lamb.gender = 1 AND lamb.status_id != 1 AND lamb.is_delete = 0) as unretained_male_count,
|
||||
(SELECT COUNT(*) FROM bas_sheep lamb WHERE lamb.mother_id = lr.sheep_id AND lamb.gender = 0 AND lamb.status_id != 1 AND lamb.is_delete = 0) as unretained_female_count
|
||||
|
||||
FROM sc_lambing_record lr
|
||||
LEFT JOIN bas_sheep mother ON lr.sheep_id = mother.id
|
||||
LEFT JOIN sc_breed_record br ON lr.sheep_id = br.ewe_id AND lr.parity = mother.parity
|
||||
LEFT JOIN bas_sheep father ON br.ram_id = father.id
|
||||
</sql>
|
||||
|
||||
<!-- 查询产羔记录列表(包含关联信息) -->
|
||||
<select id="selectScLambingRecordList" parameterType="ScLambingRecord" resultMap="ScLambingRecordDetailResult">
|
||||
<include refid="selectScLambingRecordDetailVo"/>
|
||||
<where>
|
||||
<if test="femaleEarNumber != null and femaleEarNumber != ''"> and mother.manage_tags LIKE CONCAT('%', #{femaleEarNumber}, '%')</if>
|
||||
<if test="femaleBreed != null and femaleBreed != ''"> and mother.variety_id = #{femaleBreed}</if>
|
||||
<if test="farm != null and farm != ''"> and mother.ranch_id = #{farm}</if>
|
||||
<if test="sheepId != null and sheepId != ''"> and lr.sheep_id = #{sheepId}</if>
|
||||
<if test="parity != null"> and lr.parity = #{parity}</if>
|
||||
<if test="lambsBorn != null"> and lr.lambs_born = #{lambsBorn}</if>
|
||||
<if test="survival != null"> and lr.survival = #{survival}</if>
|
||||
<if test="technician != null and technician != ''"> and lr.technician LIKE CONCAT('%', #{technician}, '%')</if>
|
||||
<if test="score != null"> and lr.score = #{score}</if>
|
||||
<if test="comment != null and comment != ''"> and lr.comment LIKE CONCAT('%', #{comment}, '%')</if>
|
||||
<if test="createBy != null and createBy != ''"> and lr.create_by = #{createBy}</if>
|
||||
<if test="createTme != null"> and DATE(lr.create_tme) = #{createTme}</if>
|
||||
<if test="params.beginBreedingDate != null and params.beginBreedingDate != ''"><!-- 配种日期开始 -->
|
||||
and DATE(br.create_time) >= #{params.beginBreedingDate}
|
||||
</if>
|
||||
<if test="params.endBreedingDate != null and params.endBreedingDate != ''"><!-- 配种日期结束 -->
|
||||
and DATE(br.create_time) <= #{params.endBreedingDate}
|
||||
</if>
|
||||
and mother.is_delete = 0
|
||||
</where>
|
||||
ORDER BY lr.create_tme DESC
|
||||
</select>
|
||||
|
||||
<!-- 查询产羔记录基础信息 -->
|
||||
<select id="selectScLambingRecordById" parameterType="Long" resultMap="ScLambingRecordResult">
|
||||
<include refid="selectScLambingRecordVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<!-- 查询产羔记录详细信息(包含关联信息) -->
|
||||
<select id="selectScLambingRecordDetailById" parameterType="Long" resultMap="ScLambingRecordDetailResult">
|
||||
<include refid="selectScLambingRecordDetailVo"/>
|
||||
where lr.id = #{id} and mother.is_delete = 0
|
||||
</select>
|
||||
|
||||
<!-- 查询羔羊详情(从bas_sheep表查询) -->
|
||||
<select id="selectLambDetailByLambingRecordId" parameterType="Long" resultType="map">
|
||||
SELECT
|
||||
sheep.manage_tags as lambEarNumber,
|
||||
sheep.variety_id as lambBreed,
|
||||
CASE sheep.gender
|
||||
WHEN 1 THEN 'male'
|
||||
WHEN 0 THEN 'female'
|
||||
ELSE 'unknown'
|
||||
END as gender,
|
||||
sheep.birth_weight as birthWeight,
|
||||
CASE sheep.status_id
|
||||
WHEN 1 THEN true
|
||||
ELSE false
|
||||
END as isRetained,
|
||||
sheep.family as lineage,
|
||||
sheep.birthday
|
||||
FROM bas_sheep sheep
|
||||
WHERE sheep.mother_id = (SELECT sheep_id FROM sc_lambing_record WHERE id = #{lambingRecordId})
|
||||
AND sheep.is_delete = 0
|
||||
ORDER BY sheep.birthday ASC
|
||||
</select>
|
||||
|
||||
<!-- 新增产羔记录 -->
|
||||
<insert id="insertScLambingRecord" parameterType="ScLambingRecord" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sc_lambing_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="sheepId != null">sheep_id,</if>
|
||||
<if test="parity != null">parity,</if>
|
||||
<if test="lambsBorn != null">lambs_born,</if>
|
||||
<if test="survival != null">survival,</if>
|
||||
<if test="technician != null">technician,</if>
|
||||
<if test="score != null">score,</if>
|
||||
<if test="comment != null">comment,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTme != null">create_tme,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="sheepId != null">#{sheepId},</if>
|
||||
<if test="parity != null">#{parity},</if>
|
||||
<if test="lambsBorn != null">#{lambsBorn},</if>
|
||||
<if test="survival != null">#{survival},</if>
|
||||
<if test="technician != null">#{technician},</if>
|
||||
<if test="score != null">#{score},</if>
|
||||
<if test="comment != null">#{comment},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTme != null">#{createTme},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<!-- 修改产羔记录 -->
|
||||
<update id="updateScLambingRecord" parameterType="ScLambingRecord">
|
||||
update sc_lambing_record
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="sheepId != null">sheep_id = #{sheepId},</if>
|
||||
<if test="parity != null">parity = #{parity},</if>
|
||||
<if test="lambsBorn != null">lambs_born = #{lambsBorn},</if>
|
||||
<if test="survival != null">survival = #{survival},</if>
|
||||
<if test="technician != null">technician = #{technician},</if>
|
||||
<if test="score != null">score = #{score},</if>
|
||||
<if test="comment != null">comment = #{comment},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTme != null">create_tme = #{createTme},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 删除产羔记录 -->
|
||||
<delete id="deleteScLambingRecordById" parameterType="Long">
|
||||
delete from sc_lambing_record where id = #{id}
|
||||
</delete>
|
||||
|
||||
<!-- 批量删除产羔记录 -->
|
||||
<delete id="deleteScLambingRecordByIds" parameterType="String">
|
||||
delete from sc_lambing_record where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,71 @@
|
||||
<?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.zhyc.module.produce.manage_sheep.add_sheep.mapper.ScAddSheepMapper">
|
||||
<resultMap type="com.zhyc.module.produce.manage_sheep.add_sheep.domain.ScAddSheep" id="ScAddSheepResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="sheepId" column="sheep_id" />
|
||||
<result property="sheepfold" column="sheepfold" />
|
||||
<result property="father" column="father" />
|
||||
<result property="mother" column="mother" />
|
||||
<result property="bornWeight" column="born_weight" />
|
||||
<result property="birthday" column="birthday" />
|
||||
<result property="gender" column="gender" />
|
||||
<result property="parity" column="parity" />
|
||||
<result property="varietyId" column="variety_id" />
|
||||
<result property="joinDate" column="join_date" />
|
||||
<result property="comment" column="comment" />
|
||||
<result property="technician" column="technician" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<insert id="insert" parameterType="ScAddSheep" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO sc_add_sheep
|
||||
(sheep_id, sheepfold, father, mother, born_weight, birthday, gender, parity,
|
||||
variety_id, join_date, comment, technician, create_by, create_time)
|
||||
VALUES
|
||||
(#{sheepId}, #{sheepfold}, #{father}, #{mother}, #{bornWeight}, #{birthday},
|
||||
#{gender}, #{parity}, #{varietyId}, #{joinDate}, #{comment}, #{technician},
|
||||
#{createBy}, #{createTime})
|
||||
</insert>
|
||||
|
||||
<select id="selectScAddSheepList" parameterType="ScAddSheep" resultMap="ScAddSheepResult">
|
||||
SELECT * FROM sc_add_sheep
|
||||
<where>
|
||||
<if test="sheepId != null and sheepId != ''">AND sheep_id LIKE CONCAT('%', #{sheepId}, '%')</if>
|
||||
<!-- 其他字段同理,按需扩展 -->
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<update id="updateScAddSheep" parameterType="ScAddSheep">
|
||||
UPDATE sc_add_sheep
|
||||
<set>
|
||||
sheep_id = #{sheepId},
|
||||
sheepfold = #{sheepfold},
|
||||
father = #{father},
|
||||
mother = #{mother},
|
||||
born_weight = #{bornWeight},
|
||||
birthday = #{birthday},
|
||||
gender = #{gender},
|
||||
parity = #{parity},
|
||||
variety_id = #{varietyId},
|
||||
join_date = #{joinDate},
|
||||
comment = #{comment},
|
||||
technician = #{technician},
|
||||
update_by = #{updateBy},
|
||||
update_time = NOW()
|
||||
</set>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteScAddSheepByIds">
|
||||
DELETE FROM sc_add_sheep WHERE id IN
|
||||
<foreach collection="array" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,92 @@
|
||||
<?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.zhyc.module.produce.manage_sheep.trans_group.mapper.ScTransGroupMapper">
|
||||
|
||||
<resultMap type="ScTransGroup" id="ScTransGroupResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="sheepId" column="sheep_id" />
|
||||
<result property="foldTo" column="fold_to" />
|
||||
<result property="foldFrom" column="fold_from" />
|
||||
<result property="reason" column="reason" />
|
||||
<result property="technician" column="technician" />
|
||||
<result property="status" column="status" />
|
||||
<result property="comment" column="comment" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectScTransGroupVo">
|
||||
select id, sheep_id, fold_to, fold_from, reason, technician, status, comment, create_by, create_time from sc_trans_group
|
||||
</sql>
|
||||
|
||||
<select id="selectScTransGroupList" parameterType="ScTransGroup" resultMap="ScTransGroupResult">
|
||||
<include refid="selectScTransGroupVo"/>
|
||||
<where>
|
||||
<if test="sheepId != null "> and sheep_id = #{sheepId}</if>
|
||||
<if test="foldTo != null and foldTo != ''"> and fold_to = #{foldTo}</if>
|
||||
<if test="foldFrom != null and foldFrom != ''"> and fold_from = #{foldFrom}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectScTransGroupById" parameterType="Integer" resultMap="ScTransGroupResult">
|
||||
<include refid="selectScTransGroupVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertScTransGroup" parameterType="ScTransGroup" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sc_trans_group
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="sheepId != null">sheep_id,</if>
|
||||
<if test="foldTo != null and foldTo != ''">fold_to,</if>
|
||||
<if test="foldFrom != null and foldFrom != ''">fold_from,</if>
|
||||
<if test="reason != null and reason != ''">reason,</if>
|
||||
<if test="technician != null and technician != ''">technician,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="comment != null">comment,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="sheepId != null">#{sheepId},</if>
|
||||
<if test="foldTo != null and foldTo != ''">#{foldTo},</if>
|
||||
<if test="foldFrom != null and foldFrom != ''">#{foldFrom},</if>
|
||||
<if test="reason != null and reason != ''">#{reason},</if>
|
||||
<if test="technician != null and technician != ''">#{technician},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="comment != null">#{comment},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateScTransGroup" parameterType="ScTransGroup">
|
||||
update sc_trans_group
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="sheepId != null">sheep_id = #{sheepId},</if>
|
||||
<if test="foldTo != null and foldTo != ''">fold_to = #{foldTo},</if>
|
||||
<if test="foldFrom != null and foldFrom != ''">fold_from = #{foldFrom},</if>
|
||||
<if test="reason != null and reason != ''">reason = #{reason},</if>
|
||||
<if test="technician != null and technician != ''">technician = #{technician},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="comment != null">comment = #{comment},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteScTransGroupById" parameterType="Integer">
|
||||
delete from sc_trans_group where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteScTransGroupByIds" parameterType="String">
|
||||
delete from sc_trans_group where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,91 @@
|
||||
<?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.zhyc.module.produce.manage_sheep.transition_info.mapper.ScTransitionInfoMapper">
|
||||
<resultMap type="ScTransitionInfo" id="ScTransitionInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="sheepId" column="sheep_id" />
|
||||
<result property="transTo" column="trans_to" />
|
||||
<result property="transFrom" column="trans_from" />
|
||||
<result property="transType" column="trans_type" />
|
||||
<result property="technician" column="technician" />
|
||||
<result property="status" column="status" />
|
||||
<result property="comment" column="comment" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectScTransitionInfoVo">
|
||||
select id, sheep_id, trans_to, trans_from, trans_type, technician, status, comment, create_by, create_time from sc_transition_info
|
||||
</sql>
|
||||
|
||||
<select id="selectScTransitionInfoList" parameterType="ScTransitionInfo" resultMap="ScTransitionInfoResult">
|
||||
<include refid="selectScTransitionInfoVo"/>
|
||||
<where>
|
||||
<if test="sheepId != null "> and sheep_id = #{sheepId}</if>
|
||||
<if test="transTo != null and transTo != ''"> and trans_to = #{transTo}</if>
|
||||
<if test="transFrom != null and transFrom != ''"> and trans_from = #{transFrom}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectScTransitionInfoById" parameterType="Integer" resultMap="ScTransitionInfoResult">
|
||||
<include refid="selectScTransitionInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertScTransitionInfo" parameterType="ScTransitionInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sc_transition_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="sheepId != null">sheep_id,</if>
|
||||
<if test="transTo != null and transTo != ''">trans_to,</if>
|
||||
<if test="transFrom != null and transFrom != ''">trans_from,</if>
|
||||
<if test="transType != null">trans_type,</if>
|
||||
<if test="technician != null and technician != ''">technician,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="comment != null">comment,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="sheepId != null">#{sheepId},</if>
|
||||
<if test="transTo != null and transTo != ''">#{transTo},</if>
|
||||
<if test="transFrom != null and transFrom != ''">#{transFrom},</if>
|
||||
<if test="transType != null">#{transType},</if>
|
||||
<if test="technician != null and technician != ''">#{technician},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="comment != null">#{comment},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateScTransitionInfo" parameterType="ScTransitionInfo">
|
||||
update sc_transition_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="sheepId != null">sheep_id = #{sheepId},</if>
|
||||
<if test="transTo != null and transTo != ''">trans_to = #{transTo},</if>
|
||||
<if test="transFrom != null and transFrom != ''">trans_from = #{transFrom},</if>
|
||||
<if test="transType != null">trans_type = #{transType},</if>
|
||||
<if test="technician != null and technician != ''">technician = #{technician},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="comment != null">comment = #{comment},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteScTransitionInfoById" parameterType="Integer">
|
||||
delete from sc_transition_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteScTransitionInfoByIds" parameterType="String">
|
||||
delete from sc_transition_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -2,7 +2,7 @@
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhyc.module.produce.mapper.ScCastrateMapper">
|
||||
<mapper namespace="com.zhyc.module.produce.other.castrate.mapper.ScCastrateMapper">
|
||||
|
||||
<resultMap type="ScCastrate" id="ScCastrateResult">
|
||||
<result property="id" column="id"/>
|
||||
@ -15,7 +15,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectScCastrateVo">
|
||||
select id, sheep_id, sheepfold, comment, technician, create_by, create_time from sc_castrate
|
||||
select sc.id,
|
||||
sc.sheep_id,
|
||||
sc.sheepfold,
|
||||
sf.sheepfold_name as sheepfoldName,
|
||||
sc.comment,
|
||||
sc.technician,
|
||||
sc.create_by,
|
||||
sc.create_time
|
||||
from sc_castrate sc
|
||||
left join da_sheepfold sf on sc.sheepfold = sf.id
|
||||
</sql>
|
||||
|
||||
<select id="selectScCastrateList" parameterType="ScCastrate" resultMap="ScCastrateResult">
|
||||
@ -24,13 +33,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="sheepId != null and sheepId != ''">and sheep_id like concat('%', #{sheepId}, '%')</if>
|
||||
<if test="sheepfold != null ">and sheepfold like concat('%', #{sheepfold}, '%')</if>
|
||||
<if test="technician != null and technician != ''">and technician like concat('%', #{technician}, '%')</if>
|
||||
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
|
||||
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''">
|
||||
and create_time between #{params.beginCreateTime} and #{params.endCreateTime}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectScCastrateById" parameterType="Long" resultMap="ScCastrateResult">
|
||||
<include refid="selectScCastrateVo"/>
|
||||
where id = #{id}
|
||||
where sc.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertScCastrate" parameterType="ScCastrate" useGeneratedKeys="true" keyProperty="id">
|
||||
@ -67,7 +78,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</update>
|
||||
|
||||
<delete id="deleteScCastrateById" parameterType="Long">
|
||||
delete from sc_castrate where id = #{id}
|
||||
delete
|
||||
from sc_castrate
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteScCastrateByIds" parameterType="String">
|
@ -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.zhyc.module.produce.other.fixHoof.mapper.ScFixHoofMapper">
|
||||
|
||||
<resultMap type="ScFixHoof" id="ScFixHoofResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="sheepId" column="sheep_id" />
|
||||
<result property="sheepfold" column="sheepfold" />
|
||||
<result property="comment" column="comment" />
|
||||
<result property="technician" column="technician" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectScFixHoofVo">
|
||||
select id, sheep_id, sheepfold, comment, technician, create_by, create_time from sc_fix_hoof
|
||||
</sql>
|
||||
|
||||
<select id="selectScFixHoofList" parameterType="ScFixHoof" resultMap="ScFixHoofResult">
|
||||
<include refid="selectScFixHoofVo"/>
|
||||
<where>
|
||||
<if test="sheepId != null "> and sheep_id = #{sheepId}</if>
|
||||
<if test="sheepfold != null "> and sheepfold = #{sheepfold}</if>
|
||||
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectScFixHoofById" parameterType="Long" resultMap="ScFixHoofResult">
|
||||
<include refid="selectScFixHoofVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertScFixHoof" parameterType="ScFixHoof" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sc_fix_hoof
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="sheepId != null">sheep_id,</if>
|
||||
<if test="sheepfold != null">sheepfold,</if>
|
||||
<if test="comment != null">comment,</if>
|
||||
<if test="technician != null and technician != ''">technician,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="sheepId != null">#{sheepId},</if>
|
||||
<if test="sheepfold != null">#{sheepfold},</if>
|
||||
<if test="comment != null">#{comment},</if>
|
||||
<if test="technician != null and technician != ''">#{technician},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateScFixHoof" parameterType="ScFixHoof">
|
||||
update sc_fix_hoof
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="sheepId != null">sheep_id = #{sheepId},</if>
|
||||
<if test="sheepfold != null">sheepfold = #{sheepfold},</if>
|
||||
<if test="comment != null">comment = #{comment},</if>
|
||||
<if test="technician != null and technician != ''">technician = #{technician},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteScFixHoofById" parameterType="Long">
|
||||
delete from sc_fix_hoof where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteScFixHoofByIds" parameterType="String">
|
||||
delete from sc_fix_hoof where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -2,44 +2,68 @@
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhyc.module.sheep_file.mapper.BasSheepMapper">
|
||||
<mapper namespace="com.zhyc.module.sheep_file.mapper.SheepFileMapper">
|
||||
|
||||
<resultMap type="BasSheep" id="BasSheepResult">
|
||||
<resultMap type="SheepFile" id="SheepFileResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="manageTags" column="manage_tags" />
|
||||
<result property="bsManageTags" column="bs_manage_tags" />
|
||||
<result property="ranchId" column="ranch_id" />
|
||||
<result property="drRanch" column="dr_ranch" />
|
||||
<result property="sheepfoldId" column="sheepfold_id" />
|
||||
<result property="sheepfoldName" column="sheepfold_name" />
|
||||
<result property="electronicTags" column="electronic_tags" />
|
||||
<result property="varietyId" column="variety_id" />
|
||||
<result property="variety" column="variety" />
|
||||
<result property="family" column="family" />
|
||||
<result property="typeId" column="type_id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="gender" column="gender" />
|
||||
<result property="birthday" column="birthday" />
|
||||
<result property="birthWeight" column="birth_weight" />
|
||||
<result property="dayAge" column="day_age" />
|
||||
<result property="monthAge" column="month_age" />
|
||||
<result property="parity" column="parity" />
|
||||
<result property="statusId" column="status_id" />
|
||||
<result property="birthWeight" column="birth_weight" />
|
||||
<result property="weaningDate" column="weaning_date" />
|
||||
<result property="statusId" column="status_id" />
|
||||
<result property="weaningWeight" column="weaning_weight" />
|
||||
<result property="currentWeight" column="current_weight" />
|
||||
<result property="breedStatusId" column="breed_status_id" />
|
||||
<result property="fatherId" column="father_id" />
|
||||
<result property="motherId" column="mother_id" />
|
||||
<result property="breed" column="breed" />
|
||||
<result property="bsFatherId" column="bs_father_id" />
|
||||
<result property="fatherManageTags" column="father_manage_tags" />
|
||||
<result property="bsMotherId" column="bs_mother_id" />
|
||||
<result property="motherManageTags" column="mother_manage_tags" />
|
||||
<result property="receptorId" column="receptor_id" />
|
||||
<result property="receptorManageTags" column="receptor_manage_tags" />
|
||||
<result property="fatherFatherId" column="father_father_id" />
|
||||
<result property="grandfatherManageTags" column="grandfather_manage_tags" />
|
||||
<result property="fatherMotherId" column="father_mother_id" />
|
||||
<result property="grandmotherManageTags" column="grandmother_manage_tags" />
|
||||
<result property="fatherId" column="father_id" />
|
||||
<result property="maternalGrandfatherManageTags" column="maternal_grandfather_manage_tags" />
|
||||
<result property="motherId" column="mother_id" />
|
||||
<result property="maternalGrandmotherManageTags" column="maternal_grandmother_manage_tags" />
|
||||
<result property="matingDate" column="mating_date" />
|
||||
<result property="matingTypeId" column="mating_type_id" />
|
||||
<result property="pregDate" column="preg_date" />
|
||||
<result property="lambingDate" column="lambing_date" />
|
||||
<result property="lambingDay" column="lambing_day" />
|
||||
<result property="matingDay" column="mating_day" />
|
||||
<result property="gestationDay" column="gestation_day" />
|
||||
<result property="expectedDate" column="expected_date" />
|
||||
<result property="controlled" column="controlled" />
|
||||
<result property="postLambingDay" column="post_lambing_day" />
|
||||
<result property="lactationDay" column="lactation_day" />
|
||||
<result property="anestrousDay" column="anestrous_day" />
|
||||
<result property="matingCounts" column="mating_counts" />
|
||||
<result property="matingTotal" column="mating_total" />
|
||||
<result property="miscarriageCounts" column="miscarriage_counts" />
|
||||
<result property="comment" column="comment" />
|
||||
<result property="controlled" column="controlled" />
|
||||
<result property="body" column="body" />
|
||||
<result property="breast" column="breast" />
|
||||
<result property="source" column="source" />
|
||||
<result property="soureDate" column="soure_date" />
|
||||
<result property="sourceDate" column="source_date" />
|
||||
<result property="sourceRanchId" column="source_ranch_id" />
|
||||
<result property="comment" column="comment" />
|
||||
<result property="sourceRanch" column="source_ranch" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
@ -47,93 +71,92 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="isDelete" column="is_delete" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasSheepVo">
|
||||
select id, manage_tags, ranch_id, sheepfold_id, electronic_tags, variety_id, family, type_id, gender, birthday, birth_weight, parity, status_id, weaning_date, weaning_weight, breed_status_id, father_id, mother_id, receptor_id, mating_date, mating_type_id, preg_date, lambing_date, lambing_day, expected_date, controlled, mating_counts, mating_total, miscarriage_counts, body, breast, source, soure_date, source_ranch_id, comment, update_by, update_time, create_by, create_time, is_delete from bas_sheep
|
||||
<sql id="selectSheepFileVo">
|
||||
select id, bs_manage_tags, ranch_id, dr_ranch, sheepfold_id, sheepfold_name, electronic_tags, variety_id, variety, family, name, gender, birthday, day_age, month_age, parity, birth_weight, weaning_date, status_id, weaning_weight, current_weight, breed_status_id, breed, bs_father_id, father_manage_tags, bs_mother_id, mother_manage_tags, receptor_id, receptor_manage_tags, father_father_id, grandfather_manage_tags, father_mother_id, grandmother_manage_tags, father_id, maternal_grandfather_manage_tags, mother_id, maternal_grandmother_manage_tags, mating_date, mating_type_id, preg_date, lambing_date, lambing_day, mating_day, gestation_day, expected_date, post_lambing_day, lactation_day, anestrous_day, mating_counts, mating_total, miscarriage_counts, comment, controlled, body, breast, source, source_date, source_ranch_id, source_ranch, update_by, update_time, create_by, create_time, is_delete from sheep_file
|
||||
</sql>
|
||||
|
||||
<select id="selectBasSheepList" parameterType="BasSheep" resultMap="BasSheepResult">
|
||||
<include refid="selectBasSheepVo"/>
|
||||
<select id="selectSheepFileList" parameterType="SheepFile" resultMap="SheepFileResult">
|
||||
<include refid="selectSheepFileVo"/>
|
||||
<where>
|
||||
<if test="manageTags != null and manageTags != ''"> and manage_tags = #{manageTags}</if>
|
||||
<if test="ranchId != null "> and ranch_id = #{ranchId}</if>
|
||||
<if test="sheepfoldId != null "> and sheepfold_id = #{sheepfoldId}</if>
|
||||
<if test="id != null "> and id = #{id}</if>
|
||||
<if test="bsManageTags != null and bsManageTags != ''"> and bs_manage_tags = #{bsManageTags}</if>
|
||||
<if test="drRanch != null and drRanch != ''"> and dr_ranch = #{drRanch}</if>
|
||||
<if test="electronicTags != null and electronicTags != ''"> and electronic_tags = #{electronicTags}</if>
|
||||
<if test="varietyId != null "> and variety_id = #{varietyId}</if>
|
||||
<if test="family != null and family != ''"> and family = #{family}</if>
|
||||
<if test="typeId != null "> and type_id = #{typeId}</if>
|
||||
<if test="variety != null and variety != ''"> and variety = #{variety}</if>
|
||||
<if test="name != null and name != ''"> and name = #{name}</if>
|
||||
<if test="gender != null "> and gender = #{gender}</if>
|
||||
<if test="birthday != null "> and birthday = #{birthday}</if>
|
||||
<if test="birthWeight != null "> and birth_weight = #{birthWeight}</if>
|
||||
<if test="parity != null "> and parity = #{parity}</if>
|
||||
<if test="statusId != null "> and status_id = #{statusId}</if>
|
||||
<if test="weaningDate != null "> and weaning_date = #{weaningDate}</if>
|
||||
<if test="weaningWeight != null "> and weaning_weight = #{weaningWeight}</if>
|
||||
<if test="breedStatusId != null "> and breed_status_id = #{breedStatusId}</if>
|
||||
<if test="fatherId != null "> and father_id = #{fatherId}</if>
|
||||
<if test="motherId != null "> and mother_id = #{motherId}</if>
|
||||
<if test="receptorId != null "> and receptor_id = #{receptorId}</if>
|
||||
<if test="matingDate != null "> and mating_date = #{matingDate}</if>
|
||||
<if test="matingTypeId != null "> and mating_type_id = #{matingTypeId}</if>
|
||||
<if test="pregDate != null "> and preg_date = #{pregDate}</if>
|
||||
<if test="lambingDate != null "> and lambing_date = #{lambingDate}</if>
|
||||
<if test="lambingDay != null "> and lambing_day = #{lambingDay}</if>
|
||||
<if test="expectedDate != null "> and expected_date = #{expectedDate}</if>
|
||||
<if test="controlled != null "> and controlled = #{controlled}</if>
|
||||
<if test="matingCounts != null "> and mating_counts = #{matingCounts}</if>
|
||||
<if test="matingTotal != null "> and mating_total = #{matingTotal}</if>
|
||||
<if test="miscarriageCounts != null "> and miscarriage_counts = #{miscarriageCounts}</if>
|
||||
<if test="body != null "> and body = #{body}</if>
|
||||
<if test="breast != null "> and breast = #{breast}</if>
|
||||
<if test="source != null and source != ''"> and source = #{source}</if>
|
||||
<if test="soureDate != null "> and soure_date = #{soureDate}</if>
|
||||
<if test="sourceRanchId != null "> and source_ranch_id = #{sourceRanchId}</if>
|
||||
<if test="comment != null and comment != ''"> and comment = #{comment}</if>
|
||||
<if test="isDelete != null "> and is_delete = #{isDelete}</if>
|
||||
<if test="breed != null and breed != ''"> and breed = #{breed}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBasSheepById" parameterType="Long" resultMap="BasSheepResult">
|
||||
<include refid="selectBasSheepVo"/>
|
||||
<select id="selectSheepFileById" parameterType="Long" resultMap="SheepFileResult">
|
||||
<include refid="selectSheepFileVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBasSheep" parameterType="BasSheep" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into bas_sheep
|
||||
<insert id="insertSheepFile" parameterType="SheepFile">
|
||||
insert into sheep_file
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="manageTags != null">manage_tags,</if>
|
||||
<if test="id != null">id,</if>
|
||||
<if test="bsManageTags != null">bs_manage_tags,</if>
|
||||
<if test="ranchId != null">ranch_id,</if>
|
||||
<if test="drRanch != null">dr_ranch,</if>
|
||||
<if test="sheepfoldId != null">sheepfold_id,</if>
|
||||
<if test="sheepfoldName != null">sheepfold_name,</if>
|
||||
<if test="electronicTags != null">electronic_tags,</if>
|
||||
<if test="varietyId != null">variety_id,</if>
|
||||
<if test="variety != null">variety,</if>
|
||||
<if test="family != null">family,</if>
|
||||
<if test="typeId != null">type_id,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="gender != null">gender,</if>
|
||||
<if test="birthday != null">birthday,</if>
|
||||
<if test="birthWeight != null">birth_weight,</if>
|
||||
<if test="dayAge != null">day_age,</if>
|
||||
<if test="monthAge != null">month_age,</if>
|
||||
<if test="parity != null">parity,</if>
|
||||
<if test="statusId != null">status_id,</if>
|
||||
<if test="birthWeight != null">birth_weight,</if>
|
||||
<if test="weaningDate != null">weaning_date,</if>
|
||||
<if test="statusId != null">status_id,</if>
|
||||
<if test="weaningWeight != null">weaning_weight,</if>
|
||||
<if test="currentWeight != null">current_weight,</if>
|
||||
<if test="breedStatusId != null">breed_status_id,</if>
|
||||
<if test="fatherId != null">father_id,</if>
|
||||
<if test="motherId != null">mother_id,</if>
|
||||
<if test="breed != null">breed,</if>
|
||||
<if test="bsFatherId != null">bs_father_id,</if>
|
||||
<if test="fatherManageTags != null">father_manage_tags,</if>
|
||||
<if test="bsMotherId != null">bs_mother_id,</if>
|
||||
<if test="motherManageTags != null">mother_manage_tags,</if>
|
||||
<if test="receptorId != null">receptor_id,</if>
|
||||
<if test="receptorManageTags != null">receptor_manage_tags,</if>
|
||||
<if test="fatherFatherId != null">father_father_id,</if>
|
||||
<if test="grandfatherManageTags != null">grandfather_manage_tags,</if>
|
||||
<if test="fatherMotherId != null">father_mother_id,</if>
|
||||
<if test="grandmotherManageTags != null">grandmother_manage_tags,</if>
|
||||
<if test="fatherId != null">father_id,</if>
|
||||
<if test="maternalGrandfatherManageTags != null">maternal_grandfather_manage_tags,</if>
|
||||
<if test="motherId != null">mother_id,</if>
|
||||
<if test="maternalGrandmotherManageTags != null">maternal_grandmother_manage_tags,</if>
|
||||
<if test="matingDate != null">mating_date,</if>
|
||||
<if test="matingTypeId != null">mating_type_id,</if>
|
||||
<if test="pregDate != null">preg_date,</if>
|
||||
<if test="lambingDate != null">lambing_date,</if>
|
||||
<if test="lambingDay != null">lambing_day,</if>
|
||||
<if test="matingDay != null">mating_day,</if>
|
||||
<if test="gestationDay != null">gestation_day,</if>
|
||||
<if test="expectedDate != null">expected_date,</if>
|
||||
<if test="controlled != null">controlled,</if>
|
||||
<if test="postLambingDay != null">post_lambing_day,</if>
|
||||
<if test="lactationDay != null">lactation_day,</if>
|
||||
<if test="anestrousDay != null">anestrous_day,</if>
|
||||
<if test="matingCounts != null">mating_counts,</if>
|
||||
<if test="matingTotal != null">mating_total,</if>
|
||||
<if test="miscarriageCounts != null">miscarriage_counts,</if>
|
||||
<if test="comment != null">comment,</if>
|
||||
<if test="controlled != null">controlled,</if>
|
||||
<if test="body != null">body,</if>
|
||||
<if test="breast != null">breast,</if>
|
||||
<if test="source != null">source,</if>
|
||||
<if test="soureDate != null">soure_date,</if>
|
||||
<if test="sourceDate != null">source_date,</if>
|
||||
<if test="sourceRanchId != null">source_ranch_id,</if>
|
||||
<if test="comment != null">comment,</if>
|
||||
<if test="sourceRanch != null">source_ranch,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
@ -141,40 +164,65 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="isDelete != null">is_delete,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="manageTags != null">#{manageTags},</if>
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="bsManageTags != null">#{bsManageTags},</if>
|
||||
<if test="ranchId != null">#{ranchId},</if>
|
||||
<if test="drRanch != null">#{drRanch},</if>
|
||||
<if test="sheepfoldId != null">#{sheepfoldId},</if>
|
||||
<if test="sheepfoldName != null">#{sheepfoldName},</if>
|
||||
<if test="electronicTags != null">#{electronicTags},</if>
|
||||
<if test="varietyId != null">#{varietyId},</if>
|
||||
<if test="variety != null">#{variety},</if>
|
||||
<if test="family != null">#{family},</if>
|
||||
<if test="typeId != null">#{typeId},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="gender != null">#{gender},</if>
|
||||
<if test="birthday != null">#{birthday},</if>
|
||||
<if test="birthWeight != null">#{birthWeight},</if>
|
||||
<if test="dayAge != null">#{dayAge},</if>
|
||||
<if test="monthAge != null">#{monthAge},</if>
|
||||
<if test="parity != null">#{parity},</if>
|
||||
<if test="statusId != null">#{statusId},</if>
|
||||
<if test="birthWeight != null">#{birthWeight},</if>
|
||||
<if test="weaningDate != null">#{weaningDate},</if>
|
||||
<if test="statusId != null">#{statusId},</if>
|
||||
<if test="weaningWeight != null">#{weaningWeight},</if>
|
||||
<if test="currentWeight != null">#{currentWeight},</if>
|
||||
<if test="breedStatusId != null">#{breedStatusId},</if>
|
||||
<if test="fatherId != null">#{fatherId},</if>
|
||||
<if test="motherId != null">#{motherId},</if>
|
||||
<if test="breed != null">#{breed},</if>
|
||||
<if test="bsFatherId != null">#{bsFatherId},</if>
|
||||
<if test="fatherManageTags != null">#{fatherManageTags},</if>
|
||||
<if test="bsMotherId != null">#{bsMotherId},</if>
|
||||
<if test="motherManageTags != null">#{motherManageTags},</if>
|
||||
<if test="receptorId != null">#{receptorId},</if>
|
||||
<if test="receptorManageTags != null">#{receptorManageTags},</if>
|
||||
<if test="fatherFatherId != null">#{fatherFatherId},</if>
|
||||
<if test="grandfatherManageTags != null">#{grandfatherManageTags},</if>
|
||||
<if test="fatherMotherId != null">#{fatherMotherId},</if>
|
||||
<if test="grandmotherManageTags != null">#{grandmotherManageTags},</if>
|
||||
<if test="fatherId != null">#{fatherId},</if>
|
||||
<if test="maternalGrandfatherManageTags != null">#{maternalGrandfatherManageTags},</if>
|
||||
<if test="motherId != null">#{motherId},</if>
|
||||
<if test="maternalGrandmotherManageTags != null">#{maternalGrandmotherManageTags},</if>
|
||||
<if test="matingDate != null">#{matingDate},</if>
|
||||
<if test="matingTypeId != null">#{matingTypeId},</if>
|
||||
<if test="pregDate != null">#{pregDate},</if>
|
||||
<if test="lambingDate != null">#{lambingDate},</if>
|
||||
<if test="lambingDay != null">#{lambingDay},</if>
|
||||
<if test="matingDay != null">#{matingDay},</if>
|
||||
<if test="gestationDay != null">#{gestationDay},</if>
|
||||
<if test="expectedDate != null">#{expectedDate},</if>
|
||||
<if test="controlled != null">#{controlled},</if>
|
||||
<if test="postLambingDay != null">#{postLambingDay},</if>
|
||||
<if test="lactationDay != null">#{lactationDay},</if>
|
||||
<if test="anestrousDay != null">#{anestrousDay},</if>
|
||||
<if test="matingCounts != null">#{matingCounts},</if>
|
||||
<if test="matingTotal != null">#{matingTotal},</if>
|
||||
<if test="miscarriageCounts != null">#{miscarriageCounts},</if>
|
||||
<if test="comment != null">#{comment},</if>
|
||||
<if test="controlled != null">#{controlled},</if>
|
||||
<if test="body != null">#{body},</if>
|
||||
<if test="breast != null">#{breast},</if>
|
||||
<if test="source != null">#{source},</if>
|
||||
<if test="soureDate != null">#{soureDate},</if>
|
||||
<if test="sourceDate != null">#{sourceDate},</if>
|
||||
<if test="sourceRanchId != null">#{sourceRanchId},</if>
|
||||
<if test="comment != null">#{comment},</if>
|
||||
<if test="sourceRanch != null">#{sourceRanch},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
@ -183,43 +231,67 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBasSheep" parameterType="BasSheep">
|
||||
update bas_sheep
|
||||
<update id="updateSheepFile" parameterType="SheepFile">
|
||||
update sheep_file
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="manageTags != null">manage_tags = #{manageTags},</if>
|
||||
<if test="bsManageTags != null">bs_manage_tags = #{bsManageTags},</if>
|
||||
<if test="ranchId != null">ranch_id = #{ranchId},</if>
|
||||
<if test="drRanch != null">dr_ranch = #{drRanch},</if>
|
||||
<if test="sheepfoldId != null">sheepfold_id = #{sheepfoldId},</if>
|
||||
<if test="sheepfoldName != null">sheepfold_name = #{sheepfoldName},</if>
|
||||
<if test="electronicTags != null">electronic_tags = #{electronicTags},</if>
|
||||
<if test="varietyId != null">variety_id = #{varietyId},</if>
|
||||
<if test="variety != null">variety = #{variety},</if>
|
||||
<if test="family != null">family = #{family},</if>
|
||||
<if test="typeId != null">type_id = #{typeId},</if>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="gender != null">gender = #{gender},</if>
|
||||
<if test="birthday != null">birthday = #{birthday},</if>
|
||||
<if test="birthWeight != null">birth_weight = #{birthWeight},</if>
|
||||
<if test="dayAge != null">day_age = #{dayAge},</if>
|
||||
<if test="monthAge != null">month_age = #{monthAge},</if>
|
||||
<if test="parity != null">parity = #{parity},</if>
|
||||
<if test="statusId != null">status_id = #{statusId},</if>
|
||||
<if test="birthWeight != null">birth_weight = #{birthWeight},</if>
|
||||
<if test="weaningDate != null">weaning_date = #{weaningDate},</if>
|
||||
<if test="statusId != null">status_id = #{statusId},</if>
|
||||
<if test="weaningWeight != null">weaning_weight = #{weaningWeight},</if>
|
||||
<if test="currentWeight != null">current_weight = #{currentWeight},</if>
|
||||
<if test="breedStatusId != null">breed_status_id = #{breedStatusId},</if>
|
||||
<if test="fatherId != null">father_id = #{fatherId},</if>
|
||||
<if test="motherId != null">mother_id = #{motherId},</if>
|
||||
<if test="breed != null">breed = #{breed},</if>
|
||||
<if test="bsFatherId != null">bs_father_id = #{bsFatherId},</if>
|
||||
<if test="fatherManageTags != null">father_manage_tags = #{fatherManageTags},</if>
|
||||
<if test="bsMotherId != null">bs_mother_id = #{bsMotherId},</if>
|
||||
<if test="motherManageTags != null">mother_manage_tags = #{motherManageTags},</if>
|
||||
<if test="receptorId != null">receptor_id = #{receptorId},</if>
|
||||
<if test="receptorManageTags != null">receptor_manage_tags = #{receptorManageTags},</if>
|
||||
<if test="fatherFatherId != null">father_father_id = #{fatherFatherId},</if>
|
||||
<if test="grandfatherManageTags != null">grandfather_manage_tags = #{grandfatherManageTags},</if>
|
||||
<if test="fatherMotherId != null">father_mother_id = #{fatherMotherId},</if>
|
||||
<if test="grandmotherManageTags != null">grandmother_manage_tags = #{grandmotherManageTags},</if>
|
||||
<if test="fatherId != null">father_id = #{fatherId},</if>
|
||||
<if test="maternalGrandfatherManageTags != null">maternal_grandfather_manage_tags = #{maternalGrandfatherManageTags},</if>
|
||||
<if test="motherId != null">mother_id = #{motherId},</if>
|
||||
<if test="maternalGrandmotherManageTags != null">maternal_grandmother_manage_tags = #{maternalGrandmotherManageTags},</if>
|
||||
<if test="matingDate != null">mating_date = #{matingDate},</if>
|
||||
<if test="matingTypeId != null">mating_type_id = #{matingTypeId},</if>
|
||||
<if test="pregDate != null">preg_date = #{pregDate},</if>
|
||||
<if test="lambingDate != null">lambing_date = #{lambingDate},</if>
|
||||
<if test="lambingDay != null">lambing_day = #{lambingDay},</if>
|
||||
<if test="matingDay != null">mating_day = #{matingDay},</if>
|
||||
<if test="gestationDay != null">gestation_day = #{gestationDay},</if>
|
||||
<if test="expectedDate != null">expected_date = #{expectedDate},</if>
|
||||
<if test="controlled != null">controlled = #{controlled},</if>
|
||||
<if test="postLambingDay != null">post_lambing_day = #{postLambingDay},</if>
|
||||
<if test="lactationDay != null">lactation_day = #{lactationDay},</if>
|
||||
<if test="anestrousDay != null">anestrous_day = #{anestrousDay},</if>
|
||||
<if test="matingCounts != null">mating_counts = #{matingCounts},</if>
|
||||
<if test="matingTotal != null">mating_total = #{matingTotal},</if>
|
||||
<if test="miscarriageCounts != null">miscarriage_counts = #{miscarriageCounts},</if>
|
||||
<if test="comment != null">comment = #{comment},</if>
|
||||
<if test="controlled != null">controlled = #{controlled},</if>
|
||||
<if test="body != null">body = #{body},</if>
|
||||
<if test="breast != null">breast = #{breast},</if>
|
||||
<if test="source != null">source = #{source},</if>
|
||||
<if test="soureDate != null">soure_date = #{soureDate},</if>
|
||||
<if test="sourceDate != null">source_date = #{sourceDate},</if>
|
||||
<if test="sourceRanchId != null">source_ranch_id = #{sourceRanchId},</if>
|
||||
<if test="comment != null">comment = #{comment},</if>
|
||||
<if test="sourceRanch != null">source_ranch = #{sourceRanch},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
@ -229,12 +301,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasSheepById" parameterType="Long">
|
||||
delete from bas_sheep where id = #{id}
|
||||
<delete id="deleteSheepFileById" parameterType="Long">
|
||||
delete from sheep_file where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasSheepByIds" parameterType="String">
|
||||
delete from bas_sheep where id in
|
||||
<delete id="deleteSheepFileByIds" parameterType="String">
|
||||
delete from sheep_file where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
Loading…
x
Reference in New Issue
Block a user