Browse Source

日指标计划改表名类名

develop
bobol 11 months ago
parent
commit
2459f52f45
  1. 70
      lzbi-module/src/main/java/com/lzbi/bill/controller/DcBusiDayPlanBillMasterController.java
  2. 131
      lzbi-module/src/main/java/com/lzbi/bill/controller/DcBusiPlanBillSubController.java
  3. 8
      lzbi-module/src/main/java/com/lzbi/bill/domain/DcBusiDayPlanBillMaster.java
  4. 7
      lzbi-module/src/main/java/com/lzbi/bill/domain/DcBusiDayPlanBillSub.java
  5. 31
      lzbi-module/src/main/java/com/lzbi/bill/mapper/DcBusiDayPlanBillMasterMapper.java
  6. 19
      lzbi-module/src/main/java/com/lzbi/bill/mapper/DcBusiDayPlanBillSubMapper.java
  7. 115
      lzbi-module/src/main/java/com/lzbi/bill/service/DcBusiDayPlanBillMasterService.java
  8. 31
      lzbi-module/src/main/java/com/lzbi/bill/service/DcBusiDayPlanBillSubService.java
  9. 40
      lzbi-module/src/main/resources/mapper/asset/DcBusiDayPlanBillMasterMapper.xml
  10. 20
      lzbi-module/src/main/resources/mapper/asset/DcBusiDayPlanBillSubMapper.xml

70
lzbi-module/src/main/java/com/lzbi/bill/controller/DcBusiPlanBillMasterController.java → lzbi-module/src/main/java/com/lzbi/bill/controller/DcBusiDayPlanBillMasterController.java

