Browse Source

Merge remote-tracking branch 'origin/develop' into develop

develop
bobol 11 months ago
parent
commit
09a1a48d6c
  1. 2
      lzbi-admin/src/main/resources/application.yml
  2. 1
      lzbi-common/src/main/java/com/lzbi/common/core/controller/BaseController.java
  3. 9
      lzbi-module/src/main/java/com/lzbi/asset/controller/DcBaseAssetInfoController.java
  4. 10
      lzbi-module/src/main/java/com/lzbi/asset/controller/DcBaseParamModelController.java
  5. 3
      lzbi-module/src/main/java/com/lzbi/asset/domain/DcBaseParamModel.java
  6. 8
      lzbi-module/src/main/java/com/lzbi/code/service/CodeNoGenerater.java
  7. 4
      lzbi-module/src/main/java/com/lzbi/common/SelectOptionsControl.java
  8. 111
      lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiParamBillMasterController.java
  9. 17
      lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiParamCollectBill.java
  10. 107
      lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiTargetBillMasterController.java
  11. 131
      lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiTargetBillSubController.java
  12. 15
      lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiTargetCollectBill.java
  13. 3
      lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiParamBillMaster.java
  14. 3
      lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetBillMaster.java
  15. 51
      lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetBillSub.java
  16. 3
      lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiParamBillMasterMapper.java
  17. 4
      lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiTargetBillMasterMapper.java
  18. 63
      lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiTargetBillSubMapper.java
  19. 14
      lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiParamBillMasterService.java
  20. 6
      lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetBillMasterService.java
  21. 91
      lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetBillSubService.java
  22. 9
      lzbi-module/src/main/java/com/lzbi/targetFolder/controller/DcBaseAssetTargetController.java
  23. 17
      lzbi-module/src/main/java/com/lzbi/targetFolder/controller/DcBaseTargetModelController.java
  24. 49
      lzbi-module/src/main/java/com/lzbi/targetFolder/domain/DcBaseAssetTarget.java
  25. 136
      lzbi-module/src/main/resources/mapper/asset/DcBaseAssetInfoMapper.xml
  26. 1
      lzbi-module/src/main/resources/mapper/asset/DcBaseParamModelMapper.xml
  27. 2
      lzbi-module/src/main/resources/mapper/asset/DcBaseWorkSpecialMapper.xml
  28. 35
      lzbi-module/src/main/resources/mapper/asset/DcBusiParamBillMasterMapper.xml
  29. 15
      lzbi-module/src/main/resources/mapper/asset/DcBusiParamBillSubMapper.xml
  30. 2
      lzbi-module/src/main/resources/mapper/draft/DcBusiBillModelMasterMapper.xml
  31. 23
      lzbi-module/src/main/resources/mapper/draft/DcBusiTargetBillMasterMapper.xml
  32. 138
      lzbi-module/src/main/resources/mapper/draft/DcBusiTargetBillSubMapper.xml
  33. 50
      lzbi-module/src/main/resources/mapper/targetFolder/DcBaseAssetTargetMapper.xml
  34. 1
      lzbi-module/src/main/resources/mapper/targetFolder/DcBaseTargetModelMapper.xml

2
lzbi-admin/src/main/resources/application.yml

@ -100,7 +100,7 @@ pagehelper:
# Swagger配置 # Swagger配置
swagger: swagger:
# 是否开启swagger # 是否开启swagger
enabled: true enabled: false
# 请求前缀 # 请求前缀
pathMapping: / pathMapping: /

1
lzbi-common/src/main/java/com/lzbi/common/core/controller/BaseController.java

