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