@ -1,7 +1,5 @@
package com.lzbi.bill.controller;
import com.lzbi.common.utils.DateUtils;
import com.lzbi.common.utils.SecurityUtils;
import com.lzbi.draft.domain.DcBusiTargetBillMaster;
import com.lzbi.bill.domain.DcBusiDayPlanBillMaster;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
@ -21,37 +19,36 @@ 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.bill.service.DcBusiDayPlanBillMasterService;
import com.lzbi.common.utils.poi.ExcelUtil;
import com.lzbi.common.core.page.TableDataInfo;
/**
* 计划单据主Controller
* 日计划计划单据主Controller
*
* @author lienbo
* @date 2023-12-21
*/
@RestController
@RequestMapping("/bill/planBillMaster")
public class DcBusiPlanBillMasterController extends BaseController
@RequestMapping("/bill/dayPlanBill")
public class DcBusiDayPlanBillMasterController extends BaseController
{
@Autowired
private DcBusiPlanBillMasterService dcBusiPlanBillMasterService;
private DcBusiDayPlanBillMasterService dcBusiDayPlanBillMasterService;
/**
* 查询计划单据主列表
*/
@ApiOperation("查询计划单据主列表")
@ApiImplicitParams({
@ApiImplicitParam(name = "DcBusiPlanBillMaster", value = "", dataType = "DcBusiPlanBillMaster", dataTypeClass = DcBusiPlanBillMaster.class),
@ApiImplicitParam(name = "DcBusiDayPlanBillMaster", value = "", dataType = "DcBusiDayPlanBillMaster", dataTypeClass = DcBusiDayPlanBillMaster.class),
})
@PreAuthorize("@ss.hasPermi('bill:planBillMaster:list')")
@PreAuthorize("@ss.hasPermi('bill:dayPlanBill:list')")
@GetMapping("/list")
public TableDataInfo list(DcBusiPlanBillMaster DcBusiPlanBillMaster)
public TableDataInfo list(DcBusiDayPlanBillMaster DcBusiDayPlanBillMaster)
{
startPage();
List< DcBusiPlanBillMaster> list = dcBusiPlanBillMasterService.selectDcBusiPlanBillMasterList(DcBusiPlanBillMaster);
List<DcBusiDayPlanBillMaster> list = dcBusiDayPlanBillMasterService.selectDcBusiPlanBillMasterList(DcBusiDayPlanBillMaster);
return getDataTable(list);
}
@ -60,15 +57,15 @@ public class DcBusiPlanBillMasterController extends BaseController
*/
@ApiOperation("导出计划单据主列表")
@ApiImplicitParams({
@ApiImplicitParam(name = "DcBusiPlanBillMaster", value = "", dataType = "DcBusiPlanBillMaster", dataTypeClass = DcBusiPlanBillMaster.class),
@ApiImplicitParam(name = "DcBusiDayPlanBillMaster", value = "", dataType = "DcBusiDayPlanBillMaster", dataTypeClass = DcBusiDayPlanBillMaster.class),
})
@PreAuthorize("@ss.hasPermi('bill:planBillMaster:export')")
@PreAuthorize("@ss.hasPermi('bill:dayPlanBill:export')")
@Log(title = "计划单据主", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response,DcBusiPlanBillMaster DcBusiPlanBillMaster)
public void export(HttpServletResponse response, DcBusiDayPlanBillMaster DcBusiDayPlanBillMaster)
{
List<DcBusiPlanBillMaster> list = dcBusiPlanBillMasterService.selectDcBusiPlanBillMasterList(DcBusiPlanBillMaster);
ExcelUtil<DcBusiPlanBillMaster> util = new ExcelUtil<DcBusiPlanBillMaster>(DcBusiPlanBillMaster.class);
List<DcBusiDayPlanBillMaster> list = dcBusiDayPlanBillMasterService.selectDcBusiPlanBillMasterList(DcBusiDayPlanBillMaster);
ExcelUtil<DcBusiDayPlanBillMaster> util = new ExcelUtil<DcBusiDayPlanBillMaster>(DcBusiDayPlanBillMaster.class);
util.exportExcel(response, list, "计划单据主数据");
}
@ -79,11 +76,11 @@ public class DcBusiPlanBillMasterController extends BaseController
@ApiImplicitParams({
@ApiImplicitParam(name = "id", value = "", dataType = "Long", dataTypeClass = Long.class),
})
@PreAuthorize("@ss.hasPermi('bill:planBillMaster:query')")
@PreAuthorize("@ss.hasPermi('bill:dayPlanBill:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(dcBusiPlanBillMasterService.selectDcBusiPlanBillMasterById(id));
return success(dcBusiDayPlanBillMasterService.selectDcBusiPlanBillMasterById(id));
}
/**
@ -93,11 +90,11 @@ public class DcBusiPlanBillMasterController extends BaseController
@ApiImplicitParams({
@ApiImplicitParam(name = "billNo", value = "", dataType = "String", dataTypeClass = String.class),
})
@PreAuthorize("@ss.hasPermi('bill:planBillMaster:query')")
@PreAuthorize("@ss.hasPermi('bill:dayPlanBill:query')")
@GetMapping(value = "/billNo/{billNo}")
public AjaxResult getInfo(@PathVariable("billNo") String billNo)
{
return success(dcBusiPlanBillMasterService.selectDcBusiPlanBillMasterByBillNo(billNo));
return success(dcBusiDayPlanBillMasterService.selectDcBusiPlanBillMasterByBillNo(billNo));
}
/**
@ -105,14 +102,14 @@ public class DcBusiPlanBillMasterController extends BaseController
*/
@ApiOperation("新增计划单据主")
@ApiImplicitParams({
@ApiImplicitParam(name = "DcBusiPlanBillMaster", value = "", dataType = "DcBusiPlanBillMaster", dataTypeClass = DcBusiPlanBillMaster.class),
@ApiImplicitParam(name = "DcBusiDayPlanBillMaster", value = "", dataType = "DcBusiDayPlanBillMaster", dataTypeClass = DcBusiDayPlanBillMaster.class),
})
@PreAuthorize("@ss.hasPermi('bill:planBillMaster:add')")
@PreAuthorize("@ss.hasPermi('bill:dayPlanBill:add')")
@Log(title = "计划单据主", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody DcBusiPlanBillMaster DcBusiPlanBillMaster)
public AjaxResult add(@RequestBody DcBusiDayPlanBillMaster DcBusiDayPlanBillMaster)
{
return toAjax(dcBusiPlanBillMasterService.insertDcBusiPlanBillMaster(DcBusiPlanBillMaster));
return toAjax(dcBusiDayPlanBillMasterService.insertDcBusiPlanBillMaster(DcBusiDayPlanBillMaster));
}
/**
@ -121,14 +118,14 @@ public class DcBusiPlanBillMasterController extends BaseController
@ApiOperation("修改计划单据主")
@ApiImplicitParams({
@ApiImplicitParam(name = "DcBusiPlanBillMaster", value = "", dataType = "DcBusiPlanBillMaster", dataTypeClass = DcBusiPlanBillMaster.class),
@ApiImplicitParam(name = "DcBusiDayPlanBillMaster", value = "", dataType = "DcBusiDayPlanBillMaster", dataTypeClass = DcBusiDayPlanBillMaster.class),
})
@PreAuthorize("@ss.hasPermi('bill:planBillMaster:edit')")
@PreAuthorize("@ss.hasPermi('bill:dayPlanBill:edit')")
@Log(title = "计划单据主", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DcBusiPlanBillMaster DcBusiPlanBillMaster)
public AjaxResult edit(@RequestBody DcBusiDayPlanBillMaster DcBusiDayPlanBillMaster)
{
return toAjax(dcBusiPlanBillMasterService.updateDcBusiPlanBillMaster(DcBusiPlanBillMaster));
return toAjax(dcBusiDayPlanBillMasterService.updateDcBusiPlanBillMaster(DcBusiDayPlanBillMaster));
}
/**
@ -138,39 +135,42 @@ public class DcBusiPlanBillMasterController extends BaseController
@ApiImplicitParams({
@ApiImplicitParam(name = "ids", value = "", dataType = "Long", dataTypeClass =Long.class),
})
@PreAuthorize("@ss.hasPermi('bill:planBillMaster:remove')")
@PreAuthorize("@ss.hasPermi('bill:dayPlanBill:remove')")
@Log(title = "计划单据主", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(dcBusiPlanBillMasterService.deleteDcBusiPlanBillMasterByIds(ids));
return toAjax(dcBusiDayPlanBillMasterService.deleteDcBusiPlanBillMasterByIds(ids));
}
@ApiOperation("驳回")
@PreAuthorize("@ss.hasPermi('bill:dayPlanBill:check')")
@ApiImplicitParams({
@ApiImplicitParam(name = "billNo", value = "", dataType = "String", dataTypeClass = String.class),
})
@PostMapping("/checkBack/{billNo}")
public AjaxResult checkBack(@PathVariable String billNo){
return AjaxResult.success(dcBusiPlanBillMasterService.checkBack(billNo));
return AjaxResult.success(dcBusiDayPlanBillMasterService.checkBack(billNo));
}
@ApiOperation("审核")
@PreAuthorize("@ss.hasPermi('bill:dayPlanBill:check')")
@ApiImplicitParams({
@ApiImplicitParam(name = "billNo", value = "", dataType = "String", dataTypeClass = String.class),
})
@PostMapping("/checkPass/{billNo}")
public AjaxResult checkPass(@PathVariable String billNo){
return AjaxResult.success(dcBusiPlanBillMasterService.checkPass(billNo));
return AjaxResult.success(dcBusiDayPlanBillMasterService.checkPass(billNo));
}
@ApiOperation("反审核")
@PreAuthorize("@ss.hasPermi('bill:dayPlanBill:check')")
@ApiImplicitParams({
@ApiImplicitParam(name = "billNo", value = "", dataType = "String", dataTypeClass = String.class),
})
@PostMapping("/checkRevert/{billNo}")
public AjaxResult checkRevert(@PathVariable String billNo){
return AjaxResult.success(dcBusiPlanBillMasterService.checkRevert(billNo));
return AjaxResult.success(dcBusiDayPlanBillMasterService.checkRevert(billNo));
}
}

131
lzbi-module/src/main/java/com/lzbi/bill/controller/DcBusiPlanBillSubController.java

@ -1,131 +0,0 @@
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));
}
}

8
lzbi-module/src/main/java/com/lzbi/bill/domain/DcBusiPlanBillMaster.java → lzbi-module/src/main/java/com/lzbi/bill/domain/DcBusiDayPlanBillMaster.java

@ -2,9 +2,7 @@ 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;
@ -19,7 +17,7 @@ import com.lzbi.module.base.BaseModuleEntity;
*/
@Data
@Accessors(chain = true)
public class DcBusiPlanBillMaster extends BaseModuleEntity
public class DcBusiDayPlanBillMaster extends BaseModuleEntity
{
private static final long serialVersionUID = 1L;
@ -86,6 +84,6 @@ public class DcBusiPlanBillMaster extends BaseModuleEntity
private String fieldName;
/** 计划单据明细信息 */
private List<DcBusiPlanBillSub> dcBusiPlanBillSubList;
private List<DcBusiDayPlanBillSub> dcBusiDayPlanBillSubList;
}

7
lzbi-module/src/main/java/com/lzbi/bill/domain/DcBusiPlanBillSub.java → lzbi-module/src/main/java/com/lzbi/bill/domain/DcBusiDayPlanBillSub.java

@ -2,12 +2,9 @@ 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
@ -16,7 +13,7 @@ import com.lzbi.module.base.BaseModuleEntity;
* @date 2023-12-21
*/
@Data
public class DcBusiPlanBillSub
public class DcBusiDayPlanBillSub
{
private static final long serialVersionUID = 1L;

31
lzbi-module/src/main/java/com/lzbi/bill/mapper/DcBusiPlanBillMasterMapper.java → lzbi-module/src/main/java/com/lzbi/bill/mapper/DcBusiDayPlanBillMasterMapper.java

@ -1,9 +1,10 @@
package com.lzbi.bill.mapper;
import java.util.List;
import com.lzbi.bill.domain.DcBusiPlanBillMaster;
import com.lzbi.bill.domain.DcBusiDayPlanBillMaster;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lzbi.bill.domain.DcBusiPlanBillSub;
import com.lzbi.bill.domain.DcBusiDayPlanBillSub;
/**
* 计划单据主Mapper接口
@ -12,7 +13,7 @@ import com.lzbi.bill.domain.DcBusiPlanBillSub;
* @date 2023-12-21
*/
public interface DcBusiPlanBillMasterMapper extends BaseMapper<DcBusiPlanBillMaster>
public interface DcBusiDayPlanBillMasterMapper extends BaseMapper<DcBusiDayPlanBillMaster>
{
/**
* 查询计划单据主
@ -20,47 +21,47 @@ public interface DcBusiPlanBillMasterMapper extends BaseMapper<DcBusiPlanBillMas
* @param id 计划单据主主键
* @return 计划单据主
*/
public DcBusiPlanBillMaster selectDcBusiPlanBillMasterById(Long id);
public DcBusiDayPlanBillMaster selectDcBusiPlanBillMasterById(Long id);
/**
* 查询计划单据主
*
* @param billNo 单据号
* @return 计划单据主
*/
public DcBusiPlanBillMaster selectDcBusiPlanBillMasterByBillNo(String billNo);
public DcBusiDayPlanBillMaster selectDcBusiPlanBillMasterByBillNo(String billNo);
/**
* 查询计划单据主列表
*
* @param dcBusiPlanBillMaster 计划单据主
* @param dcBusiDayPlanBillMaster 计划单据主
* @return 计划单据主集合
*/
public List<DcBusiPlanBillMaster> selectDcBusiPlanBillMasterList(DcBusiPlanBillMaster dcBusiPlanBillMaster);
public List<DcBusiDayPlanBillMaster> selectDcBusiPlanBillMasterList(DcBusiDayPlanBillMaster dcBusiDayPlanBillMaster);
/**
* 新增计划单据主
*
* @param dcBusiPlanBillMaster 计划单据主
* @param dcBusiDayPlanBillMaster 计划单据主
* @return 结果
*/
public int insertDcBusiPlanBillMaster(DcBusiPlanBillMaster dcBusiPlanBillMaster);
public int insertDcBusiPlanBillMaster(DcBusiDayPlanBillMaster dcBusiDayPlanBillMaster);
/**
* 修改计划单据主
*
* @param dcBusiPlanBillMaster 计划单据主
* @param dcBusiDayPlanBillMaster 计划单据主
* @return 结果
*/
public int updateDcBusiPlanBillMaster(DcBusiPlanBillMaster dcBusiPlanBillMaster);
public int updateDcBusiPlanBillMaster(DcBusiDayPlanBillMaster dcBusiDayPlanBillMaster);
/**
* 修改计划单据主
*
* @param dcBusiPlanBillMaster 计划单据主
* @param dcBusiDayPlanBillMaster 计划单据主
* @return 结果
*/
public int updateDcBusiPlanBillMasterByBillNo(DcBusiPlanBillMaster dcBusiPlanBillMaster);
public int updateDcBusiPlanBillMasterByBillNo(DcBusiDayPlanBillMaster dcBusiDayPlanBillMaster);
/**
* 删除计划单据主
@ -89,10 +90,10 @@ public interface DcBusiPlanBillMasterMapper extends BaseMapper<DcBusiPlanBillMas
/**
* 批量新增计划单据明细
*
* @param dcBusiPlanBillSubList 计划单据明细列表
* @param dcBusiDayPlanBillSubList 计划单据明细列表
* @return 结果
*/
public int batchDcBusiPlanBillSub(List<DcBusiPlanBillSub> dcBusiPlanBillSubList);
public int batchDcBusiPlanBillSub(List<DcBusiDayPlanBillSub> dcBusiDayPlanBillSubList);
/**

19
lzbi-module/src/main/java/com/lzbi/bill/mapper/DcBusiPlanBillSubMapper.java → lzbi-module/src/main/java/com/lzbi/bill/mapper/DcBusiDayPlanBillSubMapper.java

@ -1,7 +1,8 @@
package com.lzbi.bill.mapper;
import java.util.List;
import com.lzbi.bill.domain.DcBusiPlanBillSub;
import com.lzbi.bill.domain.DcBusiDayPlanBillSub;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
@ -11,7 +12,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @date 2023-12-21
*/
public interface DcBusiPlanBillSubMapper extends BaseMapper<DcBusiPlanBillSub>
public interface DcBusiDayPlanBillSubMapper extends BaseMapper<DcBusiDayPlanBillSub>
{
/**
* 查询计划单据明细
@ -19,31 +20,31 @@ public interface DcBusiPlanBillSubMapper extends BaseMapper<DcBusiPlanBillSub>
* @param id 计划单据明细主键
* @return 计划单据明细
*/
public DcBusiPlanBillSub selectDcBusiPlanBillSubById(Long id);
public DcBusiDayPlanBillSub selectDcBusiPlanBillSubById(Long id);
/**
* 查询计划单据明细列表
*
* @param dcBusiPlanBillSub 计划单据明细
* @param dcBusiDayPlanBillSub 计划单据明细
* @return 计划单据明细集合
*/
public List<DcBusiPlanBillSub> selectDcBusiPlanBillSubList(DcBusiPlanBillSub dcBusiPlanBillSub);
public List<DcBusiDayPlanBillSub> selectDcBusiPlanBillSubList(DcBusiDayPlanBillSub dcBusiDayPlanBillSub);
/**
* 新增计划单据明细
*
* @param dcBusiPlanBillSub 计划单据明细
* @param dcBusiDayPlanBillSub 计划单据明细
* @return 结果
*/
public int insertDcBusiPlanBillSub(DcBusiPlanBillSub dcBusiPlanBillSub);
public int insertDcBusiPlanBillSub(DcBusiDayPlanBillSub dcBusiDayPlanBillSub);
/**
* 修改计划单据明细
*
* @param dcBusiPlanBillSub 计划单据明细
* @param dcBusiDayPlanBillSub 计划单据明细
* @return 结果
*/
public int updateDcBusiPlanBillSub(DcBusiPlanBillSub dcBusiPlanBillSub);
public int updateDcBusiPlanBillSub(DcBusiDayPlanBillSub dcBusiDayPlanBillSub);
/**
* 删除计划单据明细

115
lzbi-module/src/main/java/com/lzbi/bill/service/DcBusiPlanBillMasterService.java → lzbi-module/src/main/java/com/lzbi/bill/service/DcBusiDayPlanBillMasterService.java

@ -4,10 +4,10 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lzbi.bi.domain.DcBusiTargetDraftDaynew;
import com.lzbi.bi.mapper.DcBusiTargetDraftDaynewMapper;
import com.lzbi.bill.domain.DcBusiPlanBillMaster;
import com.lzbi.bill.domain.DcBusiPlanBillSub;
import com.lzbi.bill.mapper.DcBusiPlanBillMasterMapper;
import com.lzbi.bill.mapper.DcBusiPlanBillSubMapper;
import com.lzbi.bill.domain.DcBusiDayPlanBillMaster;
import com.lzbi.bill.domain.DcBusiDayPlanBillSub;
import com.lzbi.bill.mapper.DcBusiDayPlanBillMasterMapper;
import com.lzbi.bill.mapper.DcBusiDayPlanBillSubMapper;
import com.lzbi.common.core.domain.entity.SysDept;
import com.lzbi.common.utils.DateUtils;
import com.lzbi.common.utils.SecurityUtils;
@ -22,7 +22,6 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
/**
@ -32,13 +31,13 @@ import java.util.List;
* @date 2023-12-21
*/
@Service
public class DcBusiPlanBillMasterService extends ServiceImpl<DcBusiPlanBillMasterMapper, DcBusiPlanBillMaster> implements IService<DcBusiPlanBillMaster> {
public class DcBusiDayPlanBillMasterService extends ServiceImpl<DcBusiDayPlanBillMasterMapper, DcBusiDayPlanBillMaster> implements IService<DcBusiDayPlanBillMaster> {
@Autowired
private SysDeptServiceImpl sysDeptService;
@Resource
private DcBusiPlanBillSubMapper dcBusiPlanBillSubMapper;
private DcBusiDayPlanBillSubMapper dcBusiDayPlanBillSubMapper;
@Resource
private DcBusiTargetDraftDaynewMapper dcBusiTargetDraftDaynewMapper;
@ -52,83 +51,83 @@ public class DcBusiPlanBillMasterService extends ServiceImpl<DcBusiPlanBillMaste
* @param id 计划单据主主键
* @return 计划单据主
*/
public DcBusiPlanBillMaster selectDcBusiPlanBillMasterById(Long id) {
public DcBusiDayPlanBillMaster selectDcBusiPlanBillMasterById(Long id) {
return baseMapper.selectDcBusiPlanBillMasterById(id);
}
public DcBusiPlanBillMaster selectDcBusiPlanBillMasterByBillNo(String billNo) {
DcBusiPlanBillMaster dcBusiPlanBillMaster = baseMapper.selectDcBusiPlanBillMasterByBillNo(billNo);
DcBusiPlanBillSub params = new DcBusiPlanBillSub();
public DcBusiDayPlanBillMaster selectDcBusiPlanBillMasterByBillNo(String billNo) {
DcBusiDayPlanBillMaster dcBusiDayPlanBillMaster = baseMapper.selectDcBusiPlanBillMasterByBillNo(billNo);
DcBusiDayPlanBillSub params = new DcBusiDayPlanBillSub();
params.setBillNo(billNo);
List<DcBusiPlanBillSub> dcBusiPlanBillSubs = dcBusiPlanBillSubMapper.selectDcBusiPlanBillSubList(params);
if (!CollectionUtils.isEmpty(dcBusiPlanBillSubs)) {
dcBusiPlanBillMaster.setDcBusiPlanBillSubList(dcBusiPlanBillSubs);
dcBusiPlanBillMaster.setFieldCode(dcBusiPlanBillSubs.get(0).getFieldCode());
dcBusiPlanBillMaster.setFieldName(dcBusiPlanBillSubs.get(0).getFieldName());
List<DcBusiDayPlanBillSub> dcBusiDayPlanBillSubs = dcBusiDayPlanBillSubMapper.selectDcBusiPlanBillSubList(params);
if (!CollectionUtils.isEmpty(dcBusiDayPlanBillSubs)) {
dcBusiDayPlanBillMaster.setDcBusiDayPlanBillSubList(dcBusiDayPlanBillSubs);
dcBusiDayPlanBillMaster.setFieldCode(dcBusiDayPlanBillSubs.get(0).getFieldCode());
dcBusiDayPlanBillMaster.setFieldName(dcBusiDayPlanBillSubs.get(0).getFieldName());
}
return dcBusiPlanBillMaster;
return dcBusiDayPlanBillMaster;
}
/**
* 查询计划单据主列表
*
* @param dcBusiPlanBillMaster 计划单据主
* @param dcBusiDayPlanBillMaster 计划单据主
* @return 计划单据主
*/
public List<DcBusiPlanBillMaster> selectDcBusiPlanBillMasterList(DcBusiPlanBillMaster dcBusiPlanBillMaster) {
return baseMapper.selectDcBusiPlanBillMasterList(dcBusiPlanBillMaster);
public List<DcBusiDayPlanBillMaster> selectDcBusiPlanBillMasterList(DcBusiDayPlanBillMaster dcBusiDayPlanBillMaster) {
return baseMapper.selectDcBusiPlanBillMasterList(dcBusiDayPlanBillMaster);
}
/**
* 新增计划单据主
*
* @param dcBusiPlanBillMaster 计划单据主
* @param dcBusiDayPlanBillMaster 计划单据主
* @return 结果
*/
@Transactional
public int insertDcBusiPlanBillMaster(DcBusiPlanBillMaster dcBusiPlanBillMaster) {
DcBusiPlanBillMaster params = new DcBusiPlanBillMaster();
params.setBillNo(dcBusiPlanBillMaster.getBillNo());
List<DcBusiPlanBillMaster> dcBusiPlanBillMasters = this.selectDcBusiPlanBillMasterList(params);
public int insertDcBusiPlanBillMaster(DcBusiDayPlanBillMaster dcBusiDayPlanBillMaster) {
DcBusiDayPlanBillMaster params = new DcBusiDayPlanBillMaster();
params.setBillNo(dcBusiDayPlanBillMaster.getBillNo());
List<DcBusiDayPlanBillMaster> dcBusiDayPlanBillMasters = this.selectDcBusiPlanBillMasterList(params);
// 如果单据号重复了
if (!CollectionUtils.isEmpty(dcBusiPlanBillMasters)) {
if (!CollectionUtils.isEmpty(dcBusiDayPlanBillMasters)) {
throw new RuntimeException("单据号已存在,不可重复录入");
}
// 查询公司
SysDept company = sysDeptService.selectDeptById(dcBusiPlanBillMaster.getCompanyId());
SysDept company = sysDeptService.selectDeptById(dcBusiDayPlanBillMaster.getCompanyId());
if (ObjectUtils.isNotEmpty(company)) {
dcBusiPlanBillMaster.setCompanyName(company.getDeptName());
dcBusiDayPlanBillMaster.setCompanyName(company.getDeptName());
}
// 查询组织
SysDept organize = sysDeptService.selectDeptById(dcBusiPlanBillMaster.getOragnizeId());
SysDept organize = sysDeptService.selectDeptById(dcBusiDayPlanBillMaster.getOragnizeId());
if (ObjectUtils.isNotEmpty(organize)) {
dcBusiPlanBillMaster.setOrganizeName(organize.getDeptName());
dcBusiDayPlanBillMaster.setOrganizeName(organize.getDeptName());
}
dcBusiPlanBillMaster.setCreatedTime(DateUtils.getNowDate());
dcBusiPlanBillMaster.setCreatedBy(SecurityUtils.getLoginUser().getUsername());
int rows = baseMapper.insertDcBusiPlanBillMaster(dcBusiPlanBillMaster);
insertDcBusiPlanBillSub(dcBusiPlanBillMaster);
dcBusiDayPlanBillMaster.setCreatedTime(DateUtils.getNowDate());
dcBusiDayPlanBillMaster.setCreatedBy(SecurityUtils.getLoginUser().getUsername());
int rows = baseMapper.insertDcBusiPlanBillMaster(dcBusiDayPlanBillMaster);
insertDcBusiPlanBillSub(dcBusiDayPlanBillMaster);
return rows;
}
/**
* 修改计划单据主
*
* @param dcBusiPlanBillMaster 计划单据主
* @param dcBusiDayPlanBillMaster 计划单据主
* @return 结果
*/
@Transactional
public int updateDcBusiPlanBillMaster(DcBusiPlanBillMaster dcBusiPlanBillMaster) {
dcBusiPlanBillMaster.setUpdatedTime(DateUtils.getNowDate());
dcBusiPlanBillMaster.setUpdatedBy(SecurityUtils.getLoginUser().getUsername());
baseMapper.deleteDcBusiPlanBillSubByBillNo(dcBusiPlanBillMaster.getBillNo());
insertDcBusiPlanBillSub(dcBusiPlanBillMaster);
return baseMapper.updateDcBusiPlanBillMasterByBillNo(dcBusiPlanBillMaster);
public int updateDcBusiPlanBillMaster(DcBusiDayPlanBillMaster dcBusiDayPlanBillMaster) {
dcBusiDayPlanBillMaster.setUpdatedTime(DateUtils.getNowDate());
dcBusiDayPlanBillMaster.setUpdatedBy(SecurityUtils.getLoginUser().getUsername());
baseMapper.deleteDcBusiPlanBillSubByBillNo(dcBusiDayPlanBillMaster.getBillNo());
insertDcBusiPlanBillSub(dcBusiDayPlanBillMaster);
return baseMapper.updateDcBusiPlanBillMasterByBillNo(dcBusiDayPlanBillMaster);
}
public int checkBack(String billNo) {
DcBusiPlanBillMaster master = new DcBusiPlanBillMaster();
DcBusiDayPlanBillMaster master = new DcBusiDayPlanBillMaster();
master.setBillNo(billNo);
master.setUpdatedBy(SecurityUtils.getUsername());
master.setCreatedTime(DateUtils.getNowDate());
@ -139,7 +138,7 @@ public class DcBusiPlanBillMasterService extends ServiceImpl<DcBusiPlanBillMaste
@Transactional(rollbackFor = Exception.class)
public int checkPass(String billNo) {
// 查询主表数据
DcBusiPlanBillMaster master = baseMapper.selectDcBusiPlanBillMasterByBillNo(billNo);
DcBusiDayPlanBillMaster master = baseMapper.selectDcBusiPlanBillMasterByBillNo(billNo);
if ("0".equals(master.getCheckStatus())) {
throw new RuntimeException("审核失败,单据未提交");
}
@ -147,9 +146,9 @@ public class DcBusiPlanBillMasterService extends ServiceImpl<DcBusiPlanBillMaste
throw new RuntimeException("审核失败,单据已审核");
}
// 查询子表数据
DcBusiPlanBillSub subParams = new DcBusiPlanBillSub();
DcBusiDayPlanBillSub subParams = new DcBusiDayPlanBillSub();
subParams.setBillNo(billNo);
List<DcBusiPlanBillSub> subList = dcBusiPlanBillSubMapper.selectDcBusiPlanBillSubList(subParams);
List<DcBusiDayPlanBillSub> subList = dcBusiDayPlanBillSubMapper.selectDcBusiPlanBillSubList(subParams);
if (!CollectionUtils.isEmpty(subList)) {
// 循环修改底稿表数据
for (int i = 0, len = subList.size(); i < len; i++) {
@ -194,7 +193,7 @@ public class DcBusiPlanBillMasterService extends ServiceImpl<DcBusiPlanBillMaste
@Transactional(rollbackFor = Exception.class)
public int checkRevert(String billNo) {
// 查询主表
DcBusiPlanBillMaster master = baseMapper.selectDcBusiPlanBillMasterByBillNo(billNo);
DcBusiDayPlanBillMaster master = baseMapper.selectDcBusiPlanBillMasterByBillNo(billNo);
if ("0".equals(master.getCheckStatus())) {
throw new RuntimeException("反审核失败,单据未提交");
}
@ -204,9 +203,9 @@ public class DcBusiPlanBillMasterService extends ServiceImpl<DcBusiPlanBillMaste
// 如果单据状态为已审核状态,需要把底稿表数据恢复
if ("2".equals(master.getCheckStatus())) {
// 查询子表数据
DcBusiPlanBillSub subParams = new DcBusiPlanBillSub();
DcBusiDayPlanBillSub subParams = new DcBusiDayPlanBillSub();
subParams.setBillNo(billNo);
List<DcBusiPlanBillSub> subList = dcBusiPlanBillSubMapper.selectDcBusiPlanBillSubList(subParams);
List<DcBusiDayPlanBillSub> subList = dcBusiDayPlanBillSubMapper.selectDcBusiPlanBillSubList(subParams);
for (int i = 0, len = subList.size(); i < len; i++) {
DcBusiTargetDraftDaynew dcBusiTargetDraftDaynew = new DcBusiTargetDraftDaynew();
dcBusiTargetDraftDaynew.setCompanyId(master.getCompanyId());
@ -255,9 +254,9 @@ public class DcBusiPlanBillMasterService extends ServiceImpl<DcBusiPlanBillMaste
@Transactional
public int deleteDcBusiPlanBillMasterById(Long id) {
DcBusiPlanBillMaster dcBusiPlanBillMaster = baseMapper.selectDcBusiPlanBillMasterById(id);
if (ObjectUtils.isNotEmpty(dcBusiPlanBillMaster)) {
baseMapper.deleteDcBusiPlanBillSubByBillNo(dcBusiPlanBillMaster.getBillNo());
DcBusiDayPlanBillMaster dcBusiDayPlanBillMaster = baseMapper.selectDcBusiPlanBillMasterById(id);
if (ObjectUtils.isNotEmpty(dcBusiDayPlanBillMaster)) {
baseMapper.deleteDcBusiPlanBillSubByBillNo(dcBusiDayPlanBillMaster.getBillNo());
}
return baseMapper.deleteDcBusiPlanBillMasterById(id);
}
@ -265,14 +264,14 @@ public class DcBusiPlanBillMasterService extends ServiceImpl<DcBusiPlanBillMaste
/**
* 新增计划单据明细信息
*
* @param dcBusiPlanBillMaster 计划单据主对象
* @param dcBusiDayPlanBillMaster 计划单据主对象
*/
public void insertDcBusiPlanBillSub(DcBusiPlanBillMaster dcBusiPlanBillMaster) {
List<DcBusiPlanBillSub> dcBusiPlanBillSubDaoList = dcBusiPlanBillMaster.getDcBusiPlanBillSubList();
if (StringUtils.isNotNull(dcBusiPlanBillSubDaoList)) {
for (DcBusiPlanBillSub dcBusiPlanBillSubDao : dcBusiPlanBillSubDaoList) {
dcBusiPlanBillSubDao.setBillNo(dcBusiPlanBillMaster.getBillNo());
dcBusiPlanBillSubMapper.insertDcBusiPlanBillSub(dcBusiPlanBillSubDao);
public void insertDcBusiPlanBillSub(DcBusiDayPlanBillMaster dcBusiDayPlanBillMaster) {
List<DcBusiDayPlanBillSub> dcBusiDayPlanBillSubDaoList = dcBusiDayPlanBillMaster.getDcBusiDayPlanBillSubList();
if (StringUtils.isNotNull(dcBusiDayPlanBillSubDaoList)) {
for (DcBusiDayPlanBillSub dcBusiDayPlanBillSubDao : dcBusiDayPlanBillSubDaoList) {
dcBusiDayPlanBillSubDao.setBillNo(dcBusiDayPlanBillMaster.getBillNo());
dcBusiDayPlanBillSubMapper.insertDcBusiPlanBillSub(dcBusiDayPlanBillSubDao);
}
}
}

31
lzbi-module/src/main/java/com/lzbi/bill/service/DcBusiPlanBillSubService.java → lzbi-module/src/main/java/com/lzbi/bill/service/DcBusiDayPlanBillSubService.java

@ -1,10 +1,11 @@
package com.lzbi.bill.service;
import java.util.List;
import com.lzbi.bill.domain.DcBusiDayPlanBillSub;
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.lzbi.bill.mapper.DcBusiDayPlanBillSubMapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
@ -14,7 +15,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
* @date 2023-12-21
*/
@Service
public class DcBusiPlanBillSubService extends ServiceImpl<DcBusiPlanBillSubMapper, DcBusiPlanBillSub> implements IService<DcBusiPlanBillSub>
public class DcBusiDayPlanBillSubService extends ServiceImpl<DcBusiDayPlanBillSubMapper, DcBusiDayPlanBillSub> implements IService<DcBusiDayPlanBillSub>
{
/**
@ -23,7 +24,7 @@ public class DcBusiPlanBillSubService extends ServiceImpl<DcBusiPlanBillSubMappe
* @param id 计划单据明细主键
* @return 计划单据明细
*/
public DcBusiPlanBillSub selectDcBusiPlanBillSubById(Long id)
public DcBusiDayPlanBillSub selectDcBusiPlanBillSubById(Long id)
{
return baseMapper.selectDcBusiPlanBillSubById(id);
}
@ -31,38 +32,38 @@ public class DcBusiPlanBillSubService extends ServiceImpl<DcBusiPlanBillSubMappe
/**
* 查询计划单据明细列表
*
* @param dcBusiPlanBillSub 计划单据明细
* @param dcBusiDayPlanBillSub 计划单据明细
* @return 计划单据明细
*/
public List<DcBusiPlanBillSub> selectDcBusiPlanBillSubList(DcBusiPlanBillSub dcBusiPlanBillSub)
public List<DcBusiDayPlanBillSub> selectDcBusiPlanBillSubList(DcBusiDayPlanBillSub dcBusiDayPlanBillSub)
{
return baseMapper.selectDcBusiPlanBillSubList(dcBusiPlanBillSub);
return baseMapper.selectDcBusiPlanBillSubList(dcBusiDayPlanBillSub);
}
/**
* 新增计划单据明细
*
* @param dcBusiPlanBillSub 计划单据明细
* @param dcBusiDayPlanBillSub 计划单据明细
* @return 结果
*/
public int insertDcBusiPlanBillSub(DcBusiPlanBillSub dcBusiPlanBillSub)
public int insertDcBusiPlanBillSub(DcBusiDayPlanBillSub dcBusiDayPlanBillSub)
{
dcBusiPlanBillSub.setCreatedTime(DateUtils.getNowDate());
return baseMapper.insertDcBusiPlanBillSub(dcBusiPlanBillSub);
dcBusiDayPlanBillSub.setCreatedTime(DateUtils.getNowDate());
return baseMapper.insertDcBusiPlanBillSub(dcBusiDayPlanBillSub);
}
/**
* 修改计划单据明细
*
* @param dcBusiPlanBillSub 计划单据明细
* @param dcBusiDayPlanBillSub 计划单据明细
* @return 结果
*/
public int updateDcBusiPlanBillSub(DcBusiPlanBillSub dcBusiPlanBillSub)
public int updateDcBusiPlanBillSub(DcBusiDayPlanBillSub dcBusiDayPlanBillSub)
{
dcBusiPlanBillSub.setUpdatedTime(DateUtils.getNowDate());
return baseMapper.updateDcBusiPlanBillSub(dcBusiPlanBillSub);
dcBusiDayPlanBillSub.setUpdatedTime(DateUtils.getNowDate());
return baseMapper.updateDcBusiPlanBillSub(dcBusiDayPlanBillSub);
}
/**

40
lzbi-module/src/main/resources/mapper/asset/DcBusiPlanBillMasterMapper.xml → lzbi-module/src/main/resources/mapper/asset/DcBusiDayPlanBillMasterMapper.xml

@ -2,9 +2,9 @@
<!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">
<mapper namespace="com.lzbi.bill.mapper.DcBusiDayPlanBillMasterMapper">
<resultMap type="com.lzbi.bill.domain.DcBusiPlanBillMaster" id="DcBusiPlanBillMasterResult">
<resultMap type="com.lzbi.bill.domain.DcBusiDayPlanBillMaster" id="DcBusiPlanBillMasterResult">
<result property="id" column="id"/>
<result property="billNo" column="bill_no"/>
<result property="billIncomeDate" column="bill_income_date"/>
@ -25,13 +25,13 @@
<result property="oragnizeId" column="oragnize_id"/>
</resultMap>
<resultMap id="DcBusiPlanBillMasterDcBusiPlanBillSubResult" type="com.lzbi.bill.domain.DcBusiPlanBillMaster"
<resultMap id="DcBusiPlanBillMasterDcBusiPlanBillSubResult" type="com.lzbi.bill.domain.DcBusiDayPlanBillMaster"
extends="DcBusiPlanBillMasterResult">
<collection property="dcBusiPlanBillSubList" notNullColumn="sub_id" javaType="java.util.List"
<collection property="dcBusiDayPlanBillSubList" notNullColumn="sub_id" javaType="java.util.List"
resultMap="DcBusiPlanBillSubResult"/>
</resultMap>
<resultMap type="com.lzbi.bill.domain.DcBusiPlanBillSub" id="DcBusiPlanBillSubResult">
<resultMap type="com.lzbi.bill.domain.DcBusiDayPlanBillSub" id="DcBusiPlanBillSubResult">
<result property="id" column="sub_id"/>
<result property="billNo" column="sub_bill_no"/>
<result property="fieldCode" column="sub_field_code"/>
@ -73,10 +73,10 @@
company_name,
organize_name,
oragnize_id
from dc_busi_plan_bill_master
from dc_busi_day_plan_bill_master
</sql>
<select id="selectDcBusiPlanBillMasterList" parameterType="DcBusiPlanBillMaster"
<select id="selectDcBusiPlanBillMasterList" parameterType="DcBusiDayPlanBillMaster"
resultMap="DcBusiPlanBillMasterResult">
<include refid="selectDcBusiPlanBillMasterVo"/>
<where>
@ -110,7 +110,7 @@
a.company_name,
a.organize_name,
a.oragnize_id
from dc_busi_plan_bill_master a
from dc_busi_day_plan_bill_master a
where a.id = #{id}
</select>
@ -134,13 +134,13 @@
a.company_name,
a.organize_name,
a.oragnize_id
from dc_busi_plan_bill_master a
from dc_busi_day_plan_bill_master a
where a.bill_no = #{billNo}
</select>
<insert id="insertDcBusiPlanBillMaster" parameterType="DcBusiPlanBillMaster" useGeneratedKeys="true"
<insert id="insertDcBusiPlanBillMaster" parameterType="DcBusiDayPlanBillMaster" useGeneratedKeys="true"
keyProperty="id">
insert into dc_busi_plan_bill_master
insert into dc_busi_day_plan_bill_master
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="billNo != null">bill_no,</if>
<if test="billIncomeDate != null">bill_income_date,</if>
@ -181,8 +181,8 @@
</trim>
</insert>
<update id="updateDcBusiPlanBillMaster" parameterType="DcBusiPlanBillMaster">
update dc_busi_plan_bill_master
<update id="updateDcBusiPlanBillMaster" parameterType="DcBusiDayPlanBillMaster">
update dc_busi_day_plan_bill_master
<trim prefix="SET" suffixOverrides=",">
<if test="billNo != null">bill_no = #{billNo},</if>
<if test="billIncomeDate != null">bill_income_date = #{billIncomeDate},</if>
@ -205,8 +205,8 @@
where id = #{id}
</update>
<update id="updateDcBusiPlanBillMasterByBillNo" parameterType="DcBusiPlanBillMaster">
update dc_busi_plan_bill_master
<update id="updateDcBusiPlanBillMasterByBillNo" parameterType="DcBusiDayPlanBillMaster">
update dc_busi_day_plan_bill_master
<trim prefix="SET" suffixOverrides=",">
<if test="billIncomeDate != null">bill_income_date = #{billIncomeDate},</if>
<if test="billType != null">bill_type = #{billType},</if>
@ -230,19 +230,19 @@
<delete id="deleteDcBusiPlanBillMasterById" parameterType="Long">
delete
from dc_busi_plan_bill_master
from dc_busi_day_plan_bill_master
where id = #{id}
</delete>
<delete id="deleteDcBusiPlanBillMasterByIds" parameterType="String">
delete from dc_busi_plan_bill_master where id in
delete from dc_busi_day_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
delete from dc_busi_day_plan_bill_sub where bill_no in
<foreach item="billNo" collection="array" open="(" separator="," close=")">
#{billNo}
</foreach>
@ -250,12 +250,12 @@
<delete id="deleteDcBusiPlanBillSubByBillNo" parameterType="String">
delete
from dc_busi_plan_bill_sub
from dc_busi_day_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,
insert into dc_busi_day_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=",">

20
lzbi-module/src/main/resources/mapper/asset/DcBusiPlanBillSubMapper.xml → lzbi-module/src/main/resources/mapper/asset/DcBusiDayPlanBillSubMapper.xml

@ -2,9 +2,9 @@
<!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">
<mapper namespace="com.lzbi.bill.mapper.DcBusiDayPlanBillSubMapper">
<resultMap type="com.lzbi.bill.domain.DcBusiPlanBillSub" id="DcBusiPlanBillSubResult">
<resultMap type="com.lzbi.bill.domain.DcBusiDayPlanBillSub" id="DcBusiPlanBillSubResult">
<result property="id" column="id" />
<result property="billNo" column="bill_no" />
<result property="fieldCode" column="field_code" />
@ -20,10 +20,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectDcBusiPlanBillSubVo">
select id, bill_no, field_code, field_name, asset_code, asset_name, target_code, target_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
select id, bill_no, field_code, field_name, asset_code, asset_name, target_code, target_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_day_plan_bill_sub
</sql>
<select id="selectDcBusiPlanBillSubList" parameterType="DcBusiPlanBillSub" resultMap="DcBusiPlanBillSubResult">
<select id="selectDcBusiPlanBillSubList" parameterType="DcBusiDayPlanBillSub" resultMap="DcBusiPlanBillSubResult">
<include refid="selectDcBusiPlanBillSubVo"/>
<where>
<if test="billNo != null and billNo != ''"> and bill_no = #{billNo}</if>
@ -45,8 +45,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id}
</select>
<insert id="insertDcBusiPlanBillSub" parameterType="DcBusiPlanBillSub" useGeneratedKeys="true" keyProperty="id">
insert into dc_busi_plan_bill_sub
<insert id="insertDcBusiPlanBillSub" parameterType="DcBusiDayPlanBillSub" useGeneratedKeys="true" keyProperty="id">
insert into dc_busi_day_plan_bill_sub
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="billNo != null">bill_no,</if>
<if test="fieldCode != null">field_code,</if>
@ -75,8 +75,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
</insert>
<update id="updateDcBusiPlanBillSub" parameterType="DcBusiPlanBillSub">
update dc_busi_plan_bill_sub
<update id="updateDcBusiPlanBillSub" parameterType="DcBusiDayPlanBillSub">
update dc_busi_day_plan_bill_sub
<trim prefix="SET" suffixOverrides=",">
<if test="billNo != null">bill_no = #{billNo},</if>
<if test="fieldCode != null">field_code = #{fieldCode},</if>
@ -94,11 +94,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id="deleteDcBusiPlanBillSubById" parameterType="Long">
delete from dc_busi_plan_bill_sub where id = #{id}
delete from dc_busi_day_plan_bill_sub where id = #{id}
</delete>
<delete id="deleteDcBusiPlanBillSubByIds" parameterType="String">
delete from dc_busi_plan_bill_sub where id in
delete from dc_busi_day_plan_bill_sub where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
Loading…
Cancel
Save