Browse Source

Merge branch 'develop' of https://gitee.com/lmlz_0/manage into develop

develop
bobol 12 months ago
parent
commit
11264044c3
  1. 2
      lzbi-common/src/main/java/com/lzbi/common/utils/html/HTMLFilter.java
  2. 14
      lzbi-module/src/main/java/com/lzbi/asset/controller/DcBaseAssetInfoController.java
  3. 22
      lzbi-module/src/main/java/com/lzbi/module/base/BaseModuleEntity.java
  4. 92
      lzbi-module/src/main/java/com/lzbi/special/controller/DcBaseWorkSpecialController.java
  5. 7
      lzbi-module/src/main/java/com/lzbi/special/domain/DcBaseWorkSpecial.java
  6. 22
      lzbi-module/src/main/java/com/lzbi/special/mapper/DcBaseWorkSpecialMapper.java
  7. 38
      lzbi-module/src/main/java/com/lzbi/special/service/DcBaseWorkSpecialService.java
  8. 118
      lzbi-module/src/main/java/com/lzbi/targetFolder/controller/DcBaseAssetTargetController.java
  9. 117
      lzbi-module/src/main/java/com/lzbi/targetFolder/controller/DcBaseTargetModelController.java
  10. 77
      lzbi-module/src/main/java/com/lzbi/targetFolder/domain/DcBaseAssetTargetDao.java
  11. 43
      lzbi-module/src/main/java/com/lzbi/targetFolder/domain/DcBaseTargetModelDao.java
  12. 65
      lzbi-module/src/main/java/com/lzbi/targetFolder/mapper/DcBaseAssetTargetMapper.java
  13. 63
      lzbi-module/src/main/java/com/lzbi/targetFolder/mapper/DcBaseTargetModelMapper.java
  14. 95
      lzbi-module/src/main/java/com/lzbi/targetFolder/service/DcBaseAssetTargetService.java
  15. 92
      lzbi-module/src/main/java/com/lzbi/targetFolder/service/DcBaseTargetModelService.java
  16. 19
      lzbi-module/src/main/resources/mapper/asset/DcBaseWorkSpecialMapper.xml
  17. 143
      lzbi-module/src/main/resources/mapper/targetFolder/DcBaseAssetTargetMapper.xml
  18. 108
      lzbi-module/src/main/resources/mapper/targetFolder/DcBaseTargetModelMapper.xml

2
lzbi-common/src/main/java/com/lzbi/common/utils/html/HTMLFilter.java

@ -106,7 +106,7 @@ public final class HTMLFilter
final ArrayList<String> a_atts = new ArrayList<>(); final ArrayList<String> a_atts = new ArrayList<>();
a_atts.add("href"); a_atts.add("href");
a_atts.add("target"); a_atts.add("targetFolder");
vAllowed.put("a", a_atts); vAllowed.put("a", a_atts);
final ArrayList<String> img_atts = new ArrayList<>(); final ArrayList<String> img_atts = new ArrayList<>();

14
lzbi-module/src/main/java/com/lzbi/asset/controller/DcBaseAssetInfoController.java

