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} +