zhousq
11 months ago
10 changed files with 1114 additions and 0 deletions
@ -0,0 +1,131 @@ |
|||||
|
package com.lzbi.bill.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.bill.domain. DcBusiPlanBillMaster; |
||||
|
import com.lzbi.bill.service.DcBusiPlanBillMasterService; |
||||
|
import com.lzbi.common.utils.poi.ExcelUtil; |
||||
|
import com.lzbi.common.core.page.TableDataInfo; |
||||
|
|
||||
|
/** |
||||
|
* 计划单据主Controller |
||||
|
* |
||||
|
* @author lienbo |
||||
|
* @date 2023-12-21 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("/bill/planBillMaster") |
||||
|
public class DcBusiPlanBillMasterController extends BaseController |
||||
|
{ |
||||
|
@Autowired |
||||
|
private DcBusiPlanBillMasterService dcBusiPlanBillMasterService; |
||||
|
|
||||
|
/** |
||||
|
* 查询计划单据主列表 |
||||
|
*/ |
||||
|
@ApiOperation("查询计划单据主列表") |
||||
|
@ApiImplicitParams({ |
||||
|
@ApiImplicitParam(name = "DcBusiPlanBillMaster", value = "", dataType = "DcBusiPlanBillMaster", dataTypeClass = DcBusiPlanBillMaster.class), |
||||
|
}) |
||||
|
@PreAuthorize("@ss.hasPermi('bill:planBillMaster:list')") |
||||
|
@GetMapping("/list") |
||||
|
public TableDataInfo list(DcBusiPlanBillMaster DcBusiPlanBillMaster) |
||||
|
{ |
||||
|
startPage(); |
||||
|
List< DcBusiPlanBillMaster> list = dcBusiPlanBillMasterService.selectDcBusiPlanBillMasterList(DcBusiPlanBillMaster); |
||||
|
return getDataTable(list); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 导出计划单据主列表 |
||||
|
*/ |
||||
|
@ApiOperation("导出计划单据主列表") |
||||
|
@ApiImplicitParams({ |
||||
|
@ApiImplicitParam(name = "DcBusiPlanBillMaster", value = "", dataType = "DcBusiPlanBillMaster", dataTypeClass = DcBusiPlanBillMaster.class), |
||||
|
}) |
||||
|
@PreAuthorize("@ss.hasPermi('bill:planBillMaster:export')") |
||||
|
@Log(title = "计划单据主", businessType = BusinessType.EXPORT) |
||||
|
@PostMapping("/export") |
||||
|
public void export(HttpServletResponse response,DcBusiPlanBillMaster DcBusiPlanBillMaster) |
||||
|
{ |
||||
|
List<DcBusiPlanBillMaster> list = dcBusiPlanBillMasterService.selectDcBusiPlanBillMasterList(DcBusiPlanBillMaster); |
||||
|
ExcelUtil<DcBusiPlanBillMaster> util = new ExcelUtil<DcBusiPlanBillMaster>(DcBusiPlanBillMaster.class); |
||||
|
util.exportExcel(response, list, "计划单据主数据"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取计划单据主详细信息 |
||||
|
*/ |
||||
|
@ApiOperation("获取计划单据主详细信息") |
||||
|
@ApiImplicitParams({ |
||||
|
@ApiImplicitParam(name = "id", value = "", dataType = "Long", dataTypeClass = Long.class), |
||||
|
}) |
||||
|
@PreAuthorize("@ss.hasPermi('bill:planBillMaster:query')") |
||||
|
@GetMapping(value = "/{id}") |
||||
|
public AjaxResult getInfo(@PathVariable("id") Long id) |
||||
|
{ |
||||
|
return success(dcBusiPlanBillMasterService.selectDcBusiPlanBillMasterById(id)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增计划单据主 |
||||
|
*/ |
||||
|
@ApiOperation("新增计划单据主") |
||||
|
@ApiImplicitParams({ |
||||
|
@ApiImplicitParam(name = "DcBusiPlanBillMaster", value = "", dataType = "DcBusiPlanBillMaster", dataTypeClass = DcBusiPlanBillMaster.class), |
||||
|
}) |
||||
|
@PreAuthorize("@ss.hasPermi('bill:planBillMaster:add')") |
||||
|
@Log(title = "计划单据主", businessType = BusinessType.INSERT) |
||||
|
@PostMapping |
||||
|
public AjaxResult add(@RequestBody DcBusiPlanBillMaster DcBusiPlanBillMaster) |
||||
|
{ |
||||
|
return toAjax(dcBusiPlanBillMasterService.insertDcBusiPlanBillMaster(DcBusiPlanBillMaster)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改计划单据主 |
||||
|
*/ |
||||
|
|
||||
|
@ApiOperation("修改计划单据主") |
||||
|
@ApiImplicitParams({ |
||||
|
@ApiImplicitParam(name = "DcBusiPlanBillMaster", value = "", dataType = "DcBusiPlanBillMaster", dataTypeClass = DcBusiPlanBillMaster.class), |
||||
|
}) |
||||
|
@PreAuthorize("@ss.hasPermi('bill:planBillMaster:edit')") |
||||
|
@Log(title = "计划单据主", businessType = BusinessType.UPDATE) |
||||
|
@PutMapping |
||||
|
public AjaxResult edit(@RequestBody DcBusiPlanBillMaster DcBusiPlanBillMaster) |
||||
|
{ |
||||
|
return toAjax(dcBusiPlanBillMasterService.updateDcBusiPlanBillMaster(DcBusiPlanBillMaster)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除计划单据主 |
||||
|
*/ |
||||
|
@ApiOperation("删除计划单据主") |
||||
|
@ApiImplicitParams({ |
||||
|
@ApiImplicitParam(name = "ids", value = "", dataType = "Long", dataTypeClass =Long.class), |
||||
|
}) |
||||
|
@PreAuthorize("@ss.hasPermi('bill:planBillMaster:remove')") |
||||
|
@Log(title = "计划单据主", businessType = BusinessType.DELETE) |
||||
|
@DeleteMapping("/{ids}") |
||||
|
public AjaxResult remove(@PathVariable Long[] ids) |
||||
|
{ |
||||
|
return toAjax(dcBusiPlanBillMasterService.deleteDcBusiPlanBillMasterByIds(ids)); |
||||
|
} |
||||
|
} |
@ -0,0 +1,131 @@ |
|||||
|
package com.lzbi.bill.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.bill.domain. DcBusiPlanBillSub; |
||||
|
import com.lzbi.bill.service.DcBusiPlanBillSubService; |
||||
|
import com.lzbi.common.utils.poi.ExcelUtil; |
||||
|
import com.lzbi.common.core.page.TableDataInfo; |
||||
|
|
||||
|
/** |
||||
|
* 计划单据明细Controller |
||||
|
* |
||||
|
* @author lienbo |
||||
|
* @date 2023-12-21 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("/bill/planBillSub") |
||||
|
public class DcBusiPlanBillSubController extends BaseController |
||||
|
{ |
||||
|
@Autowired |
||||
|
private DcBusiPlanBillSubService dcBusiPlanBillSubService; |
||||
|
|
||||
|
/** |
||||
|
* 查询计划单据明细列表 |
||||
|
*/ |
||||
|
@ApiOperation("查询计划单据明细列表") |
||||
|
@ApiImplicitParams({ |
||||
|
@ApiImplicitParam(name = "DcBusiPlanBillSub", value = "", dataType = "DcBusiPlanBillSub", dataTypeClass = DcBusiPlanBillSub.class), |
||||
|
}) |
||||
|
@PreAuthorize("@ss.hasPermi('bill:planBillSub:list')") |
||||
|
@GetMapping("/list") |
||||
|
public TableDataInfo list(DcBusiPlanBillSub DcBusiPlanBillSub) |
||||
|
{ |
||||
|
startPage(); |
||||
|
List< DcBusiPlanBillSub> list = dcBusiPlanBillSubService.selectDcBusiPlanBillSubList(DcBusiPlanBillSub); |
||||
|
return getDataTable(list); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 导出计划单据明细列表 |
||||
|
*/ |
||||
|
@ApiOperation("导出计划单据明细列表") |
||||
|
@ApiImplicitParams({ |
||||
|
@ApiImplicitParam(name = "DcBusiPlanBillSub", value = "", dataType = "DcBusiPlanBillSub", dataTypeClass = DcBusiPlanBillSub.class), |
||||
|
}) |
||||
|
@PreAuthorize("@ss.hasPermi('bill:planBillSub:export')") |
||||
|
@Log(title = "计划单据明细", businessType = BusinessType.EXPORT) |
||||
|
@PostMapping("/export") |
||||
|
public void export(HttpServletResponse response,DcBusiPlanBillSub DcBusiPlanBillSub) |
||||
|
{ |
||||
|
List<DcBusiPlanBillSub> list = dcBusiPlanBillSubService.selectDcBusiPlanBillSubList(DcBusiPlanBillSub); |
||||
|
ExcelUtil<DcBusiPlanBillSub> util = new ExcelUtil<DcBusiPlanBillSub>(DcBusiPlanBillSub.class); |
||||
|
util.exportExcel(response, list, "计划单据明细数据"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取计划单据明细详细信息 |
||||
|
*/ |
||||
|
@ApiOperation("获取计划单据明细详细信息") |
||||
|
@ApiImplicitParams({ |
||||
|
@ApiImplicitParam(name = "id", value = "", dataType = "Long", dataTypeClass = Long.class), |
||||
|
}) |
||||
|
@PreAuthorize("@ss.hasPermi('bill:planBillSub:query')") |
||||
|
@GetMapping(value = "/{id}") |
||||
|
public AjaxResult getInfo(@PathVariable("id") Long id) |
||||
|
{ |
||||
|
return success(dcBusiPlanBillSubService.selectDcBusiPlanBillSubById(id)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增计划单据明细 |
||||
|
*/ |
||||
|
@ApiOperation("新增计划单据明细") |
||||
|
@ApiImplicitParams({ |
||||
|
@ApiImplicitParam(name = "DcBusiPlanBillSub", value = "", dataType = "DcBusiPlanBillSub", dataTypeClass = DcBusiPlanBillSub.class), |
||||
|
}) |
||||
|
@PreAuthorize("@ss.hasPermi('bill:planBillSub:add')") |
||||
|
@Log(title = "计划单据明细", businessType = BusinessType.INSERT) |
||||
|
@PostMapping |
||||
|
public AjaxResult add(@RequestBody DcBusiPlanBillSub DcBusiPlanBillSub) |
||||
|
{ |
||||
|
return toAjax(dcBusiPlanBillSubService.insertDcBusiPlanBillSub(DcBusiPlanBillSub)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改计划单据明细 |
||||
|
*/ |
||||
|
|
||||
|
@ApiOperation("修改计划单据明细") |
||||
|
@ApiImplicitParams({ |
||||
|
@ApiImplicitParam(name = "DcBusiPlanBillSub", value = "", dataType = "DcBusiPlanBillSub", dataTypeClass = DcBusiPlanBillSub.class), |
||||
|
}) |
||||
|
@PreAuthorize("@ss.hasPermi('bill:planBillSub:edit')") |
||||
|
@Log(title = "计划单据明细", businessType = BusinessType.UPDATE) |
||||
|
@PutMapping |
||||
|
public AjaxResult edit(@RequestBody DcBusiPlanBillSub DcBusiPlanBillSub) |
||||
|
{ |
||||
|
return toAjax(dcBusiPlanBillSubService.updateDcBusiPlanBillSub(DcBusiPlanBillSub)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除计划单据明细 |
||||
|
*/ |
||||
|
@ApiOperation("删除计划单据明细") |
||||
|
@ApiImplicitParams({ |
||||
|
@ApiImplicitParam(name = "ids", value = "", dataType = "Long", dataTypeClass =Long.class), |
||||
|
}) |
||||
|
@PreAuthorize("@ss.hasPermi('bill:planBillSub:remove')") |
||||
|
@Log(title = "计划单据明细", businessType = BusinessType.DELETE) |
||||
|
@DeleteMapping("/{ids}") |
||||
|
public AjaxResult remove(@PathVariable Long[] ids) |
||||
|
{ |
||||
|
return toAjax(dcBusiPlanBillSubService.deleteDcBusiPlanBillSubByIds(ids)); |
||||
|
} |
||||
|
} |
@ -0,0 +1,85 @@ |
|||||
|
package com.lzbi.bill.domain; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Date; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import org.apache.commons.lang3.builder.ToStringBuilder; |
||||
|
import org.apache.commons.lang3.builder.ToStringStyle; |
||||
|
import lombok.Data; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.experimental.Accessors; |
||||
|
import com.lzbi.common.annotation.Excel; |
||||
|
import com.lzbi.module.base.BaseModuleEntity; |
||||
|
|
||||
|
/** |
||||
|
* 计划单据主对象 dc_busi_plan_bill_master |
||||
|
* |
||||
|
* @author lienbo |
||||
|
* @date 2023-12-21 |
||||
|
*/ |
||||
|
@Data |
||||
|
@Accessors(chain = true) |
||||
|
public class DcBusiPlanBillMaster extends BaseModuleEntity |
||||
|
{ |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** 主键 */ |
||||
|
private Long id; |
||||
|
|
||||
|
/** 单据编号 */ |
||||
|
@Excel(name = "单据编号") |
||||
|
@ApiModelProperty(name = "单据编号",notes = "billNo") |
||||
|
private String billNo; |
||||
|
|
||||
|
/** 采集时间 */ |
||||
|
@Excel(name = "采集时间") |
||||
|
@ApiModelProperty(name = "采集时间",notes = "billIncomeDate") |
||||
|
private String billIncomeDate; |
||||
|
|
||||
|
/** 单据类型 */ |
||||
|
@Excel(name = "单据类型") |
||||
|
@ApiModelProperty(name = "单据类型",notes = "billType") |
||||
|
private String billType; |
||||
|
|
||||
|
/** 审核类型 */ |
||||
|
@Excel(name = "审核类型") |
||||
|
@ApiModelProperty(name = "审核类型",notes = "checkType") |
||||
|
private String checkType; |
||||
|
|
||||
|
/** 审核状态 */ |
||||
|
@Excel(name = "审核状态") |
||||
|
@ApiModelProperty(name = "审核状态",notes = "checkStatus") |
||||
|
private String checkStatus; |
||||
|
|
||||
|
/** 创建人 */ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** 创建时间 */ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** 更新人 */ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** 更新时间 */ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
/** 公司ID */ |
||||
|
private Long companyId; |
||||
|
|
||||
|
/** 公司名称 */ |
||||
|
@Excel(name = "公司名称") |
||||
|
@ApiModelProperty(name = "公司名称",notes = "companyName") |
||||
|
private String companyName; |
||||
|
|
||||
|
/** 组织机构名称 */ |
||||
|
@Excel(name = "组织机构名称") |
||||
|
@ApiModelProperty(name = "组织机构名称",notes = "organizeName") |
||||
|
private String organizeName; |
||||
|
|
||||
|
/** 组织机构ID */ |
||||
|
private Long oragnizeId; |
||||
|
|
||||
|
/** 计划单据明细信息 */ |
||||
|
private List<DcBusiPlanBillSub> dcBusiPlanBillSubList; |
||||
|
|
||||
|
} |
@ -0,0 +1,82 @@ |
|||||
|
package com.lzbi.bill.domain; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
import java.util.Date; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import lombok.Data; |
||||
|
import org.apache.commons.lang3.builder.ToStringBuilder; |
||||
|
import org.apache.commons.lang3.builder.ToStringStyle; |
||||
|
import com.lzbi.common.annotation.Excel; |
||||
|
import com.lzbi.module.base.BaseModuleEntity; |
||||
|
|
||||
|
/** |
||||
|
* 计划单据明细对象 dc_busi_plan_bill_sub |
||||
|
* |
||||
|
* @author lienbo |
||||
|
* @date 2023-12-21 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class DcBusiPlanBillSub |
||||
|
{ |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** 主键 */ |
||||
|
private Long id; |
||||
|
|
||||
|
/** 单据编码 */ |
||||
|
@Excel(name = "单据编码") |
||||
|
private String billNo; |
||||
|
|
||||
|
/** 所属专业 */ |
||||
|
@Excel(name = "所属专业") |
||||
|
private String fieldCode; |
||||
|
|
||||
|
/** 所属专业名称 */ |
||||
|
@Excel(name = "所属专业名称") |
||||
|
private String fieldName; |
||||
|
|
||||
|
/** 统计单元编码 */ |
||||
|
@Excel(name = "统计单元编码") |
||||
|
private String assetCode; |
||||
|
|
||||
|
/** 统计单元名称 */ |
||||
|
@Excel(name = "统计单元名称") |
||||
|
private String assetName; |
||||
|
|
||||
|
/** 指标编码 */ |
||||
|
@Excel(name = "指标编码") |
||||
|
private String targetCode; |
||||
|
|
||||
|
/** 指标名称 */ |
||||
|
@Excel(name = "指标名称") |
||||
|
private String tagetName; |
||||
|
|
||||
|
/** 参数值 */ |
||||
|
@Excel(name = "参数值") |
||||
|
private BigDecimal planValue; |
||||
|
|
||||
|
/** 年 */ |
||||
|
@Excel(name = "年") |
||||
|
private String dateYear; |
||||
|
|
||||
|
/** 月 */ |
||||
|
@Excel(name = "月") |
||||
|
private String dateMonth; |
||||
|
|
||||
|
/** 日 */ |
||||
|
@Excel(name = "日") |
||||
|
private String dateDay; |
||||
|
|
||||
|
/** 创建人 */ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** 创建时间 */ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** 更新人 */ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** 更新时间 */ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
@ -0,0 +1,89 @@ |
|||||
|
package com.lzbi.bill.mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import com.lzbi.bill.domain.DcBusiPlanBillMaster; |
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.lzbi.bill.domain.DcBusiPlanBillSub; |
||||
|
|
||||
|
/** |
||||
|
* 计划单据主Mapper接口 |
||||
|
* |
||||
|
* @author lienbo |
||||
|
* @date 2023-12-21 |
||||
|
*/ |
||||
|
|
||||
|
public interface DcBusiPlanBillMasterMapper extends BaseMapper<DcBusiPlanBillMaster> |
||||
|
{ |
||||
|
/** |
||||
|
* 查询计划单据主 |
||||
|
* |
||||
|
* @param id 计划单据主主键 |
||||
|
* @return 计划单据主 |
||||
|
*/ |
||||
|
public DcBusiPlanBillMaster selectDcBusiPlanBillMasterById(Long id); |
||||
|
|
||||
|
/** |
||||
|
* 查询计划单据主列表 |
||||
|
* |
||||
|
* @param dcBusiPlanBillMaster 计划单据主 |
||||
|
* @return 计划单据主集合 |
||||
|
*/ |
||||
|
public List<DcBusiPlanBillMaster> selectDcBusiPlanBillMasterList(DcBusiPlanBillMaster dcBusiPlanBillMaster); |
||||
|
|
||||
|
/** |
||||
|
* 新增计划单据主 |
||||
|
* |
||||
|
* @param dcBusiPlanBillMaster 计划单据主 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int insertDcBusiPlanBillMaster(DcBusiPlanBillMaster dcBusiPlanBillMaster); |
||||
|
|
||||
|
/** |
||||
|
* 修改计划单据主 |
||||
|
* |
||||
|
* @param dcBusiPlanBillMaster 计划单据主 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int updateDcBusiPlanBillMaster(DcBusiPlanBillMaster dcBusiPlanBillMaster); |
||||
|
|
||||
|
/** |
||||
|
* 删除计划单据主 |
||||
|
* |
||||
|
* @param id 计划单据主主键 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteDcBusiPlanBillMasterById(Long id); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除计划单据主 |
||||
|
* |
||||
|
* @param ids 需要删除的数据主键集合 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteDcBusiPlanBillMasterByIds(Long[] ids); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除计划单据明细 |
||||
|
* |
||||
|
* @param ids 需要删除的数据主键集合 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteDcBusiPlanBillSubByBillNos(Long[] ids); |
||||
|
|
||||
|
/** |
||||
|
* 批量新增计划单据明细 |
||||
|
* |
||||
|
* @param dcBusiPlanBillSubList 计划单据明细列表 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int batchDcBusiPlanBillSub(List<DcBusiPlanBillSub> dcBusiPlanBillSubList); |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 通过计划单据主主键删除计划单据明细信息 |
||||
|
* |
||||
|
* @param id 计划单据主ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteDcBusiPlanBillSubByBillNo(Long id); |
||||
|
} |
@ -0,0 +1,63 @@ |
|||||
|
package com.lzbi.bill.mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import com.lzbi.bill.domain.DcBusiPlanBillSub; |
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
|
||||
|
/** |
||||
|
* 计划单据明细Mapper接口 |
||||
|
* |
||||
|
* @author lienbo |
||||
|
* @date 2023-12-21 |
||||
|
*/ |
||||
|
|
||||
|
public interface DcBusiPlanBillSubMapper extends BaseMapper<DcBusiPlanBillSub> |
||||
|
{ |
||||
|
/** |
||||
|
* 查询计划单据明细 |
||||
|
* |
||||
|
* @param id 计划单据明细主键 |
||||
|
* @return 计划单据明细 |
||||
|
*/ |
||||
|
public DcBusiPlanBillSub selectDcBusiPlanBillSubById(Long id); |
||||
|
|
||||
|
/** |
||||
|
* 查询计划单据明细列表 |
||||
|
* |
||||
|
* @param dcBusiPlanBillSub 计划单据明细 |
||||
|
* @return 计划单据明细集合 |
||||
|
*/ |
||||
|
public List<DcBusiPlanBillSub> selectDcBusiPlanBillSubList(DcBusiPlanBillSub dcBusiPlanBillSub); |
||||
|
|
||||
|
/** |
||||
|
* 新增计划单据明细 |
||||
|
* |
||||
|
* @param dcBusiPlanBillSub 计划单据明细 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int insertDcBusiPlanBillSub(DcBusiPlanBillSub dcBusiPlanBillSub); |
||||
|
|
||||
|
/** |
||||
|
* 修改计划单据明细 |
||||
|
* |
||||
|
* @param dcBusiPlanBillSub 计划单据明细 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int updateDcBusiPlanBillSub(DcBusiPlanBillSub dcBusiPlanBillSub); |
||||
|
|
||||
|
/** |
||||
|
* 删除计划单据明细 |
||||
|
* |
||||
|
* @param id 计划单据明细主键 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteDcBusiPlanBillSubById(Long id); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除计划单据明细 |
||||
|
* |
||||
|
* @param ids 需要删除的数据主键集合 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteDcBusiPlanBillSubByIds(Long[] ids); |
||||
|
} |
@ -0,0 +1,130 @@ |
|||||
|
package com.lzbi.bill.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import com.lzbi.bill.domain.DcBusiPlanBillMaster; |
||||
|
import com.lzbi.bill.domain.DcBusiPlanBillSub; |
||||
|
import com.lzbi.bill.mapper.DcBusiPlanBillMasterMapper; |
||||
|
import com.lzbi.common.utils.DateUtils; |
||||
|
import com.lzbi.common.utils.StringUtils; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
/** |
||||
|
* 计划单据主Service业务层处理 |
||||
|
* |
||||
|
* @author lienbo |
||||
|
* @date 2023-12-21 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class DcBusiPlanBillMasterService extends ServiceImpl<DcBusiPlanBillMasterMapper, DcBusiPlanBillMaster> implements IService<DcBusiPlanBillMaster> |
||||
|
{ |
||||
|
|
||||
|
/** |
||||
|
* 查询计划单据主 |
||||
|
* |
||||
|
* @param id 计划单据主主键 |
||||
|
* @return 计划单据主 |
||||
|
*/ |
||||
|
public DcBusiPlanBillMaster selectDcBusiPlanBillMasterById(Long id) |
||||
|
{ |
||||
|
return baseMapper.selectDcBusiPlanBillMasterById(id); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 查询计划单据主列表 |
||||
|
* |
||||
|
* @param dcBusiPlanBillMaster 计划单据主 |
||||
|
* @return 计划单据主 |
||||
|
*/ |
||||
|
public List<DcBusiPlanBillMaster> selectDcBusiPlanBillMasterList(DcBusiPlanBillMaster dcBusiPlanBillMaster) |
||||
|
{ |
||||
|
return baseMapper.selectDcBusiPlanBillMasterList(dcBusiPlanBillMaster); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增计划单据主 |
||||
|
* |
||||
|
* @param dcBusiPlanBillMaster 计划单据主 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Transactional |
||||
|
|
||||
|
public int insertDcBusiPlanBillMaster(DcBusiPlanBillMaster dcBusiPlanBillMaster) |
||||
|
{ |
||||
|
dcBusiPlanBillMaster.setCreatedTime(DateUtils.getNowDate()); |
||||
|
int rows = baseMapper.insertDcBusiPlanBillMaster(dcBusiPlanBillMaster); |
||||
|
insertDcBusiPlanBillSub(dcBusiPlanBillMaster); |
||||
|
return rows; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改计划单据主 |
||||
|
* |
||||
|
* @param dcBusiPlanBillMaster 计划单据主 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Transactional |
||||
|
|
||||
|
public int updateDcBusiPlanBillMaster(DcBusiPlanBillMaster dcBusiPlanBillMaster) |
||||
|
{ |
||||
|
dcBusiPlanBillMaster.setUpdatedTime(DateUtils.getNowDate()); |
||||
|
baseMapper.deleteDcBusiPlanBillSubByBillNo(dcBusiPlanBillMaster.getId()); |
||||
|
insertDcBusiPlanBillSub(dcBusiPlanBillMaster); |
||||
|
return baseMapper.updateDcBusiPlanBillMaster(dcBusiPlanBillMaster); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 批量删除计划单据主 |
||||
|
* |
||||
|
* @param ids 需要删除的计划单据主主键 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Transactional |
||||
|
|
||||
|
public int deleteDcBusiPlanBillMasterByIds(Long[] ids) |
||||
|
{ |
||||
|
baseMapper.deleteDcBusiPlanBillSubByBillNos(ids); |
||||
|
return baseMapper.deleteDcBusiPlanBillMasterByIds(ids); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除计划单据主信息 |
||||
|
* |
||||
|
* @param id 计划单据主主键 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Transactional |
||||
|
|
||||
|
public int deleteDcBusiPlanBillMasterById(Long id) |
||||
|
{ |
||||
|
baseMapper.deleteDcBusiPlanBillSubByBillNo(id); |
||||
|
return baseMapper.deleteDcBusiPlanBillMasterById(id); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增计划单据明细信息 |
||||
|
* |
||||
|
* @param dcBusiPlanBillMaster 计划单据主对象 |
||||
|
*/ |
||||
|
public void insertDcBusiPlanBillSub(DcBusiPlanBillMaster dcBusiPlanBillMaster) |
||||
|
{ |
||||
|
List<DcBusiPlanBillSub> dcBusiPlanBillSubDaoList = dcBusiPlanBillMaster.getDcBusiPlanBillSubList(); |
||||
|
String billNo = dcBusiPlanBillMaster.getBillNo(); |
||||
|
if (StringUtils.isNotNull(dcBusiPlanBillSubDaoList)) |
||||
|
{ |
||||
|
List<DcBusiPlanBillSub> list = new ArrayList<DcBusiPlanBillSub>(); |
||||
|
for (DcBusiPlanBillSub dcBusiPlanBillSubDao : dcBusiPlanBillSubDaoList) |
||||
|
{ |
||||
|
dcBusiPlanBillSubDao.setBillNo(billNo); |
||||
|
list.add(dcBusiPlanBillSubDao); |
||||
|
} |
||||
|
if (list.size() > 0) |
||||
|
{ |
||||
|
baseMapper.batchDcBusiPlanBillSub(list); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,91 @@ |
|||||
|
package com.lzbi.bill.service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import com.lzbi.common.utils.DateUtils; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import com.lzbi.bill.domain.DcBusiPlanBillSub; |
||||
|
import com.lzbi.bill.mapper.DcBusiPlanBillSubMapper; |
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
/** |
||||
|
* 计划单据明细Service业务层处理 |
||||
|
* |
||||
|
* @author lienbo |
||||
|
* @date 2023-12-21 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class DcBusiPlanBillSubService extends ServiceImpl<DcBusiPlanBillSubMapper, DcBusiPlanBillSub> implements IService<DcBusiPlanBillSub> |
||||
|
{ |
||||
|
|
||||
|
/** |
||||
|
* 查询计划单据明细 |
||||
|
* |
||||
|
* @param id 计划单据明细主键 |
||||
|
* @return 计划单据明细 |
||||
|
*/ |
||||
|
public DcBusiPlanBillSub selectDcBusiPlanBillSubById(Long id) |
||||
|
{ |
||||
|
return baseMapper.selectDcBusiPlanBillSubById(id); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 查询计划单据明细列表 |
||||
|
* |
||||
|
* @param dcBusiPlanBillSub 计划单据明细 |
||||
|
* @return 计划单据明细 |
||||
|
*/ |
||||
|
public List<DcBusiPlanBillSub> selectDcBusiPlanBillSubList(DcBusiPlanBillSub dcBusiPlanBillSub) |
||||
|
{ |
||||
|
return baseMapper.selectDcBusiPlanBillSubList(dcBusiPlanBillSub); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增计划单据明细 |
||||
|
* |
||||
|
* @param dcBusiPlanBillSub 计划单据明细 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
|
||||
|
public int insertDcBusiPlanBillSub(DcBusiPlanBillSub dcBusiPlanBillSub) |
||||
|
{ |
||||
|
dcBusiPlanBillSub.setCreatedTime(DateUtils.getNowDate()); |
||||
|
return baseMapper.insertDcBusiPlanBillSub(dcBusiPlanBillSub); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改计划单据明细 |
||||
|
* |
||||
|
* @param dcBusiPlanBillSub 计划单据明细 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
|
||||
|
public int updateDcBusiPlanBillSub(DcBusiPlanBillSub dcBusiPlanBillSub) |
||||
|
{ |
||||
|
dcBusiPlanBillSub.setUpdatedTime(DateUtils.getNowDate()); |
||||
|
return baseMapper.updateDcBusiPlanBillSub(dcBusiPlanBillSub); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 批量删除计划单据明细 |
||||
|
* |
||||
|
* @param ids 需要删除的计划单据明细主键 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
|
||||
|
public int deleteDcBusiPlanBillSubByIds(Long[] ids) |
||||
|
{ |
||||
|
return baseMapper.deleteDcBusiPlanBillSubByIds(ids); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除计划单据明细信息 |
||||
|
* |
||||
|
* @param id 计划单据明细主键 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
|
||||
|
public int deleteDcBusiPlanBillSubById(Long id) |
||||
|
{ |
||||
|
return baseMapper.deleteDcBusiPlanBillSubById(id); |
||||
|
} |
||||
|
} |
@ -0,0 +1,174 @@ |
|||||
|
<?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.bill.mapper.DcBusiPlanBillMasterMapper"> |
||||
|
|
||||
|
<resultMap type="com.lzbi.bill.domain.DcBusiPlanBillMaster" id="DcBusiPlanBillMasterResult"> |
||||
|
<result property="id" column="id" /> |
||||
|
<result property="billNo" column="bill_no" /> |
||||
|
<result property="billIncomeDate" column="bill_income_date" /> |
||||
|
<result property="billType" column="bill_type" /> |
||||
|
<result property="checkType" column="check_type" /> |
||||
|
<result property="checkStatus" column="check_status" /> |
||||
|
<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" /> |
||||
|
<result property="companyId" column="company_id" /> |
||||
|
<result property="companyName" column="company_name" /> |
||||
|
<result property="organizeName" column="organize_name" /> |
||||
|
<result property="oragnizeId" column="oragnize_id" /> |
||||
|
</resultMap> |
||||
|
|
||||
|
<resultMap id="DcBusiPlanBillMasterDcBusiPlanBillSubResult" type="com.lzbi.bill.domain.DcBusiPlanBillMaster" extends="DcBusiPlanBillMasterResult"> |
||||
|
<collection property="dcBusiPlanBillSubList" notNullColumn="sub_id" javaType="java.util.List" resultMap="DcBusiPlanBillSubResult" /> |
||||
|
</resultMap> |
||||
|
|
||||
|
<resultMap type="com.lzbi.bill.domain.DcBusiPlanBillSub" id="DcBusiPlanBillSubResult"> |
||||
|
<result property="id" column="sub_id" /> |
||||
|
<result property="billNo" column="sub_bill_no" /> |
||||
|
<result property="fieldCode" column="sub_field_code" /> |
||||
|
<result property="fieldName" column="sub_field_name" /> |
||||
|
<result property="assetCode" column="sub_asset_code" /> |
||||
|
<result property="assetName" column="sub_asset_name" /> |
||||
|
<result property="targetCode" column="sub_target_code" /> |
||||
|
<result property="tagetName" column="sub_taget_name" /> |
||||
|
<result property="planValue" column="sub_plan_value" /> |
||||
|
<result property="dateYear" column="sub_date_year" /> |
||||
|
<result property="dateMonth" column="sub_date_month" /> |
||||
|
<result property="dateDay" column="sub_date_day" /> |
||||
|
<result property="tenantId" column="sub_tenant_id" /> |
||||
|
<result property="revision" column="sub_revision" /> |
||||
|
<result property="createdBy" column="sub_created_by" /> |
||||
|
<result property="createdTime" column="sub_created_time" /> |
||||
|
<result property="updatedBy" column="sub_updated_by" /> |
||||
|
<result property="updatedTime" column="sub_updated_time" /> |
||||
|
<result property="deleteBy" column="sub_delete_by" /> |
||||
|
<result property="deleteTime" column="sub_delete_time" /> |
||||
|
</resultMap> |
||||
|
|
||||
|
<sql id="selectDcBusiPlanBillMasterVo"> |
||||
|
select id, bill_no, bill_income_date, bill_type, check_type, check_status, tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time, company_id, company_name, organize_name, oragnize_id from dc_busi_plan_bill_master |
||||
|
</sql> |
||||
|
|
||||
|
<select id="selectDcBusiPlanBillMasterList" parameterType="DcBusiPlanBillMaster" resultMap="DcBusiPlanBillMasterResult"> |
||||
|
<include refid="selectDcBusiPlanBillMasterVo"/> |
||||
|
<where> |
||||
|
<if test="billNo != null and billNo != ''"> and bill_no = #{billNo}</if> |
||||
|
<if test="billIncomeDate != null and billIncomeDate != ''"> and bill_income_date = #{billIncomeDate}</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="checkStatus != null and checkStatus != ''"> and check_status = #{checkStatus}</if> |
||||
|
<if test="companyId != null "> and company_id = #{companyId}</if> |
||||
|
<if test="oragnizeId != null "> and oragnize_id = #{oragnizeId}</if> |
||||
|
</where> |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectDcBusiPlanBillMasterById" parameterType="Long" resultMap="DcBusiPlanBillMasterDcBusiPlanBillSubResult"> |
||||
|
select a.id, a.bill_no, a.bill_income_date, a.bill_type, a.check_type, a.check_status, a.tenant_id, a.revision, a.created_by, a.created_time, a.updated_by, a.updated_time, a.delete_by, a.delete_time, a.company_id, a.company_name, a.organize_name, a.oragnize_id, |
||||
|
b.id as sub_id, b.bill_no as sub_bill_no, b.field_code as sub_field_code, b.field_name as sub_field_name, b.asset_code as sub_asset_code, b.asset_name as sub_asset_name, b.target_code as sub_target_code, b.taget_name as sub_taget_name, b.plan_value as sub_plan_value, b.date_year as sub_date_year, b.date_month as sub_date_month, b.date_day as sub_date_day, b.tenant_id as sub_tenant_id, b.revision as sub_revision, b.created_by as sub_created_by, b.created_time as sub_created_time, b.updated_by as sub_updated_by, b.updated_time as sub_updated_time, b.delete_by as sub_delete_by, b.delete_time as sub_delete_time |
||||
|
from dc_busi_plan_bill_master a |
||||
|
left join dc_busi_plan_bill_sub b on b.bill_no = a.id |
||||
|
where a.id = #{id} |
||||
|
</select> |
||||
|
|
||||
|
<insert id="insertDcBusiPlanBillMaster" parameterType="DcBusiPlanBillMaster" useGeneratedKeys="true" keyProperty="id"> |
||||
|
insert into dc_busi_plan_bill_master |
||||
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
||||
|
<if test="billNo != null">bill_no,</if> |
||||
|
<if test="billIncomeDate != null">bill_income_date,</if> |
||||
|
<if test="billType != null">bill_type,</if> |
||||
|
<if test="checkType != null">check_type,</if> |
||||
|
<if test="checkStatus != null">check_status,</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> |
||||
|
<if test="companyId != null">company_id,</if> |
||||
|
<if test="companyName != null">company_name,</if> |
||||
|
<if test="organizeName != null">organize_name,</if> |
||||
|
<if test="oragnizeId != null">oragnize_id,</if> |
||||
|
</trim> |
||||
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
||||
|
<if test="billNo != null">#{billNo},</if> |
||||
|
<if test="billIncomeDate != null">#{billIncomeDate},</if> |
||||
|
<if test="billType != null">#{billType},</if> |
||||
|
<if test="checkType != null">#{checkType},</if> |
||||
|
<if test="checkStatus != null">#{checkStatus},</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> |
||||
|
<if test="companyId != null">#{companyId},</if> |
||||
|
<if test="companyName != null">#{companyName},</if> |
||||
|
<if test="organizeName != null">#{organizeName},</if> |
||||
|
<if test="oragnizeId != null">#{oragnizeId},</if> |
||||
|
</trim> |
||||
|
</insert> |
||||
|
|
||||
|
<update id="updateDcBusiPlanBillMaster" parameterType="DcBusiPlanBillMaster"> |
||||
|
update dc_busi_plan_bill_master |
||||
|
<trim prefix="SET" suffixOverrides=","> |
||||
|
<if test="billNo != null">bill_no = #{billNo},</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="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="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 id = #{id} |
||||
|
</update> |
||||
|
|
||||
|
<delete id="deleteDcBusiPlanBillMasterById" parameterType="Long"> |
||||
|
delete from dc_busi_plan_bill_master where id = #{id} |
||||
|
</delete> |
||||
|
|
||||
|
<delete id="deleteDcBusiPlanBillMasterByIds" parameterType="String"> |
||||
|
delete from dc_busi_plan_bill_master where id in |
||||
|
<foreach item="id" collection="array" open="(" separator="," close=")"> |
||||
|
#{id} |
||||
|
</foreach> |
||||
|
</delete> |
||||
|
|
||||
|
<delete id="deleteDcBusiPlanBillSubByBillNos" parameterType="String"> |
||||
|
delete from dc_busi_plan_bill_sub where bill_no in |
||||
|
<foreach item="billNo" collection="array" open="(" separator="," close=")"> |
||||
|
#{billNo} |
||||
|
</foreach> |
||||
|
</delete> |
||||
|
|
||||
|
<delete id="deleteDcBusiPlanBillSubByBillNo" parameterType="Long"> |
||||
|
delete from dc_busi_plan_bill_sub where bill_no = #{billNo} |
||||
|
</delete> |
||||
|
|
||||
|
<insert id="batchDcBusiPlanBillSub"> |
||||
|
insert into dc_busi_plan_bill_sub( id, bill_no, field_code, field_name, asset_code, asset_name, target_code, taget_name, plan_value, date_year, date_month, date_day, tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time) values |
||||
|
<foreach item="item" index="index" collection="list" separator=","> |
||||
|
( #{item.id}, #{item.billNo}, #{item.fieldCode}, #{item.fieldName}, #{item.assetCode}, #{item.assetName}, #{item.targetCode}, #{item.tagetName}, #{item.planValue}, #{item.dateYear}, #{item.dateMonth}, #{item.dateDay}, #{item.tenantId}, #{item.revision}, #{item.createdBy}, #{item.createdTime}, #{item.updatedBy}, #{item.updatedTime}, #{item.deleteBy}, #{item.deleteTime}) |
||||
|
</foreach> |
||||
|
</insert> |
||||
|
</mapper> |
@ -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.bill.mapper.DcBusiPlanBillSubMapper"> |
||||
|
|
||||
|
<resultMap type="com.lzbi.bill.domain.DcBusiPlanBillSub" id="DcBusiPlanBillSubResult"> |
||||
|
<result property="id" column="id" /> |
||||
|
<result property="billNo" column="bill_no" /> |
||||
|
<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="targetCode" column="target_code" /> |
||||
|
<result property="tagetName" column="taget_name" /> |
||||
|
<result property="planValue" column="plan_value" /> |
||||
|
<result property="dateYear" column="date_year" /> |
||||
|
<result property="dateMonth" column="date_month" /> |
||||
|
<result property="dateDay" column="date_day" /> |
||||
|
<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="selectDcBusiPlanBillSubVo"> |
||||
|
select id, bill_no, field_code, field_name, asset_code, asset_name, target_code, taget_name, plan_value, date_year, date_month, date_day, tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time from dc_busi_plan_bill_sub |
||||
|
</sql> |
||||
|
|
||||
|
<select id="selectDcBusiPlanBillSubList" parameterType="DcBusiPlanBillSub" resultMap="DcBusiPlanBillSubResult"> |
||||
|
<include refid="selectDcBusiPlanBillSubVo"/> |
||||
|
<where> |
||||
|
<if test="billNo != null and billNo != ''"> and bill_no = #{billNo}</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> |
||||
|
<if test="targetCode != null and targetCode != ''"> and target_code = #{targetCode}</if> |
||||
|
<if test="tagetName != null and tagetName != ''"> and taget_name like concat('%', #{tagetName}, '%')</if> |
||||
|
<if test="planValue != null "> and plan_value = #{planValue}</if> |
||||
|
<if test="dateYear != null and dateYear != ''"> and date_year = #{dateYear}</if> |
||||
|
<if test="dateMonth != null and dateMonth != ''"> and date_month = #{dateMonth}</if> |
||||
|
<if test="dateDay != null and dateDay != ''"> and date_day = #{dateDay}</if> |
||||
|
</where> |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectDcBusiPlanBillSubById" parameterType="Long" resultMap="DcBusiPlanBillSubResult"> |
||||
|
<include refid="selectDcBusiPlanBillSubVo"/> |
||||
|
where id = #{id} |
||||
|
</select> |
||||
|
|
||||
|
<insert id="insertDcBusiPlanBillSub" parameterType="DcBusiPlanBillSub" useGeneratedKeys="true" keyProperty="id"> |
||||
|
insert into dc_busi_plan_bill_sub |
||||
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
||||
|
<if test="billNo != null">bill_no,</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="targetCode != null">target_code,</if> |
||||
|
<if test="tagetName != null">taget_name,</if> |
||||
|
<if test="planValue != null">plan_value,</if> |
||||
|
<if test="dateYear != null">date_year,</if> |
||||
|
<if test="dateMonth != null">date_month,</if> |
||||
|
<if test="dateDay != null">date_day,</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="fieldCode != null">#{fieldCode},</if> |
||||
|
<if test="fieldName != null">#{fieldName},</if> |
||||
|
<if test="assetCode != null">#{assetCode},</if> |
||||
|
<if test="assetName != null">#{assetName},</if> |
||||
|
<if test="targetCode != null">#{targetCode},</if> |
||||
|
<if test="tagetName != null">#{tagetName},</if> |
||||
|
<if test="planValue != null">#{planValue},</if> |
||||
|
<if test="dateYear != null">#{dateYear},</if> |
||||
|
<if test="dateMonth != null">#{dateMonth},</if> |
||||
|
<if test="dateDay != null">#{dateDay},</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="updateDcBusiPlanBillSub" parameterType="DcBusiPlanBillSub"> |
||||
|
update dc_busi_plan_bill_sub |
||||
|
<trim prefix="SET" suffixOverrides=","> |
||||
|
<if test="billNo != null">bill_no = #{billNo},</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="targetCode != null">target_code = #{targetCode},</if> |
||||
|
<if test="tagetName != null">taget_name = #{tagetName},</if> |
||||
|
<if test="planValue != null">plan_value = #{planValue},</if> |
||||
|
<if test="dateYear != null">date_year = #{dateYear},</if> |
||||
|
<if test="dateMonth != null">date_month = #{dateMonth},</if> |
||||
|
<if test="dateDay != null">date_day = #{dateDay},</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="deleteDcBusiPlanBillSubById" parameterType="Long"> |
||||
|
delete from dc_busi_plan_bill_sub where id = #{id} |
||||
|
</delete> |
||||
|
|
||||
|
<delete id="deleteDcBusiPlanBillSubByIds" parameterType="String"> |
||||
|
delete from dc_busi_plan_bill_sub where id in |
||||
|
<foreach item="id" collection="array" open="(" separator="," close=")"> |
||||
|
#{id} |
||||
|
</foreach> |
||||
|
</delete> |
||||
|
</mapper> |
Loading…
Reference in new issue