@ -26,6 +26,7 @@ import com.lzbi.common.utils.sql.SqlUtil;
* *
* @author ruoyi * @author ruoyi
*/ */
public class BaseController public class BaseController
{ {
protected final Logger logger = LoggerFactory.getLogger(this.getClass()); protected final Logger logger = LoggerFactory.getLogger(this.getClass());

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

@ -79,6 +79,10 @@ public class DcBaseAssetInfoController extends BaseController {
@Log(title = "资产信息", businessType = BusinessType.INSERT) @Log(title = "资产信息", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody DcBaseAssetInfo dcBaseAssetInfo) { public AjaxResult add(@RequestBody DcBaseAssetInfo dcBaseAssetInfo) {
dcBaseAssetInfo.setCreatedTime(DateUtils.getNowDate());
dcBaseAssetInfo.setCreatedBy(String.valueOf(getUserId()));
dcBaseAssetInfo.setDeptId(getDeptId());
dcBaseAssetInfo.setUserId(getUserId());
return toAjax(dcBaseAssetInfoService.insertDcBaseAssetInfo(dcBaseAssetInfo)); return toAjax(dcBaseAssetInfoService.insertDcBaseAssetInfo(dcBaseAssetInfo));
} }
@ -89,6 +93,8 @@ public class DcBaseAssetInfoController extends BaseController {
@Log(title = "资产信息", businessType = BusinessType.UPDATE) @Log(title = "资产信息", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody DcBaseAssetInfo dcBaseAssetInfo) { public AjaxResult edit(@RequestBody DcBaseAssetInfo dcBaseAssetInfo) {
dcBaseAssetInfo.setUpdatedBy(getUsername());
dcBaseAssetInfo.setUpdatedTime(DateUtils.getNowDate());
return toAjax(dcBaseAssetInfoService.updateDcBaseAssetInfo(dcBaseAssetInfo)); return toAjax(dcBaseAssetInfoService.updateDcBaseAssetInfo(dcBaseAssetInfo));
} }
@ -122,10 +128,9 @@ public class DcBaseAssetInfoController extends BaseController {
beanObject.remove("id"); beanObject.remove("id");
DcBaseAssetInfo dcBaseAssetInfo = JSON.toJavaObject(beanObject, DcBaseAssetInfo.class); DcBaseAssetInfo dcBaseAssetInfo = JSON.toJavaObject(beanObject, DcBaseAssetInfo.class);
dcBaseAssetInfo.setCreatedTime(DateUtils.getNowDate()); dcBaseAssetInfo.setCreatedTime(DateUtils.getNowDate());
dcBaseAssetInfo.setCreatedBy(String.valueOf(getUserId()));
dcBaseAssetInfo.setDeptId(getDeptId()); dcBaseAssetInfo.setDeptId(getDeptId());
dcBaseAssetInfo.setUserId(getUserId()); dcBaseAssetInfo.setUserId(getUserId());
dcBaseAssetInfo.setCreatedBy(String.valueOf(getUserId()));
dcBaseAssetInfo.setCreatedTime(DateUtils.getNowDate());
beanList.add(dcBaseAssetInfo); beanList.add(dcBaseAssetInfo);
} }
} catch (Exception e) { } catch (Exception e) {

10
lzbi-module/src/main/java/com/lzbi/asset/controller/DcBaseParamModelController.java

@ -72,11 +72,10 @@ public class DcBaseParamModelController extends BaseController
@PostMapping @PostMapping
public AjaxResult add(@Valid @RequestBody DcBaseParamModel dcBaseParamModel) { public AjaxResult add(@Valid @RequestBody DcBaseParamModel dcBaseParamModel) {
//BeanValidators.validateWithException(validator, dcBaseParamModel); //BeanValidators.validateWithException(validator, dcBaseParamModel);
dcBaseParamModel.setCreatedBy(getUsername());
dcBaseParamModel.setCreatedTime(DateUtils.getNowDate()); dcBaseParamModel.setCreatedTime(DateUtils.getNowDate());
dcBaseParamModel.setTenantId("0"); dcBaseParamModel.setCreatedBy(String.valueOf(getUserId()));
dcBaseParamModel.setUpdatedBy(getUsername()); dcBaseParamModel.setDeptId(getDeptId());
dcBaseParamModel.setUpdatedTime(DateUtils.getNowDate()); dcBaseParamModel.setUserId(getUserId());
return toAjax(dcBaseParamModelService.insertByVo(dcBaseParamModel)); return toAjax(dcBaseParamModelService.insertByVo(dcBaseParamModel));
} }
/** /**
@ -154,10 +153,9 @@ public class DcBaseParamModelController extends BaseController
beanObject.remove("id"); beanObject.remove("id");
DcBaseParamModel dcBaseParamModel = JSON.toJavaObject(beanObject, DcBaseParamModel.class); DcBaseParamModel dcBaseParamModel = JSON.toJavaObject(beanObject, DcBaseParamModel.class);
dcBaseParamModel.setCreatedTime(DateUtils.getNowDate()); dcBaseParamModel.setCreatedTime(DateUtils.getNowDate());
dcBaseParamModel.setCreatedBy(String.valueOf(getUserId()));
dcBaseParamModel.setDeptId(getDeptId()); dcBaseParamModel.setDeptId(getDeptId());
dcBaseParamModel.setUserId(getUserId()); dcBaseParamModel.setUserId(getUserId());
dcBaseParamModel.setCreatedBy(String.valueOf(getUserId()));
dcBaseParamModel.setCreatedTime(DateUtils.getNowDate());
dcBaseParamModelList.add(dcBaseParamModel); dcBaseParamModelList.add(dcBaseParamModel);
} }
} catch (Exception e) { } catch (Exception e) {

3
lzbi-module/src/main/java/com/lzbi/asset/domain/DcBaseParamModel.java

@ -22,9 +22,6 @@ import com.lzbi.module.base.BaseModuleEntity;
@TableName("dc_base_param_model") @TableName("dc_base_param_model")
public class DcBaseParamModel extends BaseModuleEntity{ public class DcBaseParamModel extends BaseModuleEntity{
/** 主键 */
@ApiModelProperty(name = "主键",notes = "")
private Long id ;
/** 参数模型编码 */ /** 参数模型编码 */
@ApiModelProperty(name = "参数模型编码",notes = "") @ApiModelProperty(name = "参数模型编码",notes = "")
private String paramModelCode ; private String paramModelCode ;

8
lzbi-module/src/main/java/com/lzbi/code/service/CodeNoGenerater.java

@ -36,7 +36,13 @@ public class CodeNoGenerater {
// //
String spitChar= Optional.ofNullable(ruleDao.getCodeSplitFlag()).orElse(""); String spitChar= Optional.ofNullable(ruleDao.getCodeSplitFlag()).orElse("");
spitChar=spitChar.equals("*")?"":spitChar; spitChar=spitChar.equals("*")?"":spitChar;
codeBuffer.append(ruleDao.getCodeHeader()).append(spitChar).append(getBody(ruleDao)).append(spitChar).append(StringUtils.leftPad(serial,serialLen,'0')); String body=getBody(ruleDao);
codeBuffer.append(ruleDao.getCodeHeader());
if(!"".equals(body)){
codeBuffer.append(spitChar);
codeBuffer.append(body);
}
codeBuffer.append(spitChar).append(StringUtils.leftPad(serial,serialLen,'0'));
return codeBuffer.toString(); return codeBuffer.toString();
} }

4
lzbi-module/src/main/java/com/lzbi/common/SelectOptionsControl.java

@ -116,7 +116,7 @@ public class SelectOptionsControl extends BaseController {
{ {
DcBaseAssetTarget dcBaseAssetTarget=new DcBaseAssetTarget(); DcBaseAssetTarget dcBaseAssetTarget=new DcBaseAssetTarget();
dcBaseAssetTarget.setAssetCode(assetQueryParams.getAssetCode()); dcBaseAssetTarget.setAssetCode(assetQueryParams.getAssetCode());
dcBaseAssetTarget.setTargetField(assetQueryParams.getFieldCode()); dcBaseAssetTarget.setFieldCode(assetQueryParams.getFieldCode());
dcBaseAssetTarget.setColumnType("T"); dcBaseAssetTarget.setColumnType("T");
//dcBaseAssetTargetDao.setAssetId(assetQueryParams.getAssetId()); //dcBaseAssetTargetDao.setAssetId(assetQueryParams.getAssetId());
return AjaxResult.success(dcBaseAssetTargetService.selectDcBaseAssetTargetList(dcBaseAssetTarget)); return AjaxResult.success(dcBaseAssetTargetService.selectDcBaseAssetTargetList(dcBaseAssetTarget));
@ -126,7 +126,7 @@ public class SelectOptionsControl extends BaseController {
{ {
DcBaseAssetTarget dcBaseAssetTarget=new DcBaseAssetTarget(); DcBaseAssetTarget dcBaseAssetTarget=new DcBaseAssetTarget();
dcBaseAssetTarget.setAssetCode(assetQueryParams.getAssetCode()); dcBaseAssetTarget.setAssetCode(assetQueryParams.getAssetCode());
dcBaseAssetTarget.setTargetField(assetQueryParams.getFieldCode()); dcBaseAssetTarget.setFieldCode(assetQueryParams.getFieldCode());
dcBaseAssetTarget.setColumnType("P"); dcBaseAssetTarget.setColumnType("P");
//dcBaseAssetTargetDao.setAssetId(assetQueryParams.getAssetId()); //dcBaseAssetTargetDao.setAssetId(assetQueryParams.getAssetId());
return AjaxResult.success(dcBaseAssetTargetService.selectDcBaseAssetTargetList(dcBaseAssetTarget)); return AjaxResult.success(dcBaseAssetTargetService.selectDcBaseAssetTargetList(dcBaseAssetTarget));

111
lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiParamBillMasterController.java

@ -1,24 +1,25 @@
package com.lzbi.draft.controller; package com.lzbi.draft.controller;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.lzbi.common.utils.DateUtils;
import com.lzbi.common.utils.SecurityUtils;
import com.lzbi.draft.domain.DcBusiParamBillSub;
import com.lzbi.draft.service.DcBusiParamBillSubService;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
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;
import org.springframework.web.bind.annotation.GetMapping; 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.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; 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.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.draft.domain.DcBusiParamBillMaster; import com.lzbi.draft.domain.DcBusiParamBillMaster;
import com.lzbi.draft.service.DcBusiParamBillMasterService; import com.lzbi.draft.service.DcBusiParamBillMasterService;
import com.lzbi.common.utils.poi.ExcelUtil;
import com.lzbi.common.core.page.TableDataInfo; import com.lzbi.common.core.page.TableDataInfo;
/** /**
@ -29,15 +30,21 @@ import com.lzbi.common.core.page.TableDataInfo;
*/ */
@RestController @RestController
@RequestMapping("/draft/paramInBill") @RequestMapping("/draft/paramInBill")
public class DcBusiParamBillMasterController extends BaseController public class DcBusiParamBillMasterController extends BaseController
{ {
@Autowired @Autowired
private DcBusiParamBillMasterService dcBusiParamBillMasterService; private DcBusiParamBillMasterService dcBusiParamBillMasterService;
@Autowired
private DcBusiParamBillSubService dcBusiParamBillSubService;
/** /**
* 查询参数采集录入单据主列表 * 查询参数采集录入单据主列表
*/ */
@PreAuthorize("@ss.hasPermi('param:paramData:list')") //@PreAuthorize("@ss.hasPermi('param:paramData:list')")
@ApiOperation("参数采集单详情")
@ApiImplicitParams({
@ApiImplicitParam(name = "DcBusiParamBillMaster", value = "", dataType = "DcBusiParamBillMaster", dataTypeClass = DcBusiParamBillMaster.class),
})
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(DcBusiParamBillMaster dcBusiParamBillMasterDao) public TableDataInfo list(DcBusiParamBillMaster dcBusiParamBillMasterDao)
{ {
@ -46,59 +53,43 @@ public class DcBusiParamBillMasterController extends BaseController
return getDataTable(list); return getDataTable(list);
} }
/** @ApiOperation("参数采集单详情")
* 导出参数采集录入单据主列表 @ApiImplicitParams({
*/ @ApiImplicitParam(name = "billNo", value = "", dataType = "String", dataTypeClass = String.class),
@PreAuthorize("@ss.hasPermi('param:paramData:export')") })
@Log(title = "参数采集(录入)单据主", businessType = BusinessType.EXPORT) @GetMapping("/detail/{billNo}")
@PostMapping("/export") public AjaxResult getParamInBillDetail(@PathVariable String billNo){
public void export(HttpServletResponse response, DcBusiParamBillMaster dcBusiParamBillMasterDao) DcBusiParamBillSub sub=new DcBusiParamBillSub();
{ sub.setBillNo(billNo);
List<DcBusiParamBillMaster> list = dcBusiParamBillMasterService.selectDcBusiParamBillMasterDaoList(dcBusiParamBillMasterDao); List<DcBusiParamBillSub> list = dcBusiParamBillSubService.selectByVo(sub);
ExcelUtil<DcBusiParamBillMaster> util = new ExcelUtil<DcBusiParamBillMaster>(DcBusiParamBillMaster.class); return AjaxResult.success(list);
util.exportExcel(response, list, "参数采集(录入)单据主数据");
} }
@ApiOperation("采集单驳回")
/** @ApiImplicitParams({
* 获取参数采集录入单据主详细信息 @ApiImplicitParam(name = "billNo", value = "", dataType = "String", dataTypeClass = String.class),
*/ })
@PreAuthorize("@ss.hasPermi('param:paramData:query')") @GetMapping("/checkBack/{billNo}")
@GetMapping(value = "/{id}") public AjaxResult checkParamInBillBack(@PathVariable String billNo){
public AjaxResult getInfo(@PathVariable("id") Long id) DcBusiParamBillMaster master=new DcBusiParamBillMaster();
{ master.setBillNo(billNo);
return success(dcBusiParamBillMasterService.selectDcBusiParamBillMasterDaoById(id)); master.setUpdatedBy(SecurityUtils.getUsername());
master.setCreatedTime(DateUtils.getNowDate());
master.setCheckStatus("9");
return AjaxResult.success(dcBusiParamBillMasterService.checkBill(master));
} }
/** @ApiOperation("采集单审核")
* 新增参数采集录入单据主 @ApiImplicitParams({
*/ @ApiImplicitParam(name = "billNo", value = "", dataType = "String", dataTypeClass = String.class),
@PreAuthorize("@ss.hasPermi('param:paramData:add')") })
@Log(title = "参数采集(录入)单据主", businessType = BusinessType.INSERT) @GetMapping("/check/{billNo}")
@PostMapping public AjaxResult checkParamInBill(@PathVariable String billNo){
public AjaxResult add(@RequestBody DcBusiParamBillMaster dcBusiParamBillMasterDao) DcBusiParamBillMaster master=new DcBusiParamBillMaster();
{ master.setUpdatedBy(SecurityUtils.getUsername());
return toAjax(dcBusiParamBillMasterService.insertDcBusiParamBillMasterDao(dcBusiParamBillMasterDao)); master.setCreatedTime(DateUtils.getNowDate());
} master.setBillNo(billNo);
master.setCheckStatus("1");
/** return AjaxResult.success(dcBusiParamBillMasterService.checkBill(master));
* 修改参数采集录入单据主
*/
@PreAuthorize("@ss.hasPermi('param:paramData:edit')")
@Log(title = "参数采集(录入)单据主", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DcBusiParamBillMaster dcBusiParamBillMasterDao)
{
return toAjax(dcBusiParamBillMasterService.updateDcBusiParamBillMasterDao(dcBusiParamBillMasterDao));
} }
/**
* 删除参数采集录入单据主
*/
@PreAuthorize("@ss.hasPermi('param:paramData:remove')")
@Log(title = "参数采集(录入)单据主", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(dcBusiParamBillMasterService.deleteDcBusiParamBillMasterDaoByIds(ids));
}
} }

17
lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiParamCollectBill.java

@ -177,13 +177,18 @@ public class DcBusiParamCollectBill extends BaseController
dcBusiBillModelMaster.setBillModelNo(billModelNo); dcBusiBillModelMaster.setBillModelNo(billModelNo);
dcBusiBillModelMaster.setBillModelName(dcBusiParamBillMaster.getBiilModelName()); dcBusiBillModelMaster.setBillModelName(dcBusiParamBillMaster.getBiilModelName());
List<DcBusiBillModelSub> dcBusiBillModelSubList=new ArrayList<>(); List<DcBusiBillModelSub> dcBusiBillModelSubList=new ArrayList<>();
JSONArray jsonArray=Optional.ofNullable(JSONArray.from(dcBusiParamBillMaster.getSubDatas())).orElse(new JSONArray()); JSONObject datasets=Optional.ofNullable(dcBusiParamBillMaster.getSubDatas()).orElse(new JSONObject());
jsonArray.forEach(item -> { JSONArray dataArray=new JSONArray();
dataArray.addAll(datasets.getJSONArray("insertRecords"));
dataArray.addAll(datasets.getJSONArray("updateRecords"));
//JSONArray jsonArray=Optional.ofNullable(JSONArray.from(dcBusiParamBillMaster.getSubDatas())).orElse(new JSONArray());
dataArray.forEach(item -> {
JSONObject jsb = JSONObject.from(item); JSONObject jsb = JSONObject.from(item);
DcBusiBillModelSub modelSub=new DcBusiBillModelSub(); DcBusiBillModelSub modelSub=new DcBusiBillModelSub();
modelSub.setBillModelNo(billModelNo); modelSub.setBillModelNo(billModelNo);
modelSub.setAssetCode(jsb.getString("assetCode")); modelSub.setAssetCode(jsb.getString("assetCode"));
modelSub.setAssetName(jsb.getString("assetName")); modelSub.setAssetName(jsb.getString("assetName"));
modelSub.setAssetUnitAlialsName(jsb.getString("assetAlialsName"));
//modelSub.setAssetId(item.get); //modelSub.setAssetId(item.get);
modelSub.setAssetUnitCode(jsb.getString("paramCode")); modelSub.setAssetUnitCode(jsb.getString("paramCode"));
modelSub.setAssetUnitName(jsb.getString("paramName")); modelSub.setAssetUnitName(jsb.getString("paramName"));
@ -236,8 +241,12 @@ public class DcBusiParamCollectBill extends BaseController
dcBusiParamBillMaster.setOragnizeId(deptId); dcBusiParamBillMaster.setOragnizeId(deptId);
sysDept = Optional.ofNullable(sysDeptService.selectDeptById(deptId)).orElse(new SysDept()) ; sysDept = Optional.ofNullable(sysDeptService.selectDeptById(deptId)).orElse(new SysDept()) ;
dcBusiParamBillMaster.setOrganizeName(sysDept.getDeptName()); dcBusiParamBillMaster.setOrganizeName(sysDept.getDeptName());
JSONArray jsonArray=Optional.ofNullable(JSONArray.from(dcBusiParamBillMaster.getSubDatas())).orElse(new JSONArray()); // JSONArray jsonArray=Optional.ofNullable(JSONArray.from(dcBusiParamBillMaster.getSubDatas())).orElse(new JSONArray());
jsonArray.forEach(item->{ JSONObject datasets=Optional.ofNullable(dcBusiParamBillMaster.getSubDatas()).orElse(new JSONObject());
JSONArray dataArray=new JSONArray();
dataArray.addAll(datasets.getJSONArray("insertRecords"));
dataArray.addAll(datasets.getJSONArray("updateRecords"));
dataArray.forEach(item->{
JSONObject jsb = JSONObject.from(item); JSONObject jsb = JSONObject.from(item);
for(int i=1;i<25;i++){ for(int i=1;i<25;i++){
String fname="val_"+String.valueOf(i); String fname="val_"+String.valueOf(i);

107
lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiTargetBillMasterController.java

@ -1,4 +1,11 @@
package com.lzbi.draft.controller; package com.lzbi.draft.controller;
import com.lzbi.common.utils.DateUtils;
import com.lzbi.common.utils.SecurityUtils;
import com.lzbi.draft.domain.DcBusiParamBillMaster;
import com.lzbi.draft.domain.DcBusiParamBillSub;
import com.lzbi.draft.domain.DcBusiTargetBillSub;
import com.lzbi.draft.service.DcBusiParamBillSubService;
import com.lzbi.draft.service.DcBusiTargetBillSubService;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
@ -30,12 +37,13 @@ import com.lzbi.common.core.page.TableDataInfo;
* @date 2023-12-14 * @date 2023-12-14
*/ */
@RestController @RestController
@RequestMapping("/draft/targetBillMaster") @RequestMapping("/draft/targetInBill")
public class DcBusiTargetBillMasterController extends BaseController public class DcBusiTargetBillMasterController extends BaseController
{ {
@Autowired @Autowired
private DcBusiTargetBillMasterService dcBusiTargetBillMasterService; private DcBusiTargetBillMasterService dcBusiTargetBillMasterService;
@Autowired
private DcBusiTargetBillSubService dcBusiTargetBillSubService;
/** /**
* 查询统计指标录入列表 * 查询统计指标录入列表
*/ */
@ -43,7 +51,7 @@ public class DcBusiTargetBillMasterController extends BaseController
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "DcBusiTargetBillMaster", value = "", dataType = "DcBusiTargetBillMaster", dataTypeClass = DcBusiTargetBillMaster.class), @ApiImplicitParam(name = "DcBusiTargetBillMaster", value = "", dataType = "DcBusiTargetBillMaster", dataTypeClass = DcBusiTargetBillMaster.class),
}) })
@PreAuthorize("@ss.hasPermi('draft:targetCollect:list')") //@PreAuthorize("@ss.hasPermi('draft:targetCollect:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(DcBusiTargetBillMaster DcBusiTargetBillMaster) public TableDataInfo list(DcBusiTargetBillMaster DcBusiTargetBillMaster)
{ {
@ -52,80 +60,43 @@ public class DcBusiTargetBillMasterController extends BaseController
return getDataTable(list); return getDataTable(list);
} }
/**
* 导出统计指标录入列表
*/
@ApiOperation("导出统计指标录入列表")
@ApiImplicitParams({
@ApiImplicitParam(name = "DcBusiTargetBillMaster", value = "", dataType = "DcBusiTargetBillMaster", dataTypeClass = DcBusiTargetBillMaster.class),
})
@PreAuthorize("@ss.hasPermi('draft:targetCollect:export')")
@Log(title = "统计指标录入", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response,DcBusiTargetBillMaster DcBusiTargetBillMaster)
{
List<DcBusiTargetBillMaster> list = dcBusiTargetBillMasterService.selectDcBusiTargetBillMasterList(DcBusiTargetBillMaster);
ExcelUtil<DcBusiTargetBillMaster> util = new ExcelUtil<DcBusiTargetBillMaster>(DcBusiTargetBillMaster.class);
util.exportExcel(response, list, "统计指标录入数据");
}
/** @ApiOperation("指标采集单详情")
* 获取统计指标录入详细信息
*/
@ApiOperation("获取统计指标录入详细信息")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "id", value = "", dataType = "Long", dataTypeClass = Long.class), @ApiImplicitParam(name = "billNo", value = "", dataType = "String", dataTypeClass = String.class),
}) })
@PreAuthorize("@ss.hasPermi('draft:targetCollect:query')") @GetMapping("/detail/{billNo}")
@GetMapping(value = "/{id}") public AjaxResult getParamInBillDetail(@PathVariable String billNo){
public AjaxResult getInfo(@PathVariable("id") Long id) DcBusiTargetBillSub sub=new DcBusiTargetBillSub();
{ sub.setBillNo(billNo);
return success(dcBusiTargetBillMasterService.selectDcBusiTargetBillMasterById(id)); List<DcBusiTargetBillSub> list = dcBusiTargetBillSubService.selectDcBusiTargetBillSubList(sub);
return AjaxResult.success(list);
} }
@ApiOperation("采集单驳回")
/**
* 新增统计指标录入
*/
@ApiOperation("新增统计指标录入")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "DcBusiTargetBillMaster", value = "", dataType = "DcBusiTargetBillMaster", dataTypeClass = DcBusiTargetBillMaster.class), @ApiImplicitParam(name = "billNo", value = "", dataType = "String", dataTypeClass = String.class),
})
@PreAuthorize("@ss.hasPermi('draft:targetCollect:add')")
@Log(title = "统计指标录入", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody DcBusiTargetBillMaster DcBusiTargetBillMaster)
{
return toAjax(dcBusiTargetBillMasterService.insertDcBusiTargetBillMaster(DcBusiTargetBillMaster));
}
/**
* 修改统计指标录入
*/
@ApiOperation("修改统计指标录入")
@ApiImplicitParams({
@ApiImplicitParam(name = "DcBusiTargetBillMaster", value = "", dataType = "DcBusiTargetBillMaster", dataTypeClass = DcBusiTargetBillMaster.class),
}) })
@PreAuthorize("@ss.hasPermi('draft:targetCollect:edit')") @GetMapping("/checkBack/{billNo}")
@Log(title = "统计指标录入", businessType = BusinessType.UPDATE) public AjaxResult checkParamInBillBack(@PathVariable String billNo){
@PutMapping DcBusiTargetBillMaster master=new DcBusiTargetBillMaster();
public AjaxResult edit(@RequestBody DcBusiTargetBillMaster DcBusiTargetBillMaster) master.setBillNo(billNo);
{ master.setUpdatedBy(SecurityUtils.getUsername());
return toAjax(dcBusiTargetBillMasterService.updateDcBusiTargetBillMaster(DcBusiTargetBillMaster)); master.setCreatedTime(DateUtils.getNowDate());
master.setCheckStatus("9");
return AjaxResult.success(dcBusiTargetBillMasterService.checkBill(master));
} }
/** @ApiOperation("采集单审核")
* 删除统计指标录入
*/
@ApiOperation("删除统计指标录入")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "ids", value = "", dataType = "Long", dataTypeClass =Long.class), @ApiImplicitParam(name = "billNo", value = "", dataType = "String", dataTypeClass = String.class),
}) })
@PreAuthorize("@ss.hasPermi('draft:targetCollect:remove')") @GetMapping("/check/{billNo}")
@Log(title = "统计指标录入", businessType = BusinessType.DELETE) public AjaxResult checkParamInBill(@PathVariable String billNo){
@DeleteMapping("/{ids}") DcBusiTargetBillMaster master=new DcBusiTargetBillMaster();
public AjaxResult remove(@PathVariable Long[] ids) master.setUpdatedBy(SecurityUtils.getUsername());
{ master.setCreatedTime(DateUtils.getNowDate());
return toAjax(dcBusiTargetBillMasterService.deleteDcBusiTargetBillMasterByIds(ids)); master.setBillNo(billNo);
master.setCheckStatus("1");
return AjaxResult.success(dcBusiTargetBillMasterService.checkBill(master));
} }
} }

