From cfc13f4ae0d8d4091d12b57ae8e8d9b7793ce39b Mon Sep 17 00:00:00 2001 From: zhaoyu Date: Wed, 13 Dec 2023 14:45:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=81=E4=B8=9A=E7=AB=AF=E7=BC=BA=E5=A4=B1?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E8=A1=A5=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../keyProjects/OutSourcedController.java | 19 +++++++++++++++++++ .../dsno2/keyProjects/OutSourcedMapper.java | 2 ++ .../keyProjects/OutSourcedService.java | 2 ++ .../impl/OutSourcedServiceImpl.java | 8 ++++++++ .../dsno2/keyProjects/OutSourcedMapper.xml | 12 ++++++++++++ 5 files changed, 43 insertions(+) diff --git a/src/main/java/com/zcloud/controller/keyProjects/OutSourcedController.java b/src/main/java/com/zcloud/controller/keyProjects/OutSourcedController.java index dd972b2c..28789e86 100644 --- a/src/main/java/com/zcloud/controller/keyProjects/OutSourcedController.java +++ b/src/main/java/com/zcloud/controller/keyProjects/OutSourcedController.java @@ -761,4 +761,23 @@ public class OutSourcedController extends BaseController { return map; } + + /** + * 批量删除 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/updateState") + @ResponseBody + public Object updateState() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + outsourcedService.updateState(pd); + map.put("result", errInfo); //返回结果 + return map; + } + } diff --git a/src/main/java/com/zcloud/mapper/dsno2/keyProjects/OutSourcedMapper.java b/src/main/java/com/zcloud/mapper/dsno2/keyProjects/OutSourcedMapper.java index c63201ea..569023c7 100644 --- a/src/main/java/com/zcloud/mapper/dsno2/keyProjects/OutSourcedMapper.java +++ b/src/main/java/com/zcloud/mapper/dsno2/keyProjects/OutSourcedMapper.java @@ -73,5 +73,7 @@ public interface OutSourcedMapper{ //校验结束重点工程是否有为完成的内容 PageData jieshuOutSourced(PageData pd); + + void updateState(PageData pd); } diff --git a/src/main/java/com/zcloud/service/keyProjects/OutSourcedService.java b/src/main/java/com/zcloud/service/keyProjects/OutSourcedService.java index f6e1474a..bf05b77d 100644 --- a/src/main/java/com/zcloud/service/keyProjects/OutSourcedService.java +++ b/src/main/java/com/zcloud/service/keyProjects/OutSourcedService.java @@ -74,5 +74,7 @@ public interface OutSourcedService{ //校验结束重点工程是否有为完成的内容 PageData jieshuOutSourced(PageData pd); + + void updateState(PageData pd); } diff --git a/src/main/java/com/zcloud/service/keyProjects/impl/OutSourcedServiceImpl.java b/src/main/java/com/zcloud/service/keyProjects/impl/OutSourcedServiceImpl.java index db3f5b50..af090e91 100644 --- a/src/main/java/com/zcloud/service/keyProjects/impl/OutSourcedServiceImpl.java +++ b/src/main/java/com/zcloud/service/keyProjects/impl/OutSourcedServiceImpl.java @@ -4,10 +4,12 @@ import com.zcloud.entity.Page; import com.zcloud.entity.PageData; import com.zcloud.mapper.dsno2.keyProjects.OutSourcedMapper; import com.zcloud.service.keyProjects.OutSourcedService; +import com.zcloud.util.DateUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.util.Date; import java.util.List; /** @@ -98,5 +100,11 @@ public class OutSourcedServiceImpl implements OutSourcedService { public PageData jieshuOutSourced(PageData pd) { return outsourcedMapper.jieshuOutSourced(pd); } + + @Override + public void updateState(PageData pd) { + pd.put("OPERATTIME", DateUtil.date2Str(new Date())); + outsourcedMapper.updateState(pd); + } } diff --git a/src/main/resources/mybatis/dsno2/keyProjects/OutSourcedMapper.xml b/src/main/resources/mybatis/dsno2/keyProjects/OutSourcedMapper.xml index 3fbb08db..8b4c1a84 100644 --- a/src/main/resources/mybatis/dsno2/keyProjects/OutSourcedMapper.xml +++ b/src/main/resources/mybatis/dsno2/keyProjects/OutSourcedMapper.xml @@ -683,4 +683,16 @@ ) AI ON AI.OUTSOURCED_ID = o.OUTSOURCED_ID WHERE o.OUTSOURCED_ID=#{OUTSOURCED_ID} + + + + update + + set + STATE = #{STATE}, + OPERATOR = #{OPERATOR}, + OPERATTIME = #{OPERATTIME} + where + OUTSOURCED_ID = #{OUTSOURCED_ID} +