@ -30,7 +30,7 @@ import java.util.List;
* @date 2023-11-27 * @date 2023-11-27
*/ */
@RestController @RestController
@RequestMapping("/lzbi/asset_info") @RequestMapping("/lzbi/assetInfo")
public class DcBaseAssetInfoController extends BaseController { public class DcBaseAssetInfoController extends BaseController {
@Autowired @Autowired
private IDcBaseAssetInfoService dcBaseAssetInfoService; private IDcBaseAssetInfoService dcBaseAssetInfoService;
@ -38,7 +38,7 @@ public class DcBaseAssetInfoController extends BaseController {
/** /**
* 查询资产信息列表 * 查询资产信息列表
*/ */
@PreAuthorize("@ss.hasPermi('lzbi:asset_info:list')") @PreAuthorize("@ss.hasPermi('lzbi:assetInfo:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(DcBaseAssetInfo dcBaseAssetInfo) { public TableDataInfo list(DcBaseAssetInfo dcBaseAssetInfo) {
startPage(); startPage();
@ -49,7 +49,7 @@ public class DcBaseAssetInfoController extends BaseController {
/** /**
* 导出资产信息列表 * 导出资产信息列表
*/ */
@PreAuthorize("@ss.hasPermi('lzbi:asset_info:export')") @PreAuthorize("@ss.hasPermi('lzbi:assetInfo:export')")
@Log(title = "资产信息", businessType = BusinessType.EXPORT) @Log(title = "资产信息", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, DcBaseAssetInfo dcBaseAssetInfo) { public void export(HttpServletResponse response, DcBaseAssetInfo dcBaseAssetInfo) {
@ -61,7 +61,7 @@ public class DcBaseAssetInfoController extends BaseController {
/** /**
* 获取资产信息详细信息 * 获取资产信息详细信息
*/ */
@PreAuthorize("@ss.hasPermi('lzbi:asset_info:query')") @PreAuthorize("@ss.hasPermi('lzbi:assetInfo:query')")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) { public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(dcBaseAssetInfoService.selectDcBaseAssetInfoById(id)); return success(dcBaseAssetInfoService.selectDcBaseAssetInfoById(id));
@ -70,7 +70,7 @@ public class DcBaseAssetInfoController extends BaseController {
/** /**
* 新增资产信息 * 新增资产信息
*/ */
@PreAuthorize("@ss.hasPermi('lzbi:asset_info:add')") @PreAuthorize("@ss.hasPermi('lzbi:assetInfo:add')")
@Log(title = "资产信息", businessType = BusinessType.INSERT) @Log(title = "资产信息", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody DcBaseAssetInfo dcBaseAssetInfo) { public AjaxResult add(@RequestBody DcBaseAssetInfo dcBaseAssetInfo) {
@ -80,7 +80,7 @@ public class DcBaseAssetInfoController extends BaseController {
/** /**
* 修改资产信息 * 修改资产信息
*/ */
@PreAuthorize("@ss.hasPermi('lzbi:asset_info:edit')") @PreAuthorize("@ss.hasPermi('lzbi:assetInfo:edit')")
@Log(title = "资产信息", businessType = BusinessType.UPDATE) @Log(title = "资产信息", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody DcBaseAssetInfo dcBaseAssetInfo) { public AjaxResult edit(@RequestBody DcBaseAssetInfo dcBaseAssetInfo) {
@ -90,7 +90,7 @@ public class DcBaseAssetInfoController extends BaseController {
/** /**
* 删除资产信息 * 删除资产信息
*/ */
@PreAuthorize("@ss.hasPermi('lzbi:asset_info:remove')") @PreAuthorize("@ss.hasPermi('lzbi:assetInfo:remove')")
@Log(title = "资产信息", businessType = BusinessType.DELETE) @Log(title = "资产信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) { public AjaxResult remove(@PathVariable Long[] ids) {

22
lzbi-module/src/main/java/com/lzbi/module/base/BaseModuleEntity.java

@ -36,6 +36,12 @@ public class BaseModuleEntity implements Serializable,Cloneable{
/** 删除时间 */ /** 删除时间 */
@ApiModelProperty(name = "删除时间",notes = "") @ApiModelProperty(name = "删除时间",notes = "")
private Date deleteTime ; private Date deleteTime ;
/** 部门id */
@ApiModelProperty(name = "部门id",notes = "")
private Long deptId ;
/** 用户id */
@ApiModelProperty(name = "用户id",notes = "")
private Long userId ;
public String getTenantId() { public String getTenantId() {
return tenantId; return tenantId;
@ -100,4 +106,20 @@ public class BaseModuleEntity implements Serializable,Cloneable{
public void setDeleteTime(Date deleteTime) { public void setDeleteTime(Date deleteTime) {
this.deleteTime = deleteTime; this.deleteTime = deleteTime;
} }
public Long getDeptId() {
return deptId;
}
public void setDeptId(Long deptId) {
this.deptId = deptId;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
} }

92
lzbi-module/src/main/java/com/lzbi/special/controller/DcBaseWorkSpecialController.java

@ -1,8 +1,15 @@
package com.lzbi.special.controller; package com.lzbi.special.controller;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.lzbi.common.utils.DateUtils;
import com.lzbi.special.domain.DcBaseWorkSpecial;
import com.lzbi.special.service.DcBaseWorkSpecialService; import com.lzbi.special.service.DcBaseWorkSpecialService;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -18,7 +25,6 @@ import com.lzbi.common.annotation.Log;
import com.lzbi.common.core.controller.BaseController; import com.lzbi.common.core.controller.BaseController;
import com.lzbi.common.core.domain.AjaxResult; import com.lzbi.common.core.domain.AjaxResult;
import com.lzbi.common.enums.BusinessType; import com.lzbi.common.enums.BusinessType;
import com.lzbi.special.domain.DcBaseWorkSpecialDao;
import com.lzbi.common.utils.poi.ExcelUtil; import com.lzbi.common.utils.poi.ExcelUtil;
import com.lzbi.common.core.page.TableDataInfo; import com.lzbi.common.core.page.TableDataInfo;
@ -40,10 +46,10 @@ public class DcBaseWorkSpecialController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('special:specialManager:list')") @PreAuthorize("@ss.hasPermi('special:specialManager:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(DcBaseWorkSpecialDao dcBaseWorkSpecialDao) public TableDataInfo list(DcBaseWorkSpecial dcBaseWorkSpecial)
{ {
startPage(); startPage();
List<DcBaseWorkSpecialDao> list = dcBaseWorkSpecialService.selectDcBaseWorkSpecialDaoList(dcBaseWorkSpecialDao); List<DcBaseWorkSpecial> list = dcBaseWorkSpecialService.selectDcBaseWorkSpecialDaoList(dcBaseWorkSpecial);
return getDataTable(list); return getDataTable(list);
} }
@ -53,10 +59,10 @@ public class DcBaseWorkSpecialController extends BaseController
@PreAuthorize("@ss.hasPermi('special:specialManager:export')") @PreAuthorize("@ss.hasPermi('special:specialManager:export')")
@Log(title = "生产专业管理", businessType = BusinessType.EXPORT) @Log(title = "生产专业管理", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, DcBaseWorkSpecialDao dcBaseWorkSpecialDao) public void export(HttpServletResponse response, DcBaseWorkSpecial dcBaseWorkSpecial)
{ {
List<DcBaseWorkSpecialDao> list = dcBaseWorkSpecialService.selectDcBaseWorkSpecialDaoList(dcBaseWorkSpecialDao); List<DcBaseWorkSpecial> list = dcBaseWorkSpecialService.selectDcBaseWorkSpecialDaoList(dcBaseWorkSpecial);
ExcelUtil<DcBaseWorkSpecialDao> util = new ExcelUtil<DcBaseWorkSpecialDao>(DcBaseWorkSpecialDao.class); ExcelUtil<DcBaseWorkSpecial> util = new ExcelUtil<DcBaseWorkSpecial>(DcBaseWorkSpecial.class);
util.exportExcel(response, list, "生产专业管理数据"); util.exportExcel(response, list, "生产专业管理数据");
} }
@ -67,7 +73,7 @@ public class DcBaseWorkSpecialController extends BaseController
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id)
{ {
return success(dcBaseWorkSpecialService.selectDcBaseWorkSpecialDaoById(id)); return success(dcBaseWorkSpecialService.selectDcBaseWorkSpecialById(id));
} }
/** /**
@ -76,9 +82,9 @@ public class DcBaseWorkSpecialController extends BaseController
@PreAuthorize("@ss.hasPermi('special:specialManager:add')") @PreAuthorize("@ss.hasPermi('special:specialManager:add')")
@Log(title = "生产专业管理", businessType = BusinessType.INSERT) @Log(title = "生产专业管理", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody DcBaseWorkSpecialDao dcBaseWorkSpecialDao) public AjaxResult add(@RequestBody DcBaseWorkSpecial dcBaseWorkSpecial)
{ {
return toAjax(dcBaseWorkSpecialService.insertDcBaseWorkSpecialDao(dcBaseWorkSpecialDao)); return toAjax(dcBaseWorkSpecialService.insertDcBaseWorkSpecial(dcBaseWorkSpecial));
} }
/** /**
@ -87,9 +93,9 @@ public class DcBaseWorkSpecialController extends BaseController
@PreAuthorize("@ss.hasPermi('special:specialManager:edit')") @PreAuthorize("@ss.hasPermi('special:specialManager:edit')")
@Log(title = "生产专业管理", businessType = BusinessType.UPDATE) @Log(title = "生产专业管理", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody DcBaseWorkSpecialDao dcBaseWorkSpecialDao) public AjaxResult edit(@RequestBody DcBaseWorkSpecial dcBaseWorkSpecial)
{ {
return toAjax(dcBaseWorkSpecialService.updateDcBaseWorkSpecialDao(dcBaseWorkSpecialDao)); return toAjax(dcBaseWorkSpecialService.updateDcBaseWorkSpecialDao(dcBaseWorkSpecial));
} }
/** /**
@ -100,7 +106,7 @@ public class DcBaseWorkSpecialController extends BaseController
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids)
{ {
return toAjax(dcBaseWorkSpecialService.deleteDcBaseWorkSpecialDaoByIds(ids)); return toAjax(dcBaseWorkSpecialService.deleteDcBaseWorkSpecialByIds(ids));
} }
@ -109,12 +115,70 @@ public class DcBaseWorkSpecialController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('special:specialManager:list')") @PreAuthorize("@ss.hasPermi('special:specialManager:list')")
@GetMapping("/listNoPage") @GetMapping("/listNoPage")
public AjaxResult listNoPage(DcBaseWorkSpecialDao dcBaseWorkSpecialDao) public AjaxResult listNoPage(DcBaseWorkSpecial dcBaseWorkSpecial)
{ {
List<DcBaseWorkSpecialDao> list = dcBaseWorkSpecialService.selectDcBaseWorkSpecialDaoList(dcBaseWorkSpecialDao); List<DcBaseWorkSpecial> list = dcBaseWorkSpecialService.selectDcBaseWorkSpecialDaoList(dcBaseWorkSpecial);
return AjaxResult.success(list); return AjaxResult.success(list);
} }
/**
* 新增生产专业管理
*/
@PreAuthorize("@ss.hasPermi('special:specialManager:add')")
@Log(title = "生产专业管理", businessType = BusinessType.INSERT)
@PostMapping("/addBatch")
public AjaxResult addBatch(@RequestBody JSONArray jsonArray)
{
if (jsonArray == null) {
throw new IllegalArgumentException("未能接收任何参数!");
}
List<DcBaseWorkSpecial> beanList = new ArrayList<>();
try {
for (int i = 0; i < jsonArray.size(); i++) {
JSONObject beanObject = jsonArray.getJSONObject(i);
// 移除ID属性
beanObject.remove("id");
DcBaseWorkSpecial dcBaseWorkSpecial = JSON.toJavaObject(beanObject, DcBaseWorkSpecial.class);
dcBaseWorkSpecial.setCreatedTime(DateUtils.getNowDate());
dcBaseWorkSpecial.setDeptId(getDeptId());
dcBaseWorkSpecial.setUserId(getUserId());
dcBaseWorkSpecial.setCreatedBy(String.valueOf(getUserId()));
dcBaseWorkSpecial.setCreatedTime(DateUtils.getNowDate());
beanList.add(dcBaseWorkSpecial);
}
} catch (Exception e) {
throw new IllegalArgumentException("解析list对象异常!");
}
return toAjax(dcBaseWorkSpecialService.saveBatch(beanList));
}
/**
* 修改生产专业管理
*/
@PreAuthorize("@ss.hasPermi('special:specialManager:edit')")
@Log(title = "生产专业管理", businessType = BusinessType.UPDATE)
@PutMapping("editBatch")
public AjaxResult editBatch(@RequestBody JSONArray jsonArray)
{
if (jsonArray == null) {
throw new IllegalArgumentException("未能接收任何参数!");
}
List<DcBaseWorkSpecial> dcBaseWorkSpecialList = new ArrayList<>();
try {
for (int i = 0; i < jsonArray.size(); i++) {
JSONObject beanObject = jsonArray.getJSONObject(i);
DcBaseWorkSpecial dcBaseWorkSpecial = JSON.toJavaObject(beanObject, DcBaseWorkSpecial.class);
dcBaseWorkSpecial.setUpdatedBy(String.valueOf(getUserId()));
dcBaseWorkSpecial.setUpdatedTime(DateUtils.getNowDate());
dcBaseWorkSpecialList.add(dcBaseWorkSpecial);
}
} catch (Exception e) {
throw new IllegalArgumentException("解析list对象异常!");
}
return toAjax(dcBaseWorkSpecialService.updateBatchById(dcBaseWorkSpecialList));
}
} }

7
lzbi-module/src/main/java/com/lzbi/special/domain/DcBaseWorkSpecialDao.java → lzbi-module/src/main/java/com/lzbi/special/domain/DcBaseWorkSpecial.java

@ -1,7 +1,9 @@
package com.lzbi.special.domain; package com.lzbi.special.domain;
import java.util.Date; import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import com.lzbi.common.annotation.Excel; import com.lzbi.common.annotation.Excel;
@ -13,7 +15,7 @@ import com.lzbi.module.base.BaseModuleEntity;
* @author win * @author win
* @date 2023-11-28 * @date 2023-11-28
*/ */
public class DcBaseWorkSpecialDao extends BaseModuleEntity public class DcBaseWorkSpecial extends BaseModuleEntity
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -41,6 +43,7 @@ public class DcBaseWorkSpecialDao extends BaseModuleEntity
/** 删除时间 */ /** 删除时间 */
private Date deleteTime; private Date deleteTime;
@TableId(value = "id", type = IdType.AUTO)
/** 主键 */ /** 主键 */
private Long id; private Long id;

22
lzbi-module/src/main/java/com/lzbi/special/mapper/DcBaseWorkSpecialMapper.java

@ -3,7 +3,7 @@ package com.lzbi.special.mapper;
import java.util.List; import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lzbi.special.domain.DcBaseWorkSpecialDao; import com.lzbi.special.domain.DcBaseWorkSpecial;
/** /**
@ -13,7 +13,7 @@ import com.lzbi.special.domain.DcBaseWorkSpecialDao;
* @date 2023-11-28 * @date 2023-11-28
*/ */
public interface DcBaseWorkSpecialMapper extends BaseMapper<DcBaseWorkSpecialDao> public interface DcBaseWorkSpecialMapper extends BaseMapper<DcBaseWorkSpecial>
{ {
/** /**
* 查询生产专业管理 * 查询生产专业管理
@ -21,31 +21,31 @@ public interface DcBaseWorkSpecialMapper extends BaseMapper<DcBaseWorkSpecialDao
* @param id 生产专业管理主键 * @param id 生产专业管理主键
* @return 生产专业管理 * @return 生产专业管理
*/ */
public DcBaseWorkSpecialDao selectDcBaseWorkSpecialDaoById(Long id); public DcBaseWorkSpecial selectDcBaseWorkSpecialById(Long id);
/** /**
* 查询生产专业管理列表 * 查询生产专业管理列表
* *
* @param dcBaseWorkSpecialDao 生产专业管理 * @param dcBaseWorkSpecial 生产专业管理
* @return 生产专业管理集合 * @return 生产专业管理集合
*/ */
public List<DcBaseWorkSpecialDao> selectDcBaseWorkSpecialDaoList(DcBaseWorkSpecialDao dcBaseWorkSpecialDao); public List<DcBaseWorkSpecial> selectDcBaseWorkSpecialList(DcBaseWorkSpecial dcBaseWorkSpecial);
/** /**
* 新增生产专业管理 * 新增生产专业管理
* *
* @param dcBaseWorkSpecialDao 生产专业管理 * @param dcBaseWorkSpecial 生产专业管理
* @return 结果 * @return 结果
*/ */
public int insertDcBaseWorkSpecialDao(DcBaseWorkSpecialDao dcBaseWorkSpecialDao); public int insertDcBaseWorkSpecial(DcBaseWorkSpecial dcBaseWorkSpecial);
/** /**
* 修改生产专业管理 * 修改生产专业管理
* *
* @param dcBaseWorkSpecialDao 生产专业管理 * @param dcBaseWorkSpecial 生产专业管理
* @return 结果 * @return 结果
*/ */
public int updateDcBaseWorkSpecialDao(DcBaseWorkSpecialDao dcBaseWorkSpecialDao); public int updateDcBaseWorkSpecial(DcBaseWorkSpecial dcBaseWorkSpecial);
/** /**
* 删除生产专业管理 * 删除生产专业管理
@ -53,7 +53,7 @@ public interface DcBaseWorkSpecialMapper extends BaseMapper<DcBaseWorkSpecialDao
* @param id 生产专业管理主键 * @param id 生产专业管理主键
* @return 结果 * @return 结果
*/ */
public int deleteDcBaseWorkSpecialDaoById(Long id); public int deleteDcBaseWorkSpecialById(Long id);
/** /**
* 批量删除生产专业管理 * 批量删除生产专业管理
@ -61,5 +61,5 @@ public interface DcBaseWorkSpecialMapper extends BaseMapper<DcBaseWorkSpecialDao
* @param ids 需要删除的数据主键集合 * @param ids 需要删除的数据主键集合
* @return 结果 * @return 结果
*/ */
public int deleteDcBaseWorkSpecialDaoByIds(Long[] ids); public int deleteDcBaseWorkSpecialByIds(Long[] ids);
} }

38
lzbi-module/src/main/java/com/lzbi/special/service/DcBaseWorkSpecialService.java

@ -4,7 +4,7 @@ import java.util.List;
import com.lzbi.common.utils.DateUtils; import com.lzbi.common.utils.DateUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.lzbi.special.domain.DcBaseWorkSpecialDao; import com.lzbi.special.domain.DcBaseWorkSpecial;
import com.lzbi.special.mapper.DcBaseWorkSpecialMapper; import com.lzbi.special.mapper.DcBaseWorkSpecialMapper;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@ -15,7 +15,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
* @date 2023-11-28 * @date 2023-11-28
*/ */
@Service @Service
public class DcBaseWorkSpecialService extends ServiceImpl<DcBaseWorkSpecialMapper, DcBaseWorkSpecialDao> implements IService<DcBaseWorkSpecialDao> public class DcBaseWorkSpecialService extends ServiceImpl<DcBaseWorkSpecialMapper, DcBaseWorkSpecial> implements IService<DcBaseWorkSpecial>
{ {
@ -26,47 +26,47 @@ public class DcBaseWorkSpecialService extends ServiceImpl<DcBaseWorkSpecialMappe
* @return 生产专业管理 * @return 生产专业管理
*/ */
public DcBaseWorkSpecialDao selectDcBaseWorkSpecialDaoById(Long id) public DcBaseWorkSpecial selectDcBaseWorkSpecialById(Long id)
{ {
return baseMapper.selectDcBaseWorkSpecialDaoById(id); return baseMapper.selectDcBaseWorkSpecialById(id);
} }
/** /**
* 查询生产专业管理列表 * 查询生产专业管理列表
* *
* @param dcBaseWorkSpecialDao 生产专业管理 * @param dcBaseWorkSpecial 生产专业管理
* @return 生产专业管理 * @return 生产专业管理
*/ */
public List<DcBaseWorkSpecialDao> selectDcBaseWorkSpecialDaoList(DcBaseWorkSpecialDao dcBaseWorkSpecialDao) public List<DcBaseWorkSpecial> selectDcBaseWorkSpecialDaoList(DcBaseWorkSpecial dcBaseWorkSpecial)
{ {
return baseMapper.selectDcBaseWorkSpecialDaoList(dcBaseWorkSpecialDao); return baseMapper.selectDcBaseWorkSpecialList(dcBaseWorkSpecial);
} }
/** /**
* 新增生产专业管理 * 新增生产专业管理
* *
* @param dcBaseWorkSpecialDao 生产专业管理 * @param dcBaseWorkSpecial 生产专业管理
* @return 结果 * @return 结果
*/ */
public int insertDcBaseWorkSpecialDao(DcBaseWorkSpecialDao dcBaseWorkSpecialDao) public int insertDcBaseWorkSpecial(DcBaseWorkSpecial dcBaseWorkSpecial)
{ {
dcBaseWorkSpecialDao.setCreatedTime(DateUtils.getNowDate()); dcBaseWorkSpecial.setCreatedTime(DateUtils.getNowDate());
return baseMapper.insertDcBaseWorkSpecialDao(dcBaseWorkSpecialDao); return baseMapper.insertDcBaseWorkSpecial(dcBaseWorkSpecial);
} }
/** /**
* 修改生产专业管理 * 修改生产专业管理
* *
* @param dcBaseWorkSpecialDao 生产专业管理 * @param dcBaseWorkSpecial 生产专业管理
* @return 结果 * @return 结果
*/ */
public int updateDcBaseWorkSpecialDao(DcBaseWorkSpecialDao dcBaseWorkSpecialDao) public int updateDcBaseWorkSpecialDao(DcBaseWorkSpecial dcBaseWorkSpecial)
{ {
dcBaseWorkSpecialDao.setUpdatedTime(DateUtils.getNowDate()); dcBaseWorkSpecial.setUpdatedTime(DateUtils.getNowDate());
return baseMapper.updateDcBaseWorkSpecialDao(dcBaseWorkSpecialDao); return baseMapper.updateDcBaseWorkSpecial(dcBaseWorkSpecial);
} }
/** /**
@ -76,9 +76,9 @@ public class DcBaseWorkSpecialService extends ServiceImpl<DcBaseWorkSpecialMappe
* @return 结果 * @return 结果
*/ */
public int deleteDcBaseWorkSpecialDaoByIds(Long[] ids) public int deleteDcBaseWorkSpecialByIds(Long[] ids)
{ {
return baseMapper.deleteDcBaseWorkSpecialDaoByIds(ids); return baseMapper.deleteDcBaseWorkSpecialByIds(ids);
} }
/** /**
@ -88,8 +88,8 @@ public class DcBaseWorkSpecialService extends ServiceImpl<DcBaseWorkSpecialMappe
* @return 结果 * @return 结果
*/ */
public int deleteDcBaseWorkSpecialDaoById(Long id) public int deleteDcBaseWorkSpecialById(Long id)
{ {
return baseMapper.deleteDcBaseWorkSpecialDaoById(id); return baseMapper.deleteDcBaseWorkSpecialById(id);
} }
} }

118
lzbi-module/src/main/java/com/lzbi/targetFolder/controller/DcBaseAssetTargetController.java

@ -0,0 +1,118 @@
package com.lzbi.targetFolder.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.lzbi.common.annotation.Log;
import com.lzbi.common.core.controller.BaseController;
import com.lzbi.common.core.domain.AjaxResult;
import com.lzbi.common.enums.BusinessType;
import com.lzbi.targetFolder.domain.DcBaseAssetTargetDao;
import com.lzbi.targetFolder.service.DcBaseAssetTargetService;
import com.lzbi.common.utils.poi.ExcelUtil;
import com.lzbi.common.core.page.TableDataInfo;
/**
* 资产指标配置Controller
*
* @author Lu.JL
* @date 2023-11-30
*/
@RestController
@RequestMapping("/target/target")
public class DcBaseAssetTargetController extends BaseController
{
@Autowired
private DcBaseAssetTargetService dcBaseAssetTargetService;
/**
* 查询资产指标配置列表
*/
@PreAuthorize("@ss.hasPermi('target:target:list')")
@GetMapping("/list")
public TableDataInfo list(DcBaseAssetTargetDao dcBaseAssetTargetDao)
{
startPage();
List<DcBaseAssetTargetDao> list = dcBaseAssetTargetService.selectDcBaseAssetTargetDaoList(dcBaseAssetTargetDao);
return getDataTable(list);
}
/**
* 导出资产指标配置列表
*/
@PreAuthorize("@ss.hasPermi('target:target:export')")
@Log(title = "资产指标配置", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, DcBaseAssetTargetDao dcBaseAssetTargetDao)
{
List<DcBaseAssetTargetDao> list = dcBaseAssetTargetService.selectDcBaseAssetTargetDaoList(dcBaseAssetTargetDao);
ExcelUtil<DcBaseAssetTargetDao> util = new ExcelUtil<DcBaseAssetTargetDao>(DcBaseAssetTargetDao.class);
util.exportExcel(response, list, "资产指标配置数据");
}
/**
* 获取资产指标配置详细信息
*/
@PreAuthorize("@ss.hasPermi('target:target:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(dcBaseAssetTargetService.selectDcBaseAssetTargetDaoById(id));
}
/**
* 新增资产指标配置
*/
@PreAuthorize("@ss.hasPermi('target:target:add')")
@Log(title = "资产指标配置", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody DcBaseAssetTargetDao dcBaseAssetTargetDao)
{
return toAjax(dcBaseAssetTargetService.insertDcBaseAssetTargetDao(dcBaseAssetTargetDao));
}
/**
* 修改资产指标配置
*/
@PreAuthorize("@ss.hasPermi('target:target:edit')")
@Log(title = "资产指标配置", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DcBaseAssetTargetDao dcBaseAssetTargetDao)
{
return toAjax(dcBaseAssetTargetService.updateDcBaseAssetTargetDao(dcBaseAssetTargetDao));
}
/**
* 删除资产指标配置
*/
@PreAuthorize("@ss.hasPermi('target:target:remove')")
@Log(title = "资产指标配置", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(dcBaseAssetTargetService.deleteDcBaseAssetTargetDaoByIds(ids));
}
/**
* 查询资产指标配置列表
*/
@PreAuthorize("@ss.hasPermi('target:target:list')")
@GetMapping("/listNoPage")
public AjaxResult listNoPage(DcBaseAssetTargetDao dcBaseAssetTargetDao)
{
List<DcBaseAssetTargetDao> list = dcBaseAssetTargetService.selectDcBaseAssetTargetDaoList(dcBaseAssetTargetDao);
return AjaxResult.success(list);
}
}

117
lzbi-module/src/main/java/com/lzbi/targetFolder/controller/DcBaseTargetModelController.java

@ -0,0 +1,117 @@
package com.lzbi.targetFolder.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.lzbi.common.annotation.Log;
import com.lzbi.common.core.controller.BaseController;
import com.lzbi.common.core.domain.AjaxResult;
import com.lzbi.common.enums.BusinessType;
import com.lzbi.targetFolder.domain.DcBaseTargetModelDao;
import com.lzbi.targetFolder.service.DcBaseTargetModelService;
import com.lzbi.common.utils.poi.ExcelUtil;
import com.lzbi.common.core.page.TableDataInfo;
/**
* 指标模版配置Controller
*
* @author Lu.JL
* @date 2023-11-29
*/
@RestController
@RequestMapping("/target/targetModel")
public class DcBaseTargetModelController extends BaseController
{
@Autowired
private DcBaseTargetModelService dcBaseTargetModelService;
/**
* 查询指标模版配置列表
*/
@PreAuthorize("@ss.hasPermi('target:targetModel:list')")
@GetMapping("/list")
public TableDataInfo list(DcBaseTargetModelDao dcBaseTargetModelDao)
{
startPage();
List<DcBaseTargetModelDao> list = dcBaseTargetModelService.selectDcBaseTargetModelDaoList(dcBaseTargetModelDao);
return getDataTable(list);
}
/**
* 导出指标模版配置列表
*/
@PreAuthorize("@ss.hasPermi('target:targetModel:export')")
@Log(title = "指标模版配置", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, DcBaseTargetModelDao dcBaseTargetModelDao)
{
List<DcBaseTargetModelDao> list = dcBaseTargetModelService.selectDcBaseTargetModelDaoList(dcBaseTargetModelDao);
ExcelUtil<DcBaseTargetModelDao> util = new ExcelUtil<DcBaseTargetModelDao>(DcBaseTargetModelDao.class);
util.exportExcel(response, list, "指标模版配置数据");
}
/**
* 获取指标模版配置详细信息
*/
@PreAuthorize("@ss.hasPermi('target:targetModel:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(dcBaseTargetModelService.selectDcBaseTargetModelDaoById(id));
}
/**
* 新增指标模版配置
*/
@PreAuthorize("@ss.hasPermi('target:targetModel:add')")
@Log(title = "指标模版配置", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody DcBaseTargetModelDao dcBaseTargetModelDao)
{
return toAjax(dcBaseTargetModelService.insertDcBaseTargetModelDao(dcBaseTargetModelDao));
}
/**
* 修改指标模版配置
*/
@PreAuthorize("@ss.hasPermi('target:targetModel:edit')")
@Log(title = "指标模版配置", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DcBaseTargetModelDao dcBaseTargetModelDao)
{
return toAjax(dcBaseTargetModelService.updateDcBaseTargetModelDao(dcBaseTargetModelDao));
}
/**
* 删除指标模版配置
*/
@PreAuthorize("@ss.hasPermi('target:targetModel:remove')")
@Log(title = "指标模版配置", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(dcBaseTargetModelService.deleteDcBaseTargetModelDaoByIds(ids));
}
/**
* 查询指标模版配置列表
*/
@PreAuthorize("@ss.hasPermi('target:targetModel:list')")
@GetMapping("/listNoPage")
public AjaxResult listNoPage(DcBaseTargetModelDao dcBaseTargetModelDao)
{
List<DcBaseTargetModelDao> list = dcBaseTargetModelService.selectDcBaseTargetModelDaoList(dcBaseTargetModelDao);
return AjaxResult.success(list);
}
}

77
lzbi-module/src/main/java/com/lzbi/targetFolder/domain/DcBaseAssetTargetDao.java

@ -0,0 +1,77 @@
package com.lzbi.targetFolder.domain;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;
import com.lzbi.common.annotation.Excel;
import com.lzbi.module.base.BaseModuleEntity;
/**
* 资产指标配置对象 dc_base_asset_target
*
* @author Lu.JL
* @date 2023-11-30
*/
@Data
public class DcBaseAssetTargetDao extends BaseModuleEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 资产ID */
@Excel(name = "资产ID")
private Long assetId;
/** 指标模型编码 */
@Excel(name = "指标模型编码")
private String targetModelCode;
/** 指标名称 */
@Excel(name = "指标名称")
private String targetName;
/** 指标编码 */
@Excel(name = "指标编码")
private String targetCode;
/** 所属专业 */
@Excel(name = "所属专业")
private String targetField;
/** 上限 */
@Excel(name = "上限")
private BigDecimal limitUp;
/** 下限 */
@Excel(name = "下限")
private BigDecimal limitDown;
/** 值 */
@Excel(name = "值")
private BigDecimal valueBase;
/** 是否均值 */
@Excel(name = "是否均值")
private String flagAvg;
/** 是否汇总 */
@Excel(name = "是否汇总")
private String flagSum;
/** 是否积算 */
@Excel(name = "是否积算")
private String flagCompute;
/** 排序 */
@Excel(name = "排序")
private String sort;
/** 统计单元编码 */
@Excel(name = "统计单元编码")
private String assetCode;
}

43
lzbi-module/src/main/java/com/lzbi/targetFolder/domain/DcBaseTargetModelDao.java

@ -0,0 +1,43 @@
package com.lzbi.targetFolder.domain;
import lombok.Data;
import com.lzbi.common.annotation.Excel;
import com.lzbi.module.base.BaseModuleEntity;
/**
* 指标模版配置对象 dc_base_target_model
*
* @author Lu.JL
* @date 2023-11-29
*/
@Data
public class DcBaseTargetModelDao extends BaseModuleEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 指标模版编码 */
@Excel(name = "指标模版编码")
private String targetModelCode;
/** 指标模版名称 */
@Excel(name = "指标模版名称")
private String targetModelName;
/** 指标类型;计算型,录入型 */
@Excel(name = "指标类型;计算型,录入型")
private String targetModelType;
/** 所属专业 */
@Excel(name = "所属专业")
private String targetModelField;
/** 指标等级 */
@Excel(name = "指标等级")
private Long targetModelLevel;
}

65
lzbi-module/src/main/java/com/lzbi/targetFolder/mapper/DcBaseAssetTargetMapper.java

@ -0,0 +1,65 @@
package com.lzbi.targetFolder.mapper;
import java.util.List;
import com.lzbi.targetFolder.domain.DcBaseAssetTargetDao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* 资产指标配置Mapper接口
*
* @author Lu.JL
* @date 2023-11-30
*/
@Mapper
public interface DcBaseAssetTargetMapper extends BaseMapper<DcBaseAssetTargetDao>
{
/**
* 查询资产指标配置
*
* @param id 资产指标配置主键
* @return 资产指标配置
*/
public DcBaseAssetTargetDao selectDcBaseAssetTargetDaoById(Long id);
/**
* 查询资产指标配置列表
*
* @param dcBaseAssetTargetDao 资产指标配置
* @return 资产指标配置集合
*/
public List<DcBaseAssetTargetDao> selectDcBaseAssetTargetDaoList(DcBaseAssetTargetDao dcBaseAssetTargetDao);
/**
* 新增资产指标配置
*
* @param dcBaseAssetTargetDao 资产指标配置
* @return 结果
*/
public int insertDcBaseAssetTargetDao(DcBaseAssetTargetDao dcBaseAssetTargetDao);
/**
* 修改资产指标配置
*
* @param dcBaseAssetTarget 资产指标配置
* @return 结果
*/
public int updateDcBaseAssetTargetDao(DcBaseAssetTargetDao dcBaseAssetTargetDao);
/**
* 删除资产指标配置
*
* @param id 资产指标配置主键
* @return 结果
*/
public int deleteDcBaseAssetTargetDaoById(Long id);
/**
* 批量删除资产指标配置
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteDcBaseAssetTargetDaoByIds(Long[] ids);
}

63
lzbi-module/src/main/java/com/lzbi/targetFolder/mapper/DcBaseTargetModelMapper.java

@ -0,0 +1,63 @@
package com.lzbi.targetFolder.mapper;
import java.util.List;
import com.lzbi.targetFolder.domain.DcBaseTargetModelDao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* 指标模版配置Mapper接口
*
* @author Lu.JL
* @date 2023-11-29
*/
public interface DcBaseTargetModelMapper extends BaseMapper<DcBaseTargetModelDao>
{
/**
* 查询指标模版配置
*
* @param id 指标模版配置主键
* @return 指标模版配置
*/
public DcBaseTargetModelDao selectDcBaseTargetModelDaoById(Long id);
/**
* 查询指标模版配置列表
*
* @param dcBaseTargetModelDao 指标模版配置
* @return 指标模版配置集合
*/
public List<DcBaseTargetModelDao> selectDcBaseTargetModelDaoList(DcBaseTargetModelDao dcBaseTargetModelDao);
/**
* 新增指标模版配置
*
* @param dcBaseTargetModelDao 指标模版配置
* @return 结果
*/
public int insertDcBaseTargetModelDao(DcBaseTargetModelDao dcBaseTargetModelDao);
/**
* 修改指标模版配置
*
* @param dcBaseTargetModel 指标模版配置
* @return 结果
*/
public int updateDcBaseTargetModelDao(DcBaseTargetModelDao dcBaseTargetModelDao);
/**
* 删除指标模版配置
*
* @param id 指标模版配置主键
* @return 结果
*/
public int deleteDcBaseTargetModelDaoById(Long id);
/**
* 批量删除指标模版配置
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteDcBaseTargetModelDaoByIds(Long[] ids);
}

95
lzbi-module/src/main/java/com/lzbi/targetFolder/service/DcBaseAssetTargetService.java

@ -0,0 +1,95 @@
package com.lzbi.targetFolder.service;
import java.util.List;
import com.lzbi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.lzbi.targetFolder.domain.DcBaseAssetTargetDao;
import com.lzbi.targetFolder.mapper.DcBaseAssetTargetMapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* 资产指标配置Service业务层处理
*
* @author Lu.JL
* @date 2023-11-30
*/
@Service
public class DcBaseAssetTargetService extends ServiceImpl<DcBaseAssetTargetMapper, DcBaseAssetTargetDao> implements IService<DcBaseAssetTargetDao>
{
@Autowired
private DcBaseAssetTargetMapper dcBaseAssetTargetMapper;
/**
* 查询资产指标配置
*
* @param id 资产指标配置主键
* @return 资产指标配置
*/
public DcBaseAssetTargetDao selectDcBaseAssetTargetDaoById(Long id)
{
return dcBaseAssetTargetMapper.selectDcBaseAssetTargetDaoById(id);
}
/**
* 查询资产指标配置列表
*
* @param dcBaseAssetTargetDao 资产指标配置
* @return 资产指标配置
*/
public List<DcBaseAssetTargetDao> selectDcBaseAssetTargetDaoList(DcBaseAssetTargetDao dcBaseAssetTargetDao)
{
return dcBaseAssetTargetMapper.selectDcBaseAssetTargetDaoList(dcBaseAssetTargetDao);
}
/**
* 新增资产指标配置
*
* @param dcBaseAssetTargetDao 资产指标配置
* @return 结果
*/
public int insertDcBaseAssetTargetDao(DcBaseAssetTargetDao dcBaseAssetTargetDao)
{
dcBaseAssetTargetDao.setCreatedTime(DateUtils.getNowDate());
return dcBaseAssetTargetMapper.insertDcBaseAssetTargetDao(dcBaseAssetTargetDao);
}
/**
* 修改资产指标配置
*
* @param dcBaseAssetTargetDao 资产指标配置
* @return 结果
*/
public int updateDcBaseAssetTargetDao(DcBaseAssetTargetDao dcBaseAssetTargetDao)
{
dcBaseAssetTargetDao.setUpdatedTime(DateUtils.getNowDate());
return dcBaseAssetTargetMapper.updateDcBaseAssetTargetDao(dcBaseAssetTargetDao);
}
/**
* 批量删除资产指标配置
*
* @param ids 需要删除的资产指标配置主键
* @return 结果
*/
public int deleteDcBaseAssetTargetDaoByIds(Long[] ids)
{
return dcBaseAssetTargetMapper.deleteDcBaseAssetTargetDaoByIds(ids);
}
/**
* 删除资产指标配置信息
*
* @param id 资产指标配置主键
* @return 结果
*/
public int deleteDcBaseAssetTargetDaoById(Long id)
{
return dcBaseAssetTargetMapper.deleteDcBaseAssetTargetDaoById(id);
}
}

92
lzbi-module/src/main/java/com/lzbi/targetFolder/service/DcBaseTargetModelService.java

@ -0,0 +1,92 @@
package com.lzbi.targetFolder.service;
import java.util.List;
import com.lzbi.common.utils.DateUtils;
import org.springframework.stereotype.Service;
import com.lzbi.targetFolder.domain.DcBaseTargetModelDao;
import com.lzbi.targetFolder.mapper.DcBaseTargetModelMapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* 指标模版配置Service业务层处理
*
* @author Lu.JL
* @date 2023-11-29
*/
@Service
public class DcBaseTargetModelService extends ServiceImpl<DcBaseTargetModelMapper, DcBaseTargetModelDao> implements IService<DcBaseTargetModelDao>
{
/**
* 查询指标模版配置
*
* @param id 指标模版配置主键
* @return 指标模版配置
*/
public DcBaseTargetModelDao selectDcBaseTargetModelDaoById(Long id)
{
return baseMapper.selectDcBaseTargetModelDaoById(id);
}
/**
* 查询指标模版配置列表
*
* @param dcBaseTargetModelDao 指标模版配置
* @return 指标模版配置
*/
public List<DcBaseTargetModelDao> selectDcBaseTargetModelDaoList(DcBaseTargetModelDao dcBaseTargetModelDao)
{
return baseMapper.selectDcBaseTargetModelDaoList(dcBaseTargetModelDao);
}
/**
* 新增指标模版配置
*
* @param dcBaseTargetModelDao 指标模版配置
* @return 结果
*/
public int insertDcBaseTargetModelDao(DcBaseTargetModelDao dcBaseTargetModelDao)
{
dcBaseTargetModelDao.setCreatedTime(DateUtils.getNowDate());
return baseMapper.insertDcBaseTargetModelDao(dcBaseTargetModelDao);
}
/**
* 修改指标模版配置
*
* @param dcBaseTargetModelDao 指标模版配置
* @return 结果
*/
public int updateDcBaseTargetModelDao(DcBaseTargetModelDao dcBaseTargetModelDao)
{
dcBaseTargetModelDao.setUpdatedTime(DateUtils.getNowDate());
return baseMapper.updateDcBaseTargetModelDao(dcBaseTargetModelDao);
}
/**
* 批量删除指标模版配置
*
* @param ids 需要删除的指标模版配置主键
* @return 结果
*/
public int deleteDcBaseTargetModelDaoByIds(Long[] ids)
{
return baseMapper.deleteDcBaseTargetModelDaoByIds(ids);
}
/**
* 删除指标模版配置信息
*
* @param id 指标模版配置主键
* @return 结果
*/
public int deleteDcBaseTargetModelDaoById(Long id)
{
return baseMapper.deleteDcBaseTargetModelDaoById(id);
}
}

19
lzbi-module/src/main/resources/mapper/asset/DcBaseWorkSpecialMapper.xml

@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.lzbi.special.mapper.DcBaseWorkSpecialMapper"> <mapper namespace="com.lzbi.special.mapper.DcBaseWorkSpecialMapper">
<resultMap type="com.lzbi.special.domain.DcBaseWorkSpecialDao" id="DcBaseWorkSpecialResult"> <resultMap type="com.lzbi.special.domain.DcBaseWorkSpecial" id="DcBaseWorkSpecialResult">
<result property="tenantId" column="TENANT_ID" /> <result property="tenantId" column="TENANT_ID" />
<result property="REVISION" column="REVISION" /> <result property="REVISION" column="REVISION" />
<result property="createdBy" column="CREATED_BY" /> <result property="createdBy" column="CREATED_BY" />
@ -22,20 +22,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select TENANT_ID, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, DELETE_BY, DELETE_TIME, id, special_code, special_name from dc_base_work_special select TENANT_ID, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, DELETE_BY, DELETE_TIME, id, special_code, special_name from dc_base_work_special
</sql> </sql>
<select id="selectDcBaseWorkSpecialDaoList" parameterType="DcBaseWorkSpecialDao" resultMap="DcBaseWorkSpecialResult"> <select id="selectDcBaseWorkSpecialList" parameterType="DcBaseWorkSpecial" resultMap="DcBaseWorkSpecialResult">
<include refid="selectDcBaseWorkSpecialVo"/> <include refid="selectDcBaseWorkSpecialVo"/>
<where> <where>
<if test="specialCode != null and specialCode != ''"> and special_code = #{specialCode}</if> <if test="specialCode != null and specialCode != ''"> and special_code = #{specialCode}</if>
<if test="specialName != null and specialName != ''"> and special_name like concat('%', #{specialName}, '%')</if> <if test="specialName != null and specialName != ''"> and special_name like concat('%', #{specialName}, '%')</if>
</where> </where>
ORDER BY
CASE
WHEN updated_time IS NOT NULL AND updated_time > created_time THEN updated_time
ELSE created_time
END DESC
</select> </select>
<select id="selectDcBaseWorkSpecialDaoById" parameterType="Long" resultMap="DcBaseWorkSpecialResult"> <select id="selectDcBaseWorkSpecialById" parameterType="Long" resultMap="DcBaseWorkSpecialResult">
<include refid="selectDcBaseWorkSpecialVo"/> <include refid="selectDcBaseWorkSpecialVo"/>
where id = #{id} where id = #{id}
</select> </select>
<insert id="insertDcBaseWorkSpecialDao" parameterType="DcBaseWorkSpecialDao" useGeneratedKeys="true" keyProperty="id"> <insert id="insertDcBaseWorkSpecial" parameterType="DcBaseWorkSpecial" useGeneratedKeys="true" keyProperty="id">
insert into dc_base_work_special insert into dc_base_work_special
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="tenantId != null">TENANT_ID,</if> <if test="tenantId != null">TENANT_ID,</if>
@ -63,7 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim> </trim>
</insert> </insert>
<update id="updateDcBaseWorkSpecialDao" parameterType="DcBaseWorkSpecialDao"> <update id="updateDcBaseWorkSpecial" parameterType="DcBaseWorkSpecial">
update dc_base_work_special update dc_base_work_special
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="tenantId != null">TENANT_ID = #{tenantId},</if> <if test="tenantId != null">TENANT_ID = #{tenantId},</if>
@ -80,11 +85,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id} where id = #{id}
</update> </update>
<delete id="deleteDcBaseWorkSpecialDaoById" parameterType="Long"> <delete id="deleteDcBaseWorkSpecialById" parameterType="Long">
delete from dc_base_work_special where id = #{id} delete from dc_base_work_special where id = #{id}
</delete> </delete>
<delete id="deleteDcBaseWorkSpecialDaoByIds" parameterType="String"> <delete id="deleteDcBaseWorkSpecialByIds" parameterType="String">
delete from dc_base_work_special where id in delete from dc_base_work_special where id in
<foreach item="id" collection="array" open="(" separator="," close=")"> <foreach item="id" collection="array" open="(" separator="," close=")">
#{id} #{id}

143
lzbi-module/src/main/resources/mapper/targetFolder/DcBaseAssetTargetMapper.xml

@ -0,0 +1,143 @@
<?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.lzbi.targetFolder.mapper.DcBaseAssetTargetMapper">
<resultMap type="com.lzbi.targetFolder.domain.DcBaseAssetTargetDao" id="DcBaseAssetTargetResult">
<result property="id" column="id" />
<result property="assetId" column="asset_id" />
<result property="targetModelCode" column="target_model_code" />
<result property="targetName" column="target_name" />
<result property="targetCode" column="target_code" />
<result property="targetField" column="target_field" />
<result property="limitUp" column="limit_up" />
<result property="limitDown" column="limit_down" />
<result property="valueBase" column="value_base" />
<result property="flagAvg" column="flag_avg" />
<result property="flagSum" column="flag_sum" />
<result property="flagCompute" column="flag_compute" />
<result property="sort" column="sort" />
<result property="tenantId" column="tenant_id" />
<result property="revision" column="revision" />
<result property="createdBy" column="created_by" />
<result property="createdTime" column="created_time" />
<result property="updatedBy" column="updated_by" />
<result property="updatedTime" column="updated_time" />
<result property="deleteBy" column="delete_by" />
<result property="deleteTime" column="delete_time" />
</resultMap>
<sql id="selectDcBaseAssetTargetVo">
select id, asset_id, target_model_code, target_name, target_code, target_field, limit_up, limit_down, value_base, flag_avg, flag_sum, flag_compute, sort, tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time from dc_base_asset_target
</sql>
<select id="selectDcBaseAssetTargetDaoList" parameterType="DcBaseAssetTargetDao" resultMap="DcBaseAssetTargetResult">
<include refid="selectDcBaseAssetTargetVo"/>
<where>
<if test="assetId != null "> and asset_id = #{assetId}</if>
<if test="targetModelCode != null and targetModelCode != ''"> and target_model_code = #{targetModelCode}</if>
<if test="targetName != null and targetName != ''"> and target_name like concat('%', #{targetName}, '%')</if>
<if test="targetCode != null and targetCode != ''"> and target_code = #{targetCode}</if>
<if test="targetField != null and targetField != ''"> and target_field = #{targetField}</if>
<if test="limitUp != null "> and limit_up = #{limitUp}</if>
<if test="limitDown != null "> and limit_down = #{limitDown}</if>
<if test="valueBase != null "> and value_base = #{valueBase}</if>
<if test="flagAvg != null and flagAvg != ''"> and flag_avg = #{flagAvg}</if>
<if test="flagSum != null and flagSum != ''"> and flag_sum = #{flagSum}</if>
<if test="flagCompute != null and flagCompute != ''"> and flag_compute = #{flagCompute}</if>
<if test="sort != null and sort != ''"> and sort = #{sort}</if>
</where>
</select>
<select id="selectDcBaseAssetTargetDaoById" parameterType="Long" resultMap="DcBaseAssetTargetResult">
<include refid="selectDcBaseAssetTargetVo"/>
where id = #{id}
</select>
<insert id="insertDcBaseAssetTargetDao" parameterType="DcBaseAssetTargetDao" useGeneratedKeys="true" keyProperty="id">
insert into dc_base_asset_target
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="assetId != null">asset_id,</if>
<if test="targetModelCode != null">target_model_code,</if>
<if test="targetName != null">target_name,</if>
<if test="targetCode != null">target_code,</if>
<if test="targetField != null">target_field,</if>
<if test="limitUp != null">limit_up,</if>
<if test="limitDown != null">limit_down,</if>
<if test="valueBase != null">value_base,</if>
<if test="flagAvg != null">flag_avg,</if>
<if test="flagSum != null">flag_sum,</if>
<if test="flagCompute != null">flag_compute,</if>
<if test="sort != null">sort,</if>
<if test="tenantId != null">tenant_id,</if>
<if test="revision != null">revision,</if>
<if test="createdBy != null">created_by,</if>
<if test="createdTime != null">created_time,</if>
<if test="updatedBy != null">updated_by,</if>
<if test="updatedTime != null">updated_time,</if>
<if test="deleteBy != null">delete_by,</if>
<if test="deleteTime != null">delete_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="assetId != null">#{assetId},</if>
<if test="targetModelCode != null">#{targetModelCode},</if>
<if test="targetName != null">#{targetName},</if>
<if test="targetCode != null">#{targetCode},</if>
<if test="targetField != null">#{targetField},</if>
<if test="limitUp != null">#{limitUp},</if>
<if test="limitDown != null">#{limitDown},</if>
<if test="valueBase != null">#{valueBase},</if>
<if test="flagAvg != null">#{flagAvg},</if>
<if test="flagSum != null">#{flagSum},</if>
<if test="flagCompute != null">#{flagCompute},</if>
<if test="sort != null">#{sort},</if>
<if test="tenantId != null">#{tenantId},</if>
<if test="revision != null">#{revision},</if>
<if test="createdBy != null">#{createdBy},</if>
<if test="createdTime != null">#{createdTime},</if>
<if test="updatedBy != null">#{updatedBy},</if>
<if test="updatedTime != null">#{updatedTime},</if>
<if test="deleteBy != null">#{deleteBy},</if>
<if test="deleteTime != null">#{deleteTime},</if>
</trim>
</insert>
<update id="updateDcBaseAssetTargetDao" parameterType="DcBaseAssetTargetDao">
update dc_base_asset_target
<trim prefix="SET" suffixOverrides=",">
<if test="assetId != null">asset_id = #{assetId},</if>
<if test="targetModelCode != null">target_model_code = #{targetModelCode},</if>
<if test="targetName != null">target_name = #{targetName},</if>
<if test="targetCode != null">target_code = #{targetCode},</if>
<if test="targetField != null">target_field = #{targetField},</if>
<if test="limitUp != null">limit_up = #{limitUp},</if>
<if test="limitDown != null">limit_down = #{limitDown},</if>
<if test="valueBase != null">value_base = #{valueBase},</if>
<if test="flagAvg != null">flag_avg = #{flagAvg},</if>
<if test="flagSum != null">flag_sum = #{flagSum},</if>
<if test="flagCompute != null">flag_compute = #{flagCompute},</if>
<if test="sort != null">sort = #{sort},</if>
<if test="tenantId != null">tenant_id = #{tenantId},</if>
<if test="revision != null">revision = #{revision},</if>
<if test="createdBy != null">created_by = #{createdBy},</if>
<if test="createdTime != null">created_time = #{createdTime},</if>
<if test="updatedBy != null">updated_by = #{updatedBy},</if>
<if test="updatedTime != null">updated_time = #{updatedTime},</if>
<if test="deleteBy != null">delete_by = #{deleteBy},</if>
<if test="deleteTime != null">delete_time = #{deleteTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteDcBaseAssetTargetDaoById" parameterType="Long">
delete from dc_base_asset_target where id = #{id}
</delete>
<delete id="deleteDcBaseAssetTargetDaoByIds" parameterType="String">
delete from dc_base_asset_target where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

108
lzbi-module/src/main/resources/mapper/targetFolder/DcBaseTargetModelMapper.xml

@ -0,0 +1,108 @@
<?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.lzbi.targetFolder.mapper.DcBaseTargetModelMapper">
<resultMap type="com.lzbi.targetFolder.domain.DcBaseTargetModelDao" id="DcBaseTargetModelResult">
<result property="id" column="id" />
<result property="targetModelCode" column="target_model_code" />
<result property="targetModelName" column="target_model_name" />
<result property="targetModelType" column="target_model_type" />
<result property="targetModelField" column="target_model_field" />
<result property="targetModelLevel" column="target_model_level" />
<result property="tenantId" column="tenant_id" />
<result property="revision" column="revision" />
<result property="createdBy" column="created_by" />
<result property="createdTime" column="created_time" />
<result property="updatedBy" column="updated_by" />
<result property="updatedTime" column="updated_time" />
<result property="deleteBy" column="delete_by" />
<result property="deleteTime" column="delete_time" />
</resultMap>
<sql id="selectDcBaseTargetModelVo">
select id, target_model_code, target_model_name, target_model_type, target_model_field, target_model_level, tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time from dc_base_target_model
</sql>
<select id="selectDcBaseTargetModelDaoList" parameterType="DcBaseTargetModelDao" resultMap="DcBaseTargetModelResult">
<include refid="selectDcBaseTargetModelVo"/>
<where>
<if test="targetModelCode != null and targetModelCode != ''"> and target_model_code = #{targetModelCode}</if>
<if test="targetModelName != null and targetModelName != ''"> and target_model_name like concat('%', #{targetModelName}, '%')</if>
<if test="targetModelType != null and targetModelType != ''"> and target_model_type = #{targetModelType}</if>
<if test="targetModelField != null and targetModelField != ''"> and target_model_field = #{targetModelField}</if>
<if test="targetModelLevel != null "> and target_model_level = #{targetModelLevel}</if>
</where>
</select>
<select id="selectDcBaseTargetModelDaoById" parameterType="Long" resultMap="DcBaseTargetModelResult">
<include refid="selectDcBaseTargetModelVo"/>
where id = #{id}
</select>
<insert id="insertDcBaseTargetModelDao" parameterType="DcBaseTargetModelDao" useGeneratedKeys="true" keyProperty="id">
insert into dc_base_target_model
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="targetModelCode != null">target_model_code,</if>
<if test="targetModelName != null">target_model_name,</if>
<if test="targetModelType != null">target_model_type,</if>
<if test="targetModelField != null">target_model_field,</if>
<if test="targetModelLevel != null">target_model_level,</if>
<if test="tenantId != null">tenant_id,</if>
<if test="revision != null">revision,</if>
<if test="createdBy != null">created_by,</if>
<if test="createdTime != null">created_time,</if>
<if test="updatedBy != null">updated_by,</if>
<if test="updatedTime != null">updated_time,</if>
<if test="deleteBy != null">delete_by,</if>
<if test="deleteTime != null">delete_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="targetModelCode != null">#{targetModelCode},</if>
<if test="targetModelName != null">#{targetModelName},</if>
<if test="targetModelType != null">#{targetModelType},</if>
<if test="targetModelField != null">#{targetModelField},</if>
<if test="targetModelLevel != null">#{targetModelLevel},</if>
<if test="tenantId != null">#{tenantId},</if>
<if test="revision != null">#{revision},</if>
<if test="createdBy != null">#{createdBy},</if>
<if test="createdTime != null">#{createdTime},</if>
<if test="updatedBy != null">#{updatedBy},</if>
<if test="updatedTime != null">#{updatedTime},</if>
<if test="deleteBy != null">#{deleteBy},</if>
<if test="deleteTime != null">#{deleteTime},</if>
</trim>
</insert>
<update id="updateDcBaseTargetModelDao" parameterType="DcBaseTargetModelDao">
update dc_base_target_model
<trim prefix="SET" suffixOverrides=",">
<if test="targetModelCode != null">target_model_code = #{targetModelCode},</if>
<if test="targetModelName != null">target_model_name = #{targetModelName},</if>
<if test="targetModelType != null">target_model_type = #{targetModelType},</if>
<if test="targetModelField != null">target_model_field = #{targetModelField},</if>
<if test="targetModelLevel != null">target_model_level = #{targetModelLevel},</if>
<if test="tenantId != null">tenant_id = #{tenantId},</if>
<if test="revision != null">revision = #{revision},</if>
<if test="createdBy != null">created_by = #{createdBy},</if>
<if test="createdTime != null">created_time = #{createdTime},</if>
<if test="updatedBy != null">updated_by = #{updatedBy},</if>
<if test="updatedTime != null">updated_time = #{updatedTime},</if>
<if test="deleteBy != null">delete_by = #{deleteBy},</if>
<if test="deleteTime != null">delete_time = #{deleteTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteDcBaseTargetModelDaoById" parameterType="Long">
delete from dc_base_target_model where id = #{id}
</delete>
<delete id="deleteDcBaseTargetModelDaoByIds" parameterType="String">
delete from dc_base_target_model where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
Loading…
Cancel
Save