fix:载体下发登记接口提交

pg_adapter
wangxy 6 months ago
parent 70d985ccca
commit 98f6e6652d

@ -45,7 +45,7 @@ public class CarrierIssuedController extends BaseController {
/**
*
*/
@RequiresPermissions("system:carrierIssued:list")
// @RequiresPermissions("system:carrierIssued:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdCarrierIssued tdCarrierIssued) {

@ -0,0 +1,70 @@
package com.ruoyi.web.controller.carrier.issued;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.carrier.TdCarrierIssued;
import com.ruoyi.web.controller.manager.CarrierIssuedManager;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* Controller
* @author Administrator
*/
@Controller
@RequestMapping("system/saveIssued")
public class SaveIssuedController extends BaseController {
private String prefix = "system/saveIssued";
@Resource
private CarrierIssuedManager carrierIssuedManager;
@RequiresPermissions("system:saveIssued:view")
@GetMapping()
public String saveIssued() {
return prefix + "/saveIssued";
}
/**
*
*/
@RequiresPermissions("system:saveIssued:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdCarrierIssued tdCarrierIssued) {
startPage();
List<TdCarrierIssued> carriers = carrierIssuedManager.selectTdCarrierList(tdCarrierIssued);
return getDataTable(carriers);
}
/**
*
*/
@RequiresPermissions("system:saveIssued:edit")
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") String id, ModelMap mmap) {
TdCarrierIssued tdCarrierIssued = carrierIssuedManager.selectTdCarrier(id);
mmap.put("tdCarrierIssued", tdCarrierIssued);
return prefix + "/edit";
}
/**
*
*/
@RequiresPermissions("system:saveIssued:edit")
@Log(title = "国家秘密载体保存", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(TdCarrierIssued tdCarrierIssued) {
return toAjax(carrierIssuedManager.saveOrUpdate(tdCarrierIssued));
}
}

@ -0,0 +1,83 @@
package com.ruoyi.web.controller.carrier.issued;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.carrier.TdCarrierIssued;
import com.ruoyi.web.controller.manager.CarrierIssuedManager;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* 使Controller
*/
@Controller
@RequestMapping("/system/useIssued")
public class UseIssuedController extends BaseController {
private String prefix = "system/useIssued";
@Resource
private CarrierIssuedManager carrierIssuedManager;
@RequiresPermissions("system:useIssued:view")
@GetMapping()
public String useIssued() {
return prefix + "/useIssued";
}
/**
*
*/
@RequiresPermissions("system:useIssued:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdCarrierIssued tdCarrierIssued) {
startPage();
List<TdCarrierIssued> carriers = carrierIssuedManager.selectTdCarrierList(tdCarrierIssued);
return getDataTable(carriers);
}
/**
* 使
*/
@RequiresPermissions("system:useIssued:edit")
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") String id, ModelMap mmap) {
TdCarrierIssued tdCarrierIssued = carrierIssuedManager.selectTdCarrier(id);
mmap.put("tdCarrierIssued", tdCarrierIssued);
return prefix + "/edit";
}
/**
* 使
*/
@RequiresPermissions("system:useIssued:edit")
@Log(title = "国家秘密载体使用", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(TdCarrierIssued tdCarrierIssued) {
return toAjax(carrierIssuedManager.saveOrUpdate(tdCarrierIssued));
}
/**
*
*/
@GetMapping("/updateStatus/{id}")
@ResponseBody
public AjaxResult updateStatus(@PathVariable("id") String id) {
return toAjax(carrierIssuedManager.updateStatus(id));
}
}

@ -3,7 +3,6 @@ package com.ruoyi.web.controller.manager;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.text.CharSequenceUtil;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.system.domain.carrier.TdCarrier;
import com.ruoyi.system.domain.carrier.TdCarrierIssued;
import com.ruoyi.system.service.carrier.TdCarrierIssuedService;
import org.springframework.stereotype.Component;
@ -55,4 +54,13 @@ public class CarrierIssuedManager {
return carrierIssuedService.removeByIds(list);
}
public boolean updateStatus(String id) {
return carrierIssuedService.lambdaUpdate()
.eq(TdCarrierIssued::getId,id)
.set(TdCarrierIssued::getStatus,"3")
.set(TdCarrierIssued::getReclaimTime,new Date())
.update();
}
}

@ -57,7 +57,7 @@
mentSend_time,reclaim_time
</sql>
<select id="selectTdCarrierList" resultType="com.ruoyi.system.domain.carrier.TdCarrierIssued">
select <include refid="Base_Column_List"/> from td_carrier
select <include refid="Base_Column_List"/> from td_carrier_issued
<trim prefix="where" prefixOverrides="and|or">
<if test="carrierName!=null and carrierName!=''">
AND carrier_name LIKE concat('%',#{carrierName},'%')
@ -88,7 +88,7 @@
</select>
<select id="selectTdCarrierUpdateList" resultType="com.ruoyi.system.domain.carrier.TdCarrierIssued">
select <include refid="Base_Column_List"/> from td_carrier
select <include refid="Base_Column_List"/> from td_carrier_issued
<trim prefix="where" prefixOverrides="and|or">
<if test="carrierName!=null and carrierName!=''">
AND carrier_name LIKE concat('%',#{carrierName},'%')

Loading…
Cancel
Save