131
lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiTargetBillSubController.java

@ -0,0 +1,131 @@
package com.lzbi.draft.controller;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
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.draft.domain. DcBusiTargetBillSub;
import com.lzbi.draft.service.DcBusiTargetBillSubService;
import com.lzbi.common.utils.poi.ExcelUtil;
import com.lzbi.common.core.page.TableDataInfo;
/**
* 指标数据采集录入明细Controller
*
* @author zhousq
* @date 2023-12-19
*/
@RestController
@RequestMapping("/draft/targetBIllSub")
public class DcBusiTargetBillSubController extends BaseController
{
@Autowired
private DcBusiTargetBillSubService dcBusiTargetBillSubService;
/**
* 查询指标数据采集录入明细列表
*/
@ApiOperation("查询指标数据采集(录入)明细列表")
@ApiImplicitParams({
@ApiImplicitParam(name = "DcBusiTargetBillSub", value = "", dataType = "DcBusiTargetBillSub", dataTypeClass = DcBusiTargetBillSub.class),
})
@PreAuthorize("@ss.hasPermi('draft:targetBIllSub:list')")
@GetMapping("/list")
public TableDataInfo list(DcBusiTargetBillSub DcBusiTargetBillSub)
{
startPage();
List< DcBusiTargetBillSub> list = dcBusiTargetBillSubService.selectDcBusiTargetBillSubList(DcBusiTargetBillSub);
return getDataTable(list);
}
/**
* 导出指标数据采集录入明细列表
*/
@ApiOperation("导出指标数据采集(录入)明细列表")
@ApiImplicitParams({
@ApiImplicitParam(name = "DcBusiTargetBillSub", value = "", dataType = "DcBusiTargetBillSub", dataTypeClass = DcBusiTargetBillSub.class),
})
@PreAuthorize("@ss.hasPermi('draft:targetBIllSub:export')")
@Log(title = "指标数据采集(录入)明细", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response,DcBusiTargetBillSub DcBusiTargetBillSub)
{
List<DcBusiTargetBillSub> list = dcBusiTargetBillSubService.selectDcBusiTargetBillSubList(DcBusiTargetBillSub);
ExcelUtil<DcBusiTargetBillSub> util = new ExcelUtil<DcBusiTargetBillSub>(DcBusiTargetBillSub.class);
util.exportExcel(response, list, "指标数据采集(录入)明细数据");
}
/**
* 获取指标数据采集录入明细详细信息
*/
@ApiOperation("获取指标数据采集(录入)明细详细信息")
@ApiImplicitParams({
@ApiImplicitParam(name = "id", value = "", dataType = "Long", dataTypeClass = Long.class),
})
@PreAuthorize("@ss.hasPermi('draft:targetBIllSub:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(dcBusiTargetBillSubService.selectDcBusiTargetBillSubById(id));
}
/**
* 新增指标数据采集录入明细
*/
@ApiOperation("新增指标数据采集(录入)明细")
@ApiImplicitParams({
@ApiImplicitParam(name = "DcBusiTargetBillSub", value = "", dataType = "DcBusiTargetBillSub", dataTypeClass = DcBusiTargetBillSub.class),
})
@PreAuthorize("@ss.hasPermi('draft:targetBIllSub:add')")
@Log(title = "指标数据采集(录入)明细", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody DcBusiTargetBillSub DcBusiTargetBillSub)
{
return toAjax(dcBusiTargetBillSubService.insertDcBusiTargetBillSub(DcBusiTargetBillSub));
}
/**
* 修改指标数据采集录入明细
*/
@ApiOperation("修改指标数据采集(录入)明细")
@ApiImplicitParams({
@ApiImplicitParam(name = "DcBusiTargetBillSub", value = "", dataType = "DcBusiTargetBillSub", dataTypeClass = DcBusiTargetBillSub.class),
})
@PreAuthorize("@ss.hasPermi('draft:targetBIllSub:edit')")
@Log(title = "指标数据采集(录入)明细", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DcBusiTargetBillSub DcBusiTargetBillSub)
{
return toAjax(dcBusiTargetBillSubService.updateDcBusiTargetBillSub(DcBusiTargetBillSub));
}
/**
* 删除指标数据采集录入明细
*/
@ApiOperation("删除指标数据采集(录入)明细")
@ApiImplicitParams({
@ApiImplicitParam(name = "ids", value = "", dataType = "Long", dataTypeClass =Long.class),
})
@PreAuthorize("@ss.hasPermi('draft:targetBIllSub:remove')")
@Log(title = "指标数据采集(录入)明细", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(dcBusiTargetBillSubService.deleteDcBusiTargetBillSubByIds(ids));
}
}

15
lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiTargetCollectBill.java

