@ -150,20 +150,14 @@ public class PurchasereturnRequestMainController {
// 手动创建导出 demo
List < PurchasereturnRequestImportVO > list = new ArrayList < > ( ) ;
Map < Integer , String [ ] > mapDropDown = new HashMap < > ( ) ;
String [ ] transferMode = DictFrameworkUtils . dictTypeDictDataValue ( DictTypeConstants . TRANSFER_MODE ) ;
mapDropDown . put ( 4 , transferMode ) ;
String [ ] locationType = DictFrameworkUtils . dictTypeDictDataValue ( DictTypeConstants . LOCATION_TYPE ) ;
mapDropDown . put ( 7 , locationType ) ;
mapDropDown . put ( 8 , locationType ) ;
String [ ] requestStatus = DictFrameworkUtils . dictTypeDictDataValue ( DictTypeConstants . REQUEST_STATUS ) ;
mapDropDown . put ( 18 , requestStatus ) ;
String [ ] inventoryStatus = DictFrameworkUtils . dictTypeDictDataValue ( DictTypeConstants . INVENTORY_STATUS ) ;
mapDropDown . put ( 31 , inventoryStatus ) ;
String [ ] packUnit = DictFrameworkUtils . dictTypeDictDataValue ( DictTypeConstants . PACK_UNIT ) ;
mapDropDown . put ( 36 , packUnit ) ;
String [ ] uom = DictFrameworkUtils . dictTypeDictDataValue ( DictTypeConstants . UOM ) ;
mapDropDown . put ( 38 , uom ) ;
mapDropDown . put ( 47 , uom ) ;
mapDropDown . put ( 9 , uom ) ;
String [ ] inventoryStatus = DictFrameworkUtils . dictTypeDictDataValue ( DictTypeConstants . INVENTORY_STATUS ) ;
mapDropDown . put ( 10 , inventoryStatus ) ;
String [ ] reason = DictFrameworkUtils . dictTypeDictDataValue ( DictTypeConstants . PURCHASE_RETURN_REASON ) ;
mapDropDown . put ( 12 , reason ) ;
String [ ] transferMode = DictFrameworkUtils . dictTypeDictDataValue ( DictTypeConstants . PURCHASE_RETURN_REASON ) ;
mapDropDown . put ( 14 , transferMode ) ;
ExcelUtils . write ( response , "采购退货信息导入模板.xlsx" , "采购退货信息列表" , PurchasereturnRequestImportVO . class , list , mapDropDown ) ;
}
@ -208,4 +202,58 @@ public class PurchasereturnRequestMainController {
return success ( result ) ;
}
@PutMapping ( "/close" )
@Operation ( summary = "关闭采购收货申请主" )
@Parameter ( name = "id" , description = "编号" , required = true )
@PreAuthorize ( "@ss.hasPermission('wms:purchasereturn-request-main:close')" )
public CommonResult < Boolean > closePurchasereturnRequestMain ( @RequestParam ( "id" ) Long id ) {
Integer count = purchasereturnRequestMainService . closePurchasereturnRequestMain ( id ) ;
return success ( count > 0 ) ;
}
@PutMapping ( "/reAdd" )
@Operation ( summary = "重新添加采购收货申请主" )
@Parameter ( name = "id" , description = "编号" , required = true )
@PreAuthorize ( "@ss.hasPermission('wms:purchasereturn-request-main:reAdd')" )
public CommonResult < Boolean > openPurchasereturnRequestMain ( @RequestParam ( "id" ) Long id ) {
Integer count = purchasereturnRequestMainService . reAddPurchasereturnRequestMain ( id ) ;
return success ( count > 0 ) ;
}
@PutMapping ( "/submit" )
@Operation ( summary = "提交采购退货申请主" )
@Parameter ( name = "id" , description = "编号" , required = true )
@PreAuthorize ( "@ss.hasPermission('wms:purchasereturn-request-main:submit')" )
public CommonResult < Boolean > submitPurchasereturnRequestMain ( @RequestParam ( "id" ) Long id ) {
Integer count = purchasereturnRequestMainService . submitPurchasereturnRequestMain ( id ) ;
return success ( count > 0 ) ;
}
@PutMapping ( "/agree" )
@Operation ( summary = "审批通过采购退货申请主" )
@Parameter ( name = "id" , description = "编号" , required = true )
@PreAuthorize ( "@ss.hasPermission('wms:purchasereturn-request-main:agree')" )
public CommonResult < Boolean > agreePurchasereturnRequestMain ( @RequestParam ( "id" ) Long id ) {
Integer count = purchasereturnRequestMainService . agreePurchasereturnRequestMain ( id ) ;
return success ( count > 0 ) ;
}
@PutMapping ( "/handle" )
@Operation ( summary = "处理采购退货申请主" )
@Parameter ( name = "id" , description = "编号" , required = true )
@PreAuthorize ( "@ss.hasPermission('wms:purchasereturn-request-main:handle')" )
public CommonResult < Boolean > handlePurchasereturnRequestMain ( @RequestParam ( "id" ) Long id ) {
Integer count = purchasereturnRequestMainService . handlePurchasereturnRequestMain ( id ) ;
return success ( count > 0 ) ;
}
@PutMapping ( "/refused" )
@Operation ( summary = "审批拒绝采购退货申请主" )
@Parameter ( name = "id" , description = "编号" , required = true )
@PreAuthorize ( "@ss.hasPermission('wms:purchasereturn-request-main:refused')" )
public CommonResult < Boolean > abortPurchasereturnRequestMain ( @RequestParam ( "id" ) Long id ) {
Integer count = purchasereturnRequestMainService . refusedPurchasereturnRequestMain ( id ) ;
return success ( count > 0 ) ;
}
}