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