@ -173,13 +173,17 @@ public class DcBusiTargetCollectBill extends BaseController
dcBusiBillModelMaster.setBillModelNo(billModelNo); dcBusiBillModelMaster.setBillModelNo(billModelNo);
dcBusiBillModelMaster.setBillModelName(dcBusiParamBillMaster.getBiilModelName()); dcBusiBillModelMaster.setBillModelName(dcBusiParamBillMaster.getBiilModelName());
List<DcBusiBillModelSub> dcBusiBillModelSubList=new ArrayList<>(); List<DcBusiBillModelSub> dcBusiBillModelSubList=new ArrayList<>();
JSONArray jsonArray=Optional.ofNullable(JSONArray.from(dcBusiParamBillMaster.getSubDatas())).orElse(new JSONArray()); JSONObject datasets=Optional.ofNullable(dcBusiParamBillMaster.getSubDatas()).orElse(new JSONObject());
jsonArray.forEach(item -> { JSONArray dataArray=new JSONArray();
dataArray.addAll(datasets.getJSONArray("insertRecords"));
dataArray.addAll(datasets.getJSONArray("updateRecords"));
dataArray.forEach(item -> {
JSONObject jsb = JSONObject.from(item); JSONObject jsb = JSONObject.from(item);
DcBusiBillModelSub modelSub=new DcBusiBillModelSub(); DcBusiBillModelSub modelSub=new DcBusiBillModelSub();
modelSub.setBillModelNo(billModelNo); modelSub.setBillModelNo(billModelNo);
modelSub.setAssetCode(jsb.getString("assetCode")); modelSub.setAssetCode(jsb.getString("assetCode"));
modelSub.setAssetName(jsb.getString("assetName")); modelSub.setAssetName(jsb.getString("assetName"));
modelSub.setAssetUnitAlialsName(jsb.getString("assetAlialsName"));
//modelSub.setAssetId(item.get); //modelSub.setAssetId(item.get);
modelSub.setAssetUnitCode(jsb.getString("targetCode")); modelSub.setAssetUnitCode(jsb.getString("targetCode"));
modelSub.setAssetUnitName(jsb.getString("targetName")); modelSub.setAssetUnitName(jsb.getString("targetName"));
@ -232,8 +236,11 @@ public class DcBusiTargetCollectBill extends BaseController
dcBusiTargetBillMaster.setOragnizeId(deptId); dcBusiTargetBillMaster.setOragnizeId(deptId);
sysDept = Optional.ofNullable(sysDeptService.selectDeptById(deptId)).orElse(new SysDept()) ; sysDept = Optional.ofNullable(sysDeptService.selectDeptById(deptId)).orElse(new SysDept()) ;
dcBusiTargetBillMaster.setOrganizeName(sysDept.getDeptName()); dcBusiTargetBillMaster.setOrganizeName(sysDept.getDeptName());
JSONArray jsonArray=Optional.ofNullable(JSONArray.from(dcBusiTargetBillMaster.getSubDatas())).orElse(new JSONArray()); JSONObject datasets=Optional.ofNullable(dcBusiTargetBillMaster.getSubDatas()).orElse(new JSONObject());
jsonArray.forEach(item->{ JSONArray dataArray=new JSONArray();
dataArray.addAll(datasets.getJSONArray("insertRecords"));
dataArray.addAll(datasets.getJSONArray("updateRecords"));
dataArray.forEach(item->{
JSONObject jsb = JSONObject.from(item); JSONObject jsb = JSONObject.from(item);
for(int i=1;i<31;i++){ for(int i=1;i<31;i++){
String fname="val_"+String.valueOf(i); String fname="val_"+String.valueOf(i);

3
lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiParamBillMaster.java

@ -1,6 +1,7 @@
package com.lzbi.draft.domain; package com.lzbi.draft.domain;
import com.alibaba.fastjson2.JSONArray; import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
@ -82,7 +83,7 @@ public class DcBusiParamBillMaster extends BaseModuleEntity
/** 参数数据采集(录入)明细信息 */ /** 参数数据采集(录入)明细信息 */
private List<DcBusiParamBillSub> dcBusiParamBillSubList; private List<DcBusiParamBillSub> dcBusiParamBillSubList;
@ApiModelProperty(name = "data数组数据未转换",notes = "") @ApiModelProperty(name = "data数组数据未转换",notes = "")
private JSONArray subDatas; private JSONObject subDatas;

3
lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetBillMaster.java

@ -4,6 +4,7 @@ import java.util.List;
import java.util.Date; import java.util.Date;
import com.alibaba.fastjson2.JSONArray; import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
@ -96,5 +97,5 @@ public class DcBusiTargetBillMaster extends BaseModuleEntity
@ApiModelProperty(name = "专业名称",notes = "") @ApiModelProperty(name = "专业名称",notes = "")
private String fieldName; private String fieldName;
@ApiModelProperty(name = "data数组数据未转换",notes = "") @ApiModelProperty(name = "data数组数据未转换",notes = "")
private JSONArray subDatas; private JSONObject subDatas;
} }

51
lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetBillSub.java

@ -2,17 +2,12 @@ package com.lzbi.draft.domain;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
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 lombok.Data;
import io.swagger.annotations.ApiModelProperty;
import lombok.experimental.Accessors;
import com.lzbi.common.annotation.Excel; import com.lzbi.common.annotation.Excel;
import com.lzbi.module.base.BaseModuleEntity; import com.lzbi.module.base.BaseModuleEntity;
@ -20,76 +15,82 @@ import com.lzbi.module.base.BaseModuleEntity;
* 指标数据采集录入明细对象 dc_busi_target_bill_sub * 指标数据采集录入明细对象 dc_busi_target_bill_sub
* *
* @author zhousq * @author zhousq
* @date 2023-12-14 * @date 2023-12-19
*/ */
@Data @Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true) @Accessors(chain = true)
@ApiModel(value = "指标数据采集(录入)明细表",description = "")
@TableName("dc_busi_target_bill_sub")
public class DcBusiTargetBillSub extends BaseModuleEntity public class DcBusiTargetBillSub extends BaseModuleEntity
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** 主键 */ /** 主键 */
@ApiModelProperty(name = "主键",notes = "")
private Long id; private Long id;
/** 单据编码 */ /** 单据编码 */
@Excel(name = "单据编码") @Excel(name = "单据编码")
@ApiModelProperty(name = "单据编码",notes = "") @ApiModelProperty(name = "单据编码",notes = "billNo")
private String billNo; private String billNo;
/** 指标名称 */ /** 指标名称 */
@Excel(name = "指标名称") @Excel(name = "指标名称")
@ApiModelProperty(name = "指标名称",notes = "") @ApiModelProperty(name = "指标名称",notes = "targetName")
private String targetName; private String targetName;
/** 指标编码 */ /** 指标编码 */
@Excel(name = "指标编码") @Excel(name = "指标编码")
@ApiModelProperty(name = "指标编码",notes = "") @ApiModelProperty(name = "指标编码",notes = "targetCode")
private String targetCode; private String targetCode;
/** 指标单位 */ /** 指标单位 */
@Excel(name = "指标单位") @Excel(name = "指标单位")
@ApiModelProperty(name = "指标单位",notes = "") @ApiModelProperty(name = "指标单位",notes = "targetUint")
private String targetUint; private String targetUint;
/** 指标值 */ /** 指标值 */
@Excel(name = "指标值") @Excel(name = "指标值")
@ApiModelProperty(name = "指标值",notes = "") @ApiModelProperty(name = "指标值",notes = "targetValue")
private Double targetValue; private Double targetValue;
/** 统计日期 */ /** 统计日期 */
@Excel(name = "统计日期") @Excel(name = "统计日期")
@ApiModelProperty(name = "统计日期",notes = "") @ApiModelProperty(name = "统计日期",notes = "countDate")
private String countDate; private String countDate;
/** 天 */ /** 天 */
@Excel(name = "天") @Excel(name = "天")
@ApiModelProperty(name = "天",notes = "") @ApiModelProperty(name = "天",notes = "countDay")
private Integer countDay; private Integer countDay;
/** 所属专业编码 */ /** 所属专业编码 */
@Excel(name = "所属专业编码") @Excel(name = "所属专业编码")
@ApiModelProperty(name = "所属专业编码",notes = "") @ApiModelProperty(name = "所属专业编码",notes = "fieldCode")
private String fieldCode; private String fieldCode;
/** 所属专业名称 */ /** 所属专业名称 */
@Excel(name = "所属专业名称") @Excel(name = "所属专业名称")
@ApiModelProperty(name = "所属专业名称",notes = "") @ApiModelProperty(name = "所属专业名称",notes = "fieldName")
private String fieldName; private String fieldName;
/** 统计单元编码 */ /** 统计单元编码 */
@Excel(name = "统计单元编码") @Excel(name = "统计单元编码")
@ApiModelProperty(name = "统计单元编码",notes = "") @ApiModelProperty(name = "统计单元编码",notes = "assetCode")
private String assetCode; private String assetCode;
/** 统计单元名称 */ /** 统计单元名称 */
@Excel(name = "统计单元名称") @Excel(name = "统计单元名称")
@ApiModelProperty(name = "统计单元名称",notes = "") @ApiModelProperty(name = "统计单元名称",notes = "assetName")
private String assetName; private String assetName;
/** 创建人 */
private String createdBy;
/** 创建时间 */
private Date createdTime;
/** 更新人 */
private String updatedBy;
/** 更新时间 */
private Date updatedTime;
} }

3
lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiParamBillMasterMapper.java

@ -46,6 +46,7 @@ public interface DcBusiParamBillMasterMapper extends BaseMapper<DcBusiParamBillM
* @return 结果 * @return 结果
*/ */
public int updateDcBusiParamBillMasterDao(DcBusiParamBillMaster dcBusiParamBillMasterDao); public int updateDcBusiParamBillMasterDao(DcBusiParamBillMaster dcBusiParamBillMasterDao);
public int updateDcBusiParamBillMasterByNo(DcBusiParamBillMaster dcBusiParamBillMasterDao);
/** /**
* 删除参数采集录入单据主 * 删除参数采集录入单据主
@ -86,5 +87,5 @@ public interface DcBusiParamBillMasterMapper extends BaseMapper<DcBusiParamBillM
* @param id 参数采集录入单据主ID * @param id 参数采集录入单据主ID
* @return 结果 * @return 结果
*/ */
public int deleteDcBusiParamBillSubDaoByBillNo(Long id); public int deleteDcBusiParamBillSubDaoByBillNo(String billNo);
} }

4
lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiTargetBillMasterMapper.java

@ -1,6 +1,8 @@
package com.lzbi.draft.mapper; package com.lzbi.draft.mapper;
import java.util.List; import java.util.List;
import com.lzbi.draft.domain.DcBusiParamBillMaster;
import com.lzbi.draft.domain.DcBusiTargetBillMaster; import com.lzbi.draft.domain.DcBusiTargetBillMaster;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lzbi.draft.domain.DcBusiTargetBillSub; import com.lzbi.draft.domain.DcBusiTargetBillSub;
@ -29,7 +31,7 @@ public interface DcBusiTargetBillMasterMapper extends BaseMapper<DcBusiTargetBil
* @return 统计指标录入集合 * @return 统计指标录入集合
*/ */
public List<DcBusiTargetBillMaster> selectDcBusiTargetBillMasterList(DcBusiTargetBillMaster dcBusiTargetBillMaster); public List<DcBusiTargetBillMaster> selectDcBusiTargetBillMasterList(DcBusiTargetBillMaster dcBusiTargetBillMaster);
public int updateDcBusiTargetBillMasterByVo(DcBusiTargetBillMaster dcBusiTargetBillMaster);
/** /**
* 新增统计指标录入 * 新增统计指标录入
* *

63
lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiTargetBillSubMapper.java

@ -0,0 +1,63 @@
package com.lzbi.draft.mapper;
import java.util.List;
import com.lzbi.draft.domain.DcBusiTargetBillSub;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* 指标数据采集录入明细Mapper接口
*
* @author zhousq
* @date 2023-12-19
*/
public interface DcBusiTargetBillSubMapper extends BaseMapper<DcBusiTargetBillSub>
{
/**
* 查询指标数据采集录入明细
*
* @param id 指标数据采集录入明细主键
* @return 指标数据采集录入明细
*/
public DcBusiTargetBillSub selectDcBusiTargetBillSubById(Long id);
/**
* 查询指标数据采集录入明细列表
*
* @param dcBusiTargetBillSub 指标数据采集录入明细
* @return 指标数据采集录入明细集合
*/
public List<DcBusiTargetBillSub> selectDcBusiTargetBillSubList(DcBusiTargetBillSub dcBusiTargetBillSub);
/**
* 新增指标数据采集录入明细
*
* @param dcBusiTargetBillSub 指标数据采集录入明细
* @return 结果
*/
public int insertDcBusiTargetBillSub(DcBusiTargetBillSub dcBusiTargetBillSub);
/**
* 修改指标数据采集录入明细
*
* @param dcBusiTargetBillSub 指标数据采集录入明细
* @return 结果
*/
public int updateDcBusiTargetBillSub(DcBusiTargetBillSub dcBusiTargetBillSub);
/**
* 删除指标数据采集录入明细
*
* @param id 指标数据采集录入明细主键
* @return 结果
*/
public int deleteDcBusiTargetBillSubById(Long id);
/**
* 批量删除指标数据采集录入明细
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteDcBusiTargetBillSubByIds(Long[] ids);
}

14
lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiParamBillMasterService.java

@ -72,11 +72,14 @@ public class DcBusiParamBillMasterService extends ServiceImpl<DcBusiParamBillMas
public int updateDcBusiParamBillMasterDao(DcBusiParamBillMaster dcBusiParamBillMasterDao) public int updateDcBusiParamBillMasterDao(DcBusiParamBillMaster dcBusiParamBillMasterDao)
{ {
dcBusiParamBillMasterDao.setUpdatedTime(DateUtils.getNowDate()); dcBusiParamBillMasterDao.setUpdatedTime(DateUtils.getNowDate());
baseMapper.deleteDcBusiParamBillSubDaoByBillNo(dcBusiParamBillMasterDao.getId()); baseMapper.deleteDcBusiParamBillSubDaoByBillNo(dcBusiParamBillMasterDao.getBillNo());
insertDcBusiParamBillSubDao(dcBusiParamBillMasterDao); insertDcBusiParamBillSubDao(dcBusiParamBillMasterDao);
return baseMapper.updateDcBusiParamBillMasterDao(dcBusiParamBillMasterDao); return baseMapper.updateDcBusiParamBillMasterDao(dcBusiParamBillMasterDao);
} }
public int checkBill(DcBusiParamBillMaster dcBusiParamBillMasterDao)
{
return baseMapper.updateDcBusiParamBillMasterByNo(dcBusiParamBillMasterDao);
}
/** /**
* 批量删除参数采集录入单据主 * 批量删除参数采集录入单据主
* *
@ -97,13 +100,6 @@ public class DcBusiParamBillMasterService extends ServiceImpl<DcBusiParamBillMas
* @param id 参数采集录入单据主主键 * @param id 参数采集录入单据主主键
* @return 结果 * @return 结果
*/ */
@Transactional
public int deleteDcBusiParamBillMasterDaoById(Long id)
{
baseMapper.deleteDcBusiParamBillSubDaoByBillNo(id);
return baseMapper.deleteDcBusiParamBillMasterDaoById(id);
}
/** /**
* 新增参数数据采集录入明细信息 * 新增参数数据采集录入明细信息

6
lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetBillMasterService.java

@ -3,6 +3,7 @@ package com.lzbi.draft.service;
import java.util.List; import java.util.List;
import com.lzbi.common.utils.DateUtils; import com.lzbi.common.utils.DateUtils;
import com.lzbi.common.utils.StringUtils; import com.lzbi.common.utils.StringUtils;
import com.lzbi.draft.domain.DcBusiParamBillMaster;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList; import java.util.ArrayList;
import com.lzbi.common.utils.DateUtils; import com.lzbi.common.utils.DateUtils;
@ -43,7 +44,10 @@ public class DcBusiTargetBillMasterService extends ServiceImpl<DcBusiTargetBillM
{ {
return baseMapper.selectDcBusiTargetBillMasterList(dcBusiTargetBillMaster); return baseMapper.selectDcBusiTargetBillMasterList(dcBusiTargetBillMaster);
} }
public int checkBill(DcBusiTargetBillMaster dcBusiTargetBillMaster)
{
return baseMapper.updateDcBusiTargetBillMasterByVo(dcBusiTargetBillMaster);
}
/** /**
* 新增统计指标录入 * 新增统计指标录入
* *

91
lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetBillSubService.java

@ -0,0 +1,91 @@
package com.lzbi.draft.service;
import java.util.List;
import com.lzbi.common.utils.DateUtils;
import org.springframework.stereotype.Service;
import com.lzbi.draft.domain.DcBusiTargetBillSub;
import com.lzbi.draft.mapper.DcBusiTargetBillSubMapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* 指标数据采集录入明细Service业务层处理
*
* @author zhousq
* @date 2023-12-19
*/
@Service
public class DcBusiTargetBillSubService extends ServiceImpl<DcBusiTargetBillSubMapper, DcBusiTargetBillSub> implements IService<DcBusiTargetBillSub>
{
/**
* 查询指标数据采集录入明细
*
* @param id 指标数据采集录入明细主键
* @return 指标数据采集录入明细
*/
public DcBusiTargetBillSub selectDcBusiTargetBillSubById(Long id)
{
return baseMapper.selectDcBusiTargetBillSubById(id);
}
/**
* 查询指标数据采集录入明细列表
*
* @param dcBusiTargetBillSub 指标数据采集录入明细
* @return 指标数据采集录入明细
*/
public List<DcBusiTargetBillSub> selectDcBusiTargetBillSubList(DcBusiTargetBillSub dcBusiTargetBillSub)
{
return baseMapper.selectDcBusiTargetBillSubList(dcBusiTargetBillSub);
}
/**
* 新增指标数据采集录入明细
*
* @param dcBusiTargetBillSub 指标数据采集录入明细
* @return 结果
*/
public int insertDcBusiTargetBillSub(DcBusiTargetBillSub dcBusiTargetBillSub)
{
dcBusiTargetBillSub.setCreatedTime(DateUtils.getNowDate());
return baseMapper.insertDcBusiTargetBillSub(dcBusiTargetBillSub);
}
/**
* 修改指标数据采集录入明细
*
* @param dcBusiTargetBillSub 指标数据采集录入明细
* @return 结果
*/
public int updateDcBusiTargetBillSub(DcBusiTargetBillSub dcBusiTargetBillSub)
{
dcBusiTargetBillSub.setUpdatedTime(DateUtils.getNowDate());
return baseMapper.updateDcBusiTargetBillSub(dcBusiTargetBillSub);
}
/**
* 批量删除指标数据采集录入明细
*
* @param ids 需要删除的指标数据采集录入明细主键
* @return 结果
*/
public int deleteDcBusiTargetBillSubByIds(Long[] ids)
{
return baseMapper.deleteDcBusiTargetBillSubByIds(ids);
}
/**
* 删除指标数据采集录入明细信息
*
* @param id 指标数据采集录入明细主键
* @return 结果
*/
public int deleteDcBusiTargetBillSubById(Long id)
{
return baseMapper.deleteDcBusiTargetBillSubById(id);
}
}

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

@ -83,6 +83,10 @@ public class DcBaseAssetTargetController extends BaseController
@PostMapping @PostMapping
public AjaxResult add(@RequestBody DcBaseAssetTarget dcBaseAssetTarget) public AjaxResult add(@RequestBody DcBaseAssetTarget dcBaseAssetTarget)
{ {
dcBaseAssetTarget.setCreatedTime(DateUtils.getNowDate());
dcBaseAssetTarget.setCreatedBy(String.valueOf(getUserId()));
dcBaseAssetTarget.setDeptId(getDeptId());
dcBaseAssetTarget.setUserId(getUserId());
return toAjax(dcBaseAssetTargetService.insertDcBaseAssetTarget(dcBaseAssetTarget)); return toAjax(dcBaseAssetTargetService.insertDcBaseAssetTarget(dcBaseAssetTarget));
} }
@ -94,6 +98,8 @@ public class DcBaseAssetTargetController extends BaseController
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody DcBaseAssetTarget dcBaseAssetTarget) public AjaxResult edit(@RequestBody DcBaseAssetTarget dcBaseAssetTarget)
{ {
dcBaseAssetTarget.setUpdatedTime(DateUtils.getNowDate());
dcBaseAssetTarget.setUpdatedBy(String.valueOf(getUserId()));
return toAjax(dcBaseAssetTargetService.updateDcBaseAssetTarget(dcBaseAssetTarget)); return toAjax(dcBaseAssetTargetService.updateDcBaseAssetTarget(dcBaseAssetTarget));
} }
@ -140,10 +146,9 @@ public class DcBaseAssetTargetController extends BaseController
beanObject.remove("id"); beanObject.remove("id");
DcBaseAssetTarget dcBaseAssetTarget = JSON.toJavaObject(beanObject, DcBaseAssetTarget.class); DcBaseAssetTarget dcBaseAssetTarget = JSON.toJavaObject(beanObject, DcBaseAssetTarget.class);
dcBaseAssetTarget.setCreatedTime(DateUtils.getNowDate()); dcBaseAssetTarget.setCreatedTime(DateUtils.getNowDate());
dcBaseAssetTarget.setCreatedBy(String.valueOf(getUserId()));
dcBaseAssetTarget.setDeptId(getDeptId()); dcBaseAssetTarget.setDeptId(getDeptId());
dcBaseAssetTarget.setUserId(getUserId()); dcBaseAssetTarget.setUserId(getUserId());
dcBaseAssetTarget.setCreatedBy(String.valueOf(getUserId()));
dcBaseAssetTarget.setCreatedTime(DateUtils.getNowDate());
beanList.add(dcBaseAssetTarget); beanList.add(dcBaseAssetTarget);
} }
} catch (Exception e) { } catch (Exception e) {

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

@ -101,9 +101,13 @@ public class DcBaseTargetModelController extends BaseController
@PreAuthorize("@ss.hasPermi('target:targetModel:add')") @PreAuthorize("@ss.hasPermi('target:targetModel:add')")
@Log(title = "指标模版配置", businessType = BusinessType.INSERT) @Log(title = "指标模版配置", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody DcBaseTargetModel DcBaseTargetModel) public AjaxResult add(@RequestBody DcBaseTargetModel dcBaseTargetModel)
{ {
return toAjax(dcBaseTargetModelService.insertDcBaseTargetModel(DcBaseTargetModel)); dcBaseTargetModel.setCreatedTime(DateUtils.getNowDate());
dcBaseTargetModel.setCreatedBy(String.valueOf(getUserId()));
dcBaseTargetModel.setDeptId(getDeptId());
dcBaseTargetModel.setUserId(getUserId());
return toAjax(dcBaseTargetModelService.insertDcBaseTargetModel(dcBaseTargetModel));
} }
/** /**
@ -117,9 +121,11 @@ public class DcBaseTargetModelController extends BaseController
@PreAuthorize("@ss.hasPermi('target:targetModel:edit')") @PreAuthorize("@ss.hasPermi('target:targetModel:edit')")
@Log(title = "指标模版配置", businessType = BusinessType.UPDATE) @Log(title = "指标模版配置", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody DcBaseTargetModel DcBaseTargetModel) public AjaxResult edit(@RequestBody DcBaseTargetModel dcBaseTargetModel)
{ {
return toAjax(dcBaseTargetModelService.updateDcBaseTargetModel(DcBaseTargetModel)); dcBaseTargetModel.setUpdatedTime(DateUtils.getNowDate());
dcBaseTargetModel.setUpdatedBy(String.valueOf(getUserId()));
return toAjax(dcBaseTargetModelService.updateDcBaseTargetModel(dcBaseTargetModel));
} }
/** /**
@ -157,10 +163,9 @@ public class DcBaseTargetModelController extends BaseController
beanObject.remove("id"); beanObject.remove("id");
DcBaseTargetModel dcBaseTargetModel = JSON.toJavaObject(beanObject, DcBaseTargetModel.class); DcBaseTargetModel dcBaseTargetModel = JSON.toJavaObject(beanObject, DcBaseTargetModel.class);
dcBaseTargetModel.setCreatedTime(DateUtils.getNowDate()); dcBaseTargetModel.setCreatedTime(DateUtils.getNowDate());
dcBaseTargetModel.setCreatedBy(String.valueOf(getUserId()));
dcBaseTargetModel.setDeptId(getDeptId()); dcBaseTargetModel.setDeptId(getDeptId());
dcBaseTargetModel.setUserId(getUserId()); dcBaseTargetModel.setUserId(getUserId());
dcBaseTargetModel.setCreatedBy(String.valueOf(getUserId()));
dcBaseTargetModel.setCreatedTime(DateUtils.getNowDate());
beanList.add(dcBaseTargetModel); beanList.add(dcBaseTargetModel);
} }
} catch (Exception e) { } catch (Exception e) {

49
lzbi-module/src/main/java/com/lzbi/targetFolder/domain/DcBaseAssetTarget.java

@ -2,8 +2,9 @@ package com.lzbi.targetFolder.domain;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import lombok.experimental.Accessors;
import lombok.Data; import lombok.Data;
import io.swagger.annotations.ApiModelProperty;
import lombok.experimental.Accessors;
import com.lzbi.common.annotation.Excel; import com.lzbi.common.annotation.Excel;
import com.lzbi.module.base.BaseModuleEntity; import com.lzbi.module.base.BaseModuleEntity;
@ -11,7 +12,7 @@ import com.lzbi.module.base.BaseModuleEntity;
* 资产指标配置对象 dc_base_asset_target * 资产指标配置对象 dc_base_asset_target
* *
* @author Lu.JL * @author Lu.JL
* @date 2023-12-14 * @date 2023-12-19
*/ */
@Data @Data
@Accessors(chain = true) @Accessors(chain = true)
@ -21,70 +22,106 @@ public class DcBaseAssetTarget extends BaseModuleEntity
/** 统计单元编码 */ /** 统计单元编码 */
@Excel(name = "统计单元编码") @Excel(name = "统计单元编码")
@ApiModelProperty(name = "统计单元编码",notes = "assetCode")
private String assetCode; private String assetCode;
/** 统计单元ID */ /** 统计单元ID */
@Excel(name = "统计单元ID") @Excel(name = "统计单元ID")
@ApiModelProperty(name = "统计单元ID",notes = "assetId")
private Long assetId; private Long assetId;
/** 指标模型编码 */ /** 指标模型编码 */
@Excel(name = "指标模型编码") @Excel(name = "指标模型编码")
@ApiModelProperty(name = "指标模型编码",notes = "targetModelCode")
private String targetModelCode; private String targetModelCode;
/** 指标名称 */ /** 指标名称 */
@Excel(name = "指标名称") @Excel(name = "指标名称")
@ApiModelProperty(name = "指标名称",notes = "targetName")
private String targetName; private String targetName;
/** 指标别名 */ /** 指标别名 */
@Excel(name = "指标别名") @Excel(name = "指标别名")
@ApiModelProperty(name = "指标别名",notes = "targetNameAlias")
private String targetNameAlias; private String targetNameAlias;
/** 指标编码 */ /** 指标编码 */
@Excel(name = "指标编码") @Excel(name = "指标编码")
@ApiModelProperty(name = "指标编码",notes = "targetCode")
private String targetCode; private String targetCode;
/** 所属专业 */ /** 所属专业 */
@Excel(name = "所属专业") @Excel(name = "所属专业")
private String targetField; @ApiModelProperty(name = "所属专业",notes = "fieldCode")
private String fieldCode;
/** 上限 */ /** 上限 */
@Excel(name = "上限") @Excel(name = "上限")
@ApiModelProperty(name = "上限",notes = "limitUp")
private BigDecimal limitUp; private BigDecimal limitUp;
/** 下限 */ /** 下限 */
@Excel(name = "下限") @Excel(name = "下限")
@ApiModelProperty(name = "下限",notes = "limitDown")
private BigDecimal limitDown; private BigDecimal limitDown;
/** 值 */ /** 值 */
@Excel(name = "值") @Excel(name = "值")
@ApiModelProperty(name = "值",notes = "valueBase")
private BigDecimal valueBase; private BigDecimal valueBase;
/** 是否均值 */ /** 是否均值 */
@Excel(name = "是否均值") @Excel(name = "是否均值")
@ApiModelProperty(name = "是否均值",notes = "flagAvg")
private String flagAvg; private String flagAvg;
/** 是否汇总 */ /** 是否汇总 */
@Excel(name = "是否汇总") @Excel(name = "是否汇总")
@ApiModelProperty(name = "是否汇总",notes = "flagSum")
private String flagSum; private String flagSum;
/** 是否积算 */ /** 是否积算 */
@Excel(name = "是否积算") @Excel(name = "是否积算")
@ApiModelProperty(name = "是否积算",notes = "flagCompute")
private String flagCompute; private String flagCompute;
/** $column.columnComment */ /** */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") @Excel(name = "")
@ApiModelProperty(name = "",notes = "sort")
private String sort; private String sort;
/** 所属专业名称 */ /** 所属专业名称 */
@Excel(name = "所属专业名称") @Excel(name = "所属专业名称")
private String targetFieldName; @ApiModelProperty(name = "所属专业名称",notes = "fieldName")
private String fieldName;
/** T指标P参数 */ /** T指标P参数 */
@Excel(name = "T指标P参数") @Excel(name = "T指标P参数")
@ApiModelProperty(name = "T指标P参数",notes = "columnType")
private String columnType; private String columnType;
/** 单位 */ /** 单位 */
@Excel(name = "单位") @Excel(name = "单位")
@ApiModelProperty(name = "单位",notes = "fieldUnit")
private String fieldUnit; private String fieldUnit;
/** 部门id */
@Excel(name = "部门id")
@ApiModelProperty(name = "部门id",notes = "deptId")
private Long deptId;
/** 用户id */
@Excel(name = "用户id")
@ApiModelProperty(name = "用户id",notes = "userId")
private Long userId;
public String getValue() {
return this.targetCode;
}
public String getLabel() {
return this.targetName;
}
} }

136
lzbi-module/src/main/resources/mapper/asset/DcBaseAssetInfoMapper.xml

@ -4,64 +4,95 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.lzbi.asset.mapper.DcBaseAssetInfoMapper"> <mapper namespace="com.lzbi.asset.mapper.DcBaseAssetInfoMapper">
<resultMap type="com.lzbi.asset.domain.DcBaseAssetInfo" id="DcBaseAssetInfoResult"> <resultMap type="DcBaseAssetInfo" id="DcBaseAssetInfoResult">
<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"/>
<result property="createdTime" column="created_time" /> <result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="updated_by" /> <result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="updated_time" /> <result property="updatedTime" column="UPDATED_TIME"/>
<result property="deleteBy" column="delete_by" /> <result property="deleteBy" column="DELETE_BY"/>
<result property="deleteTime" column="delete_time" /> <result property="deleteTime" column="DELETE_TIME"/>
<result property="id" column="id" /> <result property="id" column="id"/>
<result property="assetName" column="asset_name" /> <result property="assetName" column="asset_name"/>
<result property="assetCode" column="asset_code" /> <result property="assetCode" column="asset_code"/>
<result property="assetClass" column="asset_class" /> <result property="assetClass" column="asset_class"/>
<result property="flagValidateDept" column="flag_validate_dept" /> <result property="flagValidateDept" column="flag_validate_dept"/>
<result property="flagValidateRole" column="flag_validate_role" /> <result property="flagValidateRole" column="flag_validate_role"/>
<result property="flagValidateUser" column="flag_validate_user" /> <result property="flagValidateUser" column="flag_validate_user"/>
<result property="statusAsset" column="status_asset" /> <result property="statusAsset" column="status_asset"/>
<result property="comanyId" column="comany_id" /> <result property="comanyId" column="comany_id"/>
<result property="deptId" column="dept_id" /> <result property="deptId" column="dept_id"/>
<result property="userId" column="user_id" />
</resultMap> </resultMap>
<sql id="selectDcBaseAssetInfoVo"> <sql id="selectDcBaseAssetInfoVo">
select tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time, id, asset_name, asset_code, asset_class, flag_validate_dept, flag_validate_role, flag_validate_user, status_asset, comany_id, dept_id, user_id from dc_base_asset_info select TENANT_ID,
REVISION,
CREATED_BY,
CREATED_TIME,
UPDATED_BY,
UPDATED_TIME,
DELETE_BY,
DELETE_TIME,
id,
asset_name,
asset_code,
asset_class,
flag_validate_dept,
flag_validate_role,
flag_validate_user,
status_asset,
comany_id,
dept_id
from dc_base_asset_info
</sql> </sql>
<select id="selectDcBaseAssetInfoList" parameterType="DcBaseAssetInfo" resultMap="DcBaseAssetInfoResult"> <select id="selectDcBaseAssetInfoList" parameterType="DcBaseAssetInfo" resultMap="DcBaseAssetInfoResult">
<include refid="selectDcBaseAssetInfoVo"/> <include refid="selectDcBaseAssetInfoVo"/>
<where> <where>
<if test="assetName != null and assetName != ''"> and asset_name like concat('%', #{assetName}, '%')</if> <if test="assetName != null and assetName != ''">and asset_name like concat('%', #{assetName}, '%')</if>
<if test="assetCode != null and assetCode != ''"> and asset_code = #{assetCode}</if> <if test="assetCode != null and assetCode != ''">and asset_code = #{assetCode}</if>
<if test="assetClass != null and assetClass != ''"> and asset_class = #{assetClass}</if> <if test="assetClass != null and assetClass != ''">and asset_class = #{assetClass}</if>
<if test="flagValidateDept != null and flagValidateDept != ''"> and flag_validate_dept = #{flagValidateDept}</if> <if test="flagValidateDept != null and flagValidateDept != ''">and flag_validate_dept =
<if test="flagValidateRole != null and flagValidateRole != ''"> and flag_validate_role = #{flagValidateRole}</if> #{flagValidateDept}
<if test="flagValidateUser != null and flagValidateUser != ''"> and flag_validate_user = #{flagValidateUser}</if> </if>
<if test="statusAsset != null and statusAsset != ''"> and status_asset = #{statusAsset}</if> <if test="flagValidateRole != null and flagValidateRole != ''">and flag_validate_role =
<if test="comanyId != null "> and comany_id = #{comanyId}</if> #{flagValidateRole}
<if test="deptId != null "> and dept_id = #{deptId}</if> </if>
<if test="userId != null "> and user_id = #{userId}</if> <if test="flagValidateUser != null and flagValidateUser != ''">and flag_validate_user =
#{flagValidateUser}
</if>
<if test="statusAsset != null and statusAsset != ''">and status_asset = #{statusAsset}</if>
<if test="comanyId != null ">and comany_id = #{comanyId}</if>
<if test="deptId != null ">and dept_id = #{deptId}</if>
</where> </where>
ORDER BY COALESCE(updated_time, created_time) DESC
</select> </select>
<select id="selectDcBaseAssetInfoById" parameterType="Long" resultMap="DcBaseAssetInfoResult"> <select id="selectDcBaseAssetInfoById" parameterType="Long" resultMap="DcBaseAssetInfoResult">
<include refid="selectDcBaseAssetInfoVo"/> <include refid="selectDcBaseAssetInfoVo"/>
where id = #{id} where id = #{id}
</select> </select>
<select id="selectDcBaseAssetInfoByCode" parameterType="String" resultMap="DcBaseAssetInfoResult">
<include refid="selectDcBaseAssetInfoVo"/>
where asset_code = #{assetCode}
</select>
<!--add by zhousq 2023-12-12 -->
<select id="selectDcBaseAssetInfoMap" resultType="hashmap">
select asset_code,
asset_name
from dc_base_asset_info
</select>
<insert id="insertDcBaseAssetInfo" parameterType="DcBaseAssetInfo" useGeneratedKeys="true" keyProperty="id"> <insert id="insertDcBaseAssetInfo" parameterType="DcBaseAssetInfo" useGeneratedKeys="true" keyProperty="id">
insert into dc_base_asset_info insert into dc_base_asset_info
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="tenantId != null">tenant_id,</if> <if test="tenantId != null">TENANT_ID,</if>
<if test="revision != null">revision,</if> <if test="revision != null">REVISION,</if>
<if test="createdBy != null">created_by,</if> <if test="createdBy != null">CREATED_BY,</if>
<if test="createdTime != null">created_time,</if> <if test="createdTime != null">CREATED_TIME,</if>
<if test="updatedBy != null">updated_by,</if> <if test="updatedBy != null">UPDATED_BY,</if>
<if test="updatedTime != null">updated_time,</if> <if test="updatedTime != null">UPDATED_TIME,</if>
<if test="deleteBy != null">delete_by,</if> <if test="deleteBy != null">DELETE_BY,</if>
<if test="deleteTime != null">delete_time,</if> <if test="deleteTime != null">DELETE_TIME,</if>
<if test="assetName != null and assetName != ''">asset_name,</if> <if test="assetName != null and assetName != ''">asset_name,</if>
<if test="assetCode != null and assetCode != ''">asset_code,</if> <if test="assetCode != null and assetCode != ''">asset_code,</if>
<if test="assetClass != null and assetClass != ''">asset_class,</if> <if test="assetClass != null and assetClass != ''">asset_class,</if>
@ -71,7 +102,6 @@
<if test="statusAsset != null">status_asset,</if> <if test="statusAsset != null">status_asset,</if>
<if test="comanyId != null">comany_id,</if> <if test="comanyId != null">comany_id,</if>
<if test="deptId != null">dept_id,</if> <if test="deptId != null">dept_id,</if>
<if test="userId != null">user_id,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="tenantId != null">#{tenantId},</if> <if test="tenantId != null">#{tenantId},</if>
@ -91,21 +121,20 @@
<if test="statusAsset != null">#{statusAsset},</if> <if test="statusAsset != null">#{statusAsset},</if>
<if test="comanyId != null">#{comanyId},</if> <if test="comanyId != null">#{comanyId},</if>
<if test="deptId != null">#{deptId},</if> <if test="deptId != null">#{deptId},</if>
<if test="userId != null">#{userId},</if>
</trim> </trim>
</insert> </insert>
<update id="updateDcBaseAssetInfo" parameterType="DcBaseAssetInfo"> <update id="updateDcBaseAssetInfo" parameterType="DcBaseAssetInfo">
update dc_base_asset_info update dc_base_asset_info
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="tenantId != null">tenant_id = #{tenantId},</if> <if test="tenantId != null">TENANT_ID = #{tenantId},</if>
<if test="revision != null">revision = #{revision},</if> <if test="revision != null">REVISION = #{revision},</if>
<if test="createdBy != null">created_by = #{createdBy},</if> <if test="createdBy != null">CREATED_BY = #{createdBy},</if>
<if test="createdTime != null">created_time = #{createdTime},</if> <if test="createdTime != null">CREATED_TIME = #{createdTime},</if>
<if test="updatedBy != null">updated_by = #{updatedBy},</if> <if test="updatedBy != null">UPDATED_BY = #{updatedBy},</if>
<if test="updatedTime != null">updated_time = #{updatedTime},</if> <if test="updatedTime != null">UPDATED_TIME = #{updatedTime},</if>
<if test="deleteBy != null">delete_by = #{deleteBy},</if> <if test="deleteBy != null">DELETE_BY = #{deleteBy},</if>
<if test="deleteTime != null">delete_time = #{deleteTime},</if> <if test="deleteTime != null">DELETE_TIME = #{deleteTime},</if>
<if test="assetName != null and assetName != ''">asset_name = #{assetName},</if> <if test="assetName != null and assetName != ''">asset_name = #{assetName},</if>
<if test="assetCode != null and assetCode != ''">asset_code = #{assetCode},</if> <if test="assetCode != null and assetCode != ''">asset_code = #{assetCode},</if>
<if test="assetClass != null and assetClass != ''">asset_class = #{assetClass},</if> <if test="assetClass != null and assetClass != ''">asset_class = #{assetClass},</if>
@ -115,13 +144,14 @@
<if test="statusAsset != null">status_asset = #{statusAsset},</if> <if test="statusAsset != null">status_asset = #{statusAsset},</if>
<if test="comanyId != null">comany_id = #{comanyId},</if> <if test="comanyId != null">comany_id = #{comanyId},</if>
<if test="deptId != null">dept_id = #{deptId},</if> <if test="deptId != null">dept_id = #{deptId},</if>
<if test="userId != null">user_id = #{userId},</if>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>
<delete id="deleteDcBaseAssetInfoById" parameterType="Long"> <delete id="deleteDcBaseAssetInfoById" parameterType="Long">
delete from dc_base_asset_info where id = #{id} delete
from dc_base_asset_info
where id = #{id}
</delete> </delete>
<delete id="deleteDcBaseAssetInfoByIds" parameterType="String"> <delete id="deleteDcBaseAssetInfoByIds" parameterType="String">

1
lzbi-module/src/main/resources/mapper/asset/DcBaseParamModelMapper.xml

@ -74,6 +74,7 @@
<if test="flagStatus != null and flagStatus != ''"> and flag_status = #{flagStatus}</if> <if test="flagStatus != null and flagStatus != ''"> and flag_status = #{flagStatus}</if>
</where> </where>
ORDER BY COALESCE(updated_time, created_time) DESC
</select> </select>
<insert id="insertByVo" parameterType="com.lzbi.asset.domain.DcBaseParamModel"> <insert id="insertByVo" parameterType="com.lzbi.asset.domain.DcBaseParamModel">
insert into dc_base_param_model insert into dc_base_param_model

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

@ -6,7 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="com.lzbi.special.domain.DcBaseWorkSpecial" 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" />
<result property="createdTime" column="CREATED_TIME" /> <result property="createdTime" column="CREATED_TIME" />
<result property="updatedBy" column="UPDATED_BY" /> <result property="updatedBy" column="UPDATED_BY" />

35
lzbi-module/src/main/resources/mapper/asset/DcBusiParamBillMasterMapper.xml

@ -20,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="checkType" column="check_type" /> <result property="checkType" column="check_type" />
<result property="checkStatus" column="check_status" /> <result property="checkStatus" column="check_status" />
<result property="companyId" column="company_id" /> <result property="companyId" column="company_id" />
<result property="companyName" column="companyName" /> <result property="companyName" column="company_name" />
<result property="organizeName" column="organize_name" /> <result property="organizeName" column="organize_name" />
<result property="oragnizeId" column="oragnize_id" /> <result property="oragnizeId" column="oragnize_id" />
@ -52,7 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectDcBusiParamBillMasterVo"> <sql id="selectDcBusiParamBillMasterVo">
select TENANT_ID, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, DELETE_BY, DELETE_TIME, id, bill_no, bill_income_date, bill_type, check_type, check_status from dc_busi_param_bill_master select TENANT_ID, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, DELETE_BY, DELETE_TIME, id, bill_no, bill_income_date, bill_type, check_type, check_status,company_id,company_name,organize_name,oragnize_id from dc_busi_param_bill_master
</sql> </sql>
<select id="selectDcBusiParamBillMasterDaoList" parameterType="DcBusiParamBillMaster" resultMap="DcBusiParamBillMasterResult"> <select id="selectDcBusiParamBillMasterDaoList" parameterType="DcBusiParamBillMaster" resultMap="DcBusiParamBillMasterResult">
@ -63,6 +63,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="billType != null and billType != ''"> and bill_type = #{billType}</if> <if test="billType != null and billType != ''"> and bill_type = #{billType}</if>
<if test="checkType != null and checkType != ''"> and check_type = #{checkType}</if> <if test="checkType != null and checkType != ''"> and check_type = #{checkType}</if>
<if test="checkStatus != null and checkStatus != ''"> and check_status = #{checkStatus}</if> <if test="checkStatus != null and checkStatus != ''"> and check_status = #{checkStatus}</if>
<if test="createdBy != null and createdBy != ''"> and CREATED_BY = #{createdBy}</if>
<if test="companyId != null "> and company_id = #{companyId}</if>
<if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if>
<if test="organizeName != null and organizeName != ''"> and organize_name like concat('%', #{organizeName}, '%')</if>
<if test="oragnizeId != null "> and oragnize_id = #{oragnizeId}</if>
</where> </where>
</select> </select>
@ -135,7 +141,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>
<update id="updateDcBusiParamBillMasterByNo" parameterType="DcBusiParamBillMaster">
update dc_busi_param_bill_master
<trim prefix="SET" suffixOverrides=",">
<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>
<if test="billIncomeDate != null">bill_income_date = #{billIncomeDate},</if>
<if test="billType != null">bill_type = #{billType},</if>
<if test="checkType != null">check_type = #{checkType},</if>
<if test="checkStatus != null">check_status = #{checkStatus},</if>
</trim>
where bill_no = #{billNo}
</update>
<delete id="deleteDcBusiParamBillMasterDaoById" parameterType="Long"> <delete id="deleteDcBusiParamBillMasterDaoById" parameterType="Long">
delete from dc_busi_param_bill_master where id = #{id} delete from dc_busi_param_bill_master where id = #{id}
</delete> </delete>
@ -154,14 +177,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach> </foreach>
</delete> </delete>
<delete id="deleteDcBusiParamBillSubDaoByBillNo" parameterType="Long"> <delete id="deleteDcBusiParamBillSubDaoByBillNo" parameterType="String">
delete from dc_busi_param_bill_sub where bill_no = #{billNo} delete from dc_busi_param_bill_sub where bill_no = #{billNo}
</delete> </delete>
<insert id="batchDcBusiParamBillSubDao"> <insert id="batchDcBusiParamBillSubDao">
insert into dc_busi_param_bill_sub( TENANT_ID, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, DELETE_BY, DELETE_TIME, id, bill_no, asset_code,asset_name, field_code, field_name, param_code, param_value,count_date,count_hour) values insert into dc_busi_param_bill_sub( TENANT_ID, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, DELETE_BY, DELETE_TIME, id, bill_no, asset_code,asset_name, field_code, field_name, param_code, param_value,count_date,count_hour,param_name) values
<foreach item="item" index="index" collection="list" separator=","> <foreach item="item" index="index" collection="list" separator=",">
( #{item.tenantId}, #{item.createdBy}, #{item.createdTime}, #{item.updatedBy}, #{item.updatedTime}, #{item.deleteBy}, #{item.deleteTime}, #{item.id}, #{item.billNo}, #{item.assetCode}, #{item.assetName}, #{item.fieldCode}, #{item.fieldName},#{item.paramCode}, #{item.paramValue}, #{item.countDate}, #{item.countHour}) ( #{item.tenantId}, #{item.createdBy}, #{item.createdTime}, #{item.updatedBy}, #{item.updatedTime}, #{item.deleteBy}, #{item.deleteTime}, #{item.id}, #{item.billNo}, #{item.assetCode}, #{item.assetName}, #{item.fieldCode}, #{item.fieldName},#{item.paramCode}, #{item.paramValue}, #{item.countDate}, #{item.countHour},#{item.paramName})
</foreach> </foreach>
</insert> </insert>
</mapper> </mapper>

15
lzbi-module/src/main/resources/mapper/asset/DcBusiParamBillSubMapper.xml

@ -14,7 +14,8 @@
<!-- 统计单元名称 --> <!-- 统计单元名称 -->
<result property="assetName" column="asset_name"/> <result property="assetName" column="asset_name"/>
<!-- 所属专业 --> <!-- 所属专业 -->
<result property="fieldType" column="field_type"/> <result property="fieldCode" column="field_code"/>
<result property="fieldName" column="field_name"/>
<!-- 指标名称 --> <!-- 指标名称 -->
<result property="paramName" column="param_name"/> <result property="paramName" column="param_name"/>
<!-- 指标编码 --> <!-- 指标编码 -->
@ -50,7 +51,8 @@
bill_no, bill_no,
asset_code, asset_code,
asset_name, asset_name,
field_type, field_code,
field_name,
param_name, param_name,
param_code, param_code,
param_uint, param_uint,
@ -74,7 +76,8 @@
<if test="billNo != null and billNo != ''"> and bill_no = #{billNo}</if> <if test="billNo != null and billNo != ''"> and bill_no = #{billNo}</if>
<if test="assetCode != null and assetCode != ''"> and asset_code = #{assetCode}</if> <if test="assetCode != null and assetCode != ''"> and asset_code = #{assetCode}</if>
<if test="assetName != null and assetName != ''"> and asset_name = #{assetName}</if> <if test="assetName != null and assetName != ''"> and asset_name = #{assetName}</if>
<if test="fieldType != null and fieldType != ''"> and field_type = #{fieldType}</if> <if test="fieldCode != null and fieldCode != ''"> and field_code = #{fieldCode}</if>
<if test="fieldName != null and fieldName != ''"> and field_name = #{fieldName}</if>
<if test="paramName != null and paramName != ''"> and param_name = #{paramName}</if> <if test="paramName != null and paramName != ''"> and param_name = #{paramName}</if>
<if test="paramCode != null and paramCode != ''"> and param_code = #{paramCode}</if> <if test="paramCode != null and paramCode != ''"> and param_code = #{paramCode}</if>
<if test="paramUint != null and paramUint != ''"> and param_uint = #{paramUint}</if> <if test="paramUint != null and paramUint != ''"> and param_uint = #{paramUint}</if>
@ -99,7 +102,8 @@
<if test="billNo != null and billNo != ''">bill_no,</if> <if test="billNo != null and billNo != ''">bill_no,</if>
<if test="assetCode != null and assetCode != ''">asset_code,</if> <if test="assetCode != null and assetCode != ''">asset_code,</if>
<if test="assetName != null and assetName != ''">asset_name,</if> <if test="assetName != null and assetName != ''">asset_name,</if>
<if test="fieldType != null and fieldType != ''">field_type,</if> <if test="fieldCode != null and fieldCode != ''">field_code,</if>
<if test="fieldName != null and fieldName != ''">field_name,</if>
<if test="paramName != null and paramName != ''">param_name,</if> <if test="paramName != null and paramName != ''">param_name,</if>
<if test="paramCode != null and paramCode != ''">param_code,</if> <if test="paramCode != null and paramCode != ''">param_code,</if>
<if test="paramUint != null and paramUint != ''">param_uint,</if> <if test="paramUint != null and paramUint != ''">param_uint,</if>
@ -120,7 +124,8 @@
<if test="billNo != null and billNo != ''">#{billNo},</if> <if test="billNo != null and billNo != ''">#{billNo},</if>
<if test="assetCode != null and assetCode != ''">#{assetCode},</if> <if test="assetCode != null and assetCode != ''">#{assetCode},</if>
<if test="assetName != null and assetName != ''">#{assetName},</if> <if test="assetName != null and assetName != ''">#{assetName},</if>
<if test="fieldType != null and fieldType != ''">#{fieldType},</if> <if test="fieldCode != null and fieldCode != ''">#{fieldCode},</if>
<if test="fieldName != null and fieldName != ''">#{fieldName},</if>
<if test="paramName != null and paramName != ''">#{paramName},</if> <if test="paramName != null and paramName != ''">#{paramName},</if>
<if test="paramCode != null and paramCode != ''">#{paramCode},</if> <if test="paramCode != null and paramCode != ''">#{paramCode},</if>
<if test="paramUint != null and paramUint != ''">#{paramUint},</if> <if test="paramUint != null and paramUint != ''">#{paramUint},</if>

2
lzbi-module/src/main/resources/mapper/draft/DcBusiBillModelMasterMapper.xml

@ -74,7 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDcBusiBillModelMasterById" parameterType="Long" resultMap="DcBusiBillModelMasterDcBusiBillModelSubResult"> <select id="selectDcBusiBillModelMasterById" parameterType="Long" resultMap="DcBusiBillModelMasterDcBusiBillModelSubResult">
select a.tenant_id, a.revision, a.created_by, a.created_time, a.updated_by, a.updated_time, a.delete_by, a.delete_time, a.dept_id, a.role_id, a.bill_model_no, a.bill_model_name, a.field_code, a.company_name, a.company_id, a.bill_model_point, a.org_name, a.org_id, a.id, a.data_state, a.use_state, a.field_name,a.model_type, select a.tenant_id, a.revision, a.created_by, a.created_time, a.updated_by, a.updated_time, a.delete_by, a.delete_time, a.dept_id, a.role_id, a.bill_model_no, a.bill_model_name, a.field_code, a.company_name, a.company_id, a.bill_model_point, a.org_name, a.org_id, a.id, a.data_state, a.use_state, a.field_name,a.model_type,
b.bill_model_no as sub_bill_model_no, b.asset_code as sub_asset_code, b.asset_name as sub_asset_name, b.asset_unit_code as sub_asset_unit_code, b.asset_unit_name as sub_asset_unit_name, b.asset_unit_type as sub_asset_unit_type, b.id as sub_id, b.asset_id as sub_asset_id,asset_unit_alials_name as sub_asset_unit_alials_name,a_unit as sub_a_unit b.bill_model_no as sub_bill_model_no, b.asset_code as sub_asset_code, b.asset_name as sub_asset_name, b.asset_unit_code as sub_asset_unit_code, b.asset_unit_name as sub_asset_unit_name, b.asset_unit_type as sub_asset_unit_type, b.id as sub_id, b.asset_id as sub_asset_id,b.asset_unit_alials_name as sub_asset_unit_alials_name,b.a_unit as sub_a_unit
from dc_busi_bill_model_master a from dc_busi_bill_model_master a
left join dc_busi_bill_model_sub b on b.bill_model_no = a.bill_model_no left join dc_busi_bill_model_sub b on b.bill_model_no = a.bill_model_no
where a.id = #{id} where a.id = #{id}

23
lzbi-module/src/main/resources/mapper/draft/DcBusiTargetBillMasterMapper.xml

@ -144,7 +144,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>
<update id="updateDcBusiTargetBillMasterByVo" parameterType="DcBusiTargetBillMaster">
update dc_busi_target_bill_master
<trim prefix="SET" suffixOverrides=",">
<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>
<if test="billIncomeDate != null">bill_income_date = #{billIncomeDate},</if>
<if test="billType != null">bill_type = #{billType},</if>
<if test="checkType != null">check_type = #{checkType},</if>
<if test="checkStatus != null">check_status = #{checkStatus},</if>
<if test="companyId != null">company_id = #{companyId},</if>
<if test="companyName != null">company_name = #{companyName},</if>
<if test="organizeName != null">organize_name = #{organizeName},</if>
<if test="oragnizeId != null">oragnize_id = #{oragnizeId},</if>
</trim>
where bill_no = #{billNo}
</update>
<delete id="deleteDcBusiTargetBillMasterById" parameterType="Long"> <delete id="deleteDcBusiTargetBillMasterById" parameterType="Long">
delete from dc_busi_target_bill_master where id = #{id} delete from dc_busi_target_bill_master where id = #{id}
</delete> </delete>

138
lzbi-module/src/main/resources/mapper/draft/DcBusiTargetBillSubMapper.xml

@ -0,0 +1,138 @@
<?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.draft.mapper.DcBusiTargetBillSubMapper">
<resultMap type="com.lzbi.draft.domain.DcBusiTargetBillSub" id="DcBusiTargetBillSubResult">
<result property="id" column="id" />
<result property="billNo" column="bill_no" />
<result property="targetName" column="target_name" />
<result property="targetCode" column="target_code" />
<result property="targetUint" column="target_uint" />
<result property="targetValue" column="target_value" />
<result property="countDate" column="count_date" />
<result property="countDay" column="count_day" />
<result property="fieldCode" column="field_code" />
<result property="fieldName" column="field_name" />
<result property="assetCode" column="asset_code" />
<result property="assetName" column="asset_name" />
<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="selectDcBusiTargetBillSubVo">
select id, bill_no, target_name, target_code, target_uint, target_value, count_date, count_day, field_code, field_name, asset_code, asset_name, tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time from dc_busi_target_bill_sub
</sql>
<select id="selectDcBusiTargetBillSubList" parameterType="DcBusiTargetBillSub" resultMap="DcBusiTargetBillSubResult">
<include refid="selectDcBusiTargetBillSubVo"/>
<where>
<if test="billNo != null and billNo != ''"> and bill_no = #{billNo}</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="targetUint != null and targetUint != ''"> and target_uint = #{targetUint}</if>
<if test="targetValue != null "> and target_value = #{targetValue}</if>
<if test="countDate != null and countDate != ''"> and count_date = #{countDate}</if>
<if test="countDay != null "> and count_day = #{countDay}</if>
<if test="fieldCode != null and fieldCode != ''"> and field_code = #{fieldCode}</if>
<if test="fieldName != null and fieldName != ''"> and field_name like concat('%', #{fieldName}, '%')</if>
<if test="assetCode != null and assetCode != ''"> and asset_code = #{assetCode}</if>
<if test="assetName != null and assetName != ''"> and asset_name like concat('%', #{assetName}, '%')</if>
</where>
</select>
<select id="selectDcBusiTargetBillSubById" parameterType="Long" resultMap="DcBusiTargetBillSubResult">
<include refid="selectDcBusiTargetBillSubVo"/>
where id = #{id}
</select>
<insert id="insertDcBusiTargetBillSub" parameterType="DcBusiTargetBillSub" useGeneratedKeys="true" keyProperty="id">
insert into dc_busi_target_bill_sub
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="billNo != null">bill_no,</if>
<if test="targetName != null">target_name,</if>
<if test="targetCode != null">target_code,</if>
<if test="targetUint != null">target_uint,</if>
<if test="targetValue != null">target_value,</if>
<if test="countDate != null">count_date,</if>
<if test="countDay != null">count_day,</if>
<if test="fieldCode != null">field_code,</if>
<if test="fieldName != null">field_name,</if>
<if test="assetCode != null">asset_code,</if>
<if test="assetName != null">asset_name,</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="billNo != null">#{billNo},</if>
<if test="targetName != null">#{targetName},</if>
<if test="targetCode != null">#{targetCode},</if>
<if test="targetUint != null">#{targetUint},</if>
<if test="targetValue != null">#{targetValue},</if>
<if test="countDate != null">#{countDate},</if>
<if test="countDay != null">#{countDay},</if>
<if test="fieldCode != null">#{fieldCode},</if>
<if test="fieldName != null">#{fieldName},</if>
<if test="assetCode != null">#{assetCode},</if>
<if test="assetName != null">#{assetName},</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="updateDcBusiTargetBillSub" parameterType="DcBusiTargetBillSub">
update dc_busi_target_bill_sub
<trim prefix="SET" suffixOverrides=",">
<if test="billNo != null">bill_no = #{billNo},</if>
<if test="targetName != null">target_name = #{targetName},</if>
<if test="targetCode != null">target_code = #{targetCode},</if>
<if test="targetUint != null">target_uint = #{targetUint},</if>
<if test="targetValue != null">target_value = #{targetValue},</if>
<if test="countDate != null">count_date = #{countDate},</if>
<if test="countDay != null">count_day = #{countDay},</if>
<if test="fieldCode != null">field_code = #{fieldCode},</if>
<if test="fieldName != null">field_name = #{fieldName},</if>
<if test="assetCode != null">asset_code = #{assetCode},</if>
<if test="assetName != null">asset_name = #{assetName},</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="deleteDcBusiTargetBillSubById" parameterType="Long">
delete from dc_busi_target_bill_sub where id = #{id}
</delete>
<delete id="deleteDcBusiTargetBillSubByIds" parameterType="String">
delete from dc_busi_target_bill_sub where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

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

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 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.targetFolder.mapper.DcBaseAssetTargetMapper"> <mapper namespace="com.lzbi.targetFolder.mapper.DcBaseAssetTargetMapper">
<resultMap type="com.lzbi.targetFolder.domain.DcBaseAssetTarget" id="DcBaseAssetTargetResult"> <resultMap type="com.lzbi.targetFolder.domain.DcBaseAssetTarget" id="DcBaseAssetTargetResult">
@ -12,7 +12,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="targetName" column="target_name" /> <result property="targetName" column="target_name" />
<result property="targetNameAlias" column="target_name_alias" /> <result property="targetNameAlias" column="target_name_alias" />
<result property="targetCode" column="target_code" /> <result property="targetCode" column="target_code" />
<result property="targetField" column="target_field" /> <result property="fieldCode" column="field_code" />
<result property="limitUp" column="limit_up" /> <result property="limitUp" column="limit_up" />
<result property="limitDown" column="limit_down" /> <result property="limitDown" column="limit_down" />
<result property="valueBase" column="value_base" /> <result property="valueBase" column="value_base" />
@ -28,29 +28,43 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="deleteBy" column="delete_by" /> <result property="deleteBy" column="delete_by" />
<result property="deleteTime" column="delete_time" /> <result property="deleteTime" column="delete_time" />
<result property="sort" column="sort" /> <result property="sort" column="sort" />
<result property="targetFieldName" column="target_field_name" /> <result property="fieldName" column="field_name" />
<result property="columnType" column="column_type" /> <result property="columnType" column="column_type" />
<result property="fieldUnit" column="field_unit" /> <result property="fieldUnit" column="field_unit" />
<result property="deptId" column="dept_id" />
<result property="userId" column="user_id" />
</resultMap> </resultMap>
<sql id="selectDcBaseAssetTargetVo"> <sql id="selectDcBaseAssetTargetVo">
select id, asset_code, asset_id, target_model_code, target_name, target_name_alias, target_code, target_field, limit_up, limit_down, value_base, flag_avg, flag_sum, flag_compute, tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time, sort, target_field_name, column_type, field_unit from dc_base_asset_target select id, asset_code, asset_id, target_model_code, target_name, target_name_alias, target_code, field_code, limit_up, limit_down, value_base, flag_avg, flag_sum, flag_compute, tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time, sort, field_name, column_type, field_unit, dept_id, user_id from dc_base_asset_target
</sql> </sql>
<select id="selectDcBaseAssetTargetList" parameterType="DcBaseAssetTarget" resultMap="DcBaseAssetTargetResult"> <select id="selectDcBaseAssetTargetList" parameterType="DcBaseAssetTarget" resultMap="DcBaseAssetTargetResult">
<include refid="selectDcBaseAssetTargetVo"/> <include refid="selectDcBaseAssetTargetVo"/>
<where> <where>
<if test="assetCode != null and assetCode != ''"> and asset_code = #{assetCode}</if>
<if test="assetId != null "> and asset_id = #{assetId}</if> <if test="assetId != null "> and asset_id = #{assetId}</if>
<if test="targetModelCode != null and targetModelCode != ''"> and target_model_code = #{targetModelCode}</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="targetName != null and targetName != ''"> and target_name like concat('%', #{targetName}, '%')</if>
<if test="targetNameAlias != null and targetNameAlias != ''"> and target_name_alias = #{targetNameAlias}</if>
<if test="targetCode != null and targetCode != ''"> and target_code = #{targetCode}</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="fieldCode != null and fieldCode != ''"> and field_code = #{fieldCode}</if>
<if test="assetCode != null "> and asset_code = #{assetCode}</if> <if test="limitUp != null "> and limit_up = #{limitUp}</if>
<if test="columnType != null and columnType != ''"> and column_type = #{columnType}</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>
<if test="fieldName != null and fieldName != ''"> and field_name like concat('%', #{fieldName}, '%')</if>
<if test="columnType != null and columnType != ''"> and column_type = #{columnType}</if>
<if test="fieldUnit != null and fieldUnit != ''"> and field_unit = #{fieldUnit}</if>
<if test="deptId != null "> and dept_id = #{deptId}</if>
<if test="userId != null "> and user_id = #{userId}</if>
</where> </where>
ORDER BY COALESCE(updated_time, created_time) DESC
</select> </select>
<select id="selectDcBaseAssetTargetById" parameterType="Long" resultMap="DcBaseAssetTargetResult"> <select id="selectDcBaseAssetTargetById" parameterType="Long" resultMap="DcBaseAssetTargetResult">
<include refid="selectDcBaseAssetTargetVo"/> <include refid="selectDcBaseAssetTargetVo"/>
where id = #{id} where id = #{id}
@ -65,7 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="targetName != null">target_name,</if> <if test="targetName != null">target_name,</if>
<if test="targetNameAlias != null">target_name_alias,</if> <if test="targetNameAlias != null">target_name_alias,</if>
<if test="targetCode != null">target_code,</if> <if test="targetCode != null">target_code,</if>
<if test="targetField != null">target_field,</if> <if test="fieldCode != null">field_code,</if>
<if test="limitUp != null">limit_up,</if> <if test="limitUp != null">limit_up,</if>
<if test="limitDown != null">limit_down,</if> <if test="limitDown != null">limit_down,</if>
<if test="valueBase != null">value_base,</if> <if test="valueBase != null">value_base,</if>
@ -81,9 +95,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="deleteBy != null">delete_by,</if> <if test="deleteBy != null">delete_by,</if>
<if test="deleteTime != null">delete_time,</if> <if test="deleteTime != null">delete_time,</if>
<if test="sort != null">sort,</if> <if test="sort != null">sort,</if>
<if test="targetFieldName != null">target_field_name,</if> <if test="fieldName != null">field_name,</if>
<if test="columnType != null">column_type,</if> <if test="columnType != null">column_type,</if>
<if test="fieldUnit != null">field_unit,</if> <if test="fieldUnit != null">field_unit,</if>
<if test="deptId != null">dept_id,</if>
<if test="userId != null">user_id,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="assetCode != null">#{assetCode},</if> <if test="assetCode != null">#{assetCode},</if>
@ -92,7 +108,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="targetName != null">#{targetName},</if> <if test="targetName != null">#{targetName},</if>
<if test="targetNameAlias != null">#{targetNameAlias},</if> <if test="targetNameAlias != null">#{targetNameAlias},</if>
<if test="targetCode != null">#{targetCode},</if> <if test="targetCode != null">#{targetCode},</if>
<if test="targetField != null">#{targetField},</if> <if test="fieldCode != null">#{fieldCode},</if>
<if test="limitUp != null">#{limitUp},</if> <if test="limitUp != null">#{limitUp},</if>
<if test="limitDown != null">#{limitDown},</if> <if test="limitDown != null">#{limitDown},</if>
<if test="valueBase != null">#{valueBase},</if> <if test="valueBase != null">#{valueBase},</if>
@ -108,9 +124,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="deleteBy != null">#{deleteBy},</if> <if test="deleteBy != null">#{deleteBy},</if>
<if test="deleteTime != null">#{deleteTime},</if> <if test="deleteTime != null">#{deleteTime},</if>
<if test="sort != null">#{sort},</if> <if test="sort != null">#{sort},</if>
<if test="targetFieldName != null">#{targetFieldName},</if> <if test="fieldName != null">#{fieldName},</if>
<if test="columnType != null">#{columnType},</if> <if test="columnType != null">#{columnType},</if>
<if test="fieldUnit != null">#{fieldUnit},</if> <if test="fieldUnit != null">#{fieldUnit},</if>
<if test="deptId != null">#{deptId},</if>
<if test="userId != null">#{userId},</if>
</trim> </trim>
</insert> </insert>
@ -123,7 +141,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="targetName != null">target_name = #{targetName},</if> <if test="targetName != null">target_name = #{targetName},</if>
<if test="targetNameAlias != null">target_name_alias = #{targetNameAlias},</if> <if test="targetNameAlias != null">target_name_alias = #{targetNameAlias},</if>
<if test="targetCode != null">target_code = #{targetCode},</if> <if test="targetCode != null">target_code = #{targetCode},</if>
<if test="targetField != null">target_field = #{targetField},</if> <if test="fieldCode != null">field_code = #{fieldCode},</if>
<if test="limitUp != null">limit_up = #{limitUp},</if> <if test="limitUp != null">limit_up = #{limitUp},</if>
<if test="limitDown != null">limit_down = #{limitDown},</if> <if test="limitDown != null">limit_down = #{limitDown},</if>
<if test="valueBase != null">value_base = #{valueBase},</if> <if test="valueBase != null">value_base = #{valueBase},</if>
@ -139,9 +157,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="deleteBy != null">delete_by = #{deleteBy},</if> <if test="deleteBy != null">delete_by = #{deleteBy},</if>
<if test="deleteTime != null">delete_time = #{deleteTime},</if> <if test="deleteTime != null">delete_time = #{deleteTime},</if>
<if test="sort != null">sort = #{sort},</if> <if test="sort != null">sort = #{sort},</if>
<if test="targetFieldName != null">target_field_name = #{targetFieldName},</if> <if test="fieldName != null">field_name = #{fieldName},</if>
<if test="columnType != null">column_type = #{columnType},</if> <if test="columnType != null">column_type = #{columnType},</if>
<if test="fieldUnit != null">field_unit = #{fieldUnit},</if> <if test="fieldUnit != null">field_unit = #{fieldUnit},</if>
<if test="deptId != null">dept_id = #{deptId},</if>
<if test="userId != null">user_id = #{userId},</if>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>

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

@ -36,6 +36,7 @@
<if test="targetModelField != null and targetModelField != ''"> and target_model_field = #{targetModelField}</if> <if test="targetModelField != null and targetModelField != ''"> and target_model_field = #{targetModelField}</if>
<if test="targetModelLevel != null "> and target_model_level = #{targetModelLevel}</if> <if test="targetModelLevel != null "> and target_model_level = #{targetModelLevel}</if>
</where> </where>
ORDER BY COALESCE(updated_time, created_time) DESC
</select> </select>
<select id="selectDcBaseTargetModelById" parameterType="Long" resultMap="DcBaseTargetModelResult"> <select id="selectDcBaseTargetModelById" parameterType="Long" resultMap="DcBaseTargetModelResult">

Loading…
Cancel
Save