企业端缺失功能补全

cmt1.0
zhaoyu 2023-12-13 14:45:11 +08:00
parent 2521ccf737
commit cfc13f4ae0
5 changed files with 43 additions and 0 deletions

View File

@ -761,4 +761,23 @@ public class OutSourcedController extends BaseController {
return map; return map;
} }
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value = "/updateState")
@ResponseBody
public Object updateState() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
outsourcedService.updateState(pd);
map.put("result", errInfo); //返回结果
return map;
}
} }

View File

@ -73,5 +73,7 @@ public interface OutSourcedMapper{
//校验结束重点工程是否有为完成的内容 //校验结束重点工程是否有为完成的内容
PageData jieshuOutSourced(PageData pd); PageData jieshuOutSourced(PageData pd);
void updateState(PageData pd);
} }

View File

@ -74,5 +74,7 @@ public interface OutSourcedService{
//校验结束重点工程是否有为完成的内容 //校验结束重点工程是否有为完成的内容
PageData jieshuOutSourced(PageData pd); PageData jieshuOutSourced(PageData pd);
void updateState(PageData pd);
} }

View File

@ -4,10 +4,12 @@ import com.zcloud.entity.Page;
import com.zcloud.entity.PageData; import com.zcloud.entity.PageData;
import com.zcloud.mapper.dsno2.keyProjects.OutSourcedMapper; import com.zcloud.mapper.dsno2.keyProjects.OutSourcedMapper;
import com.zcloud.service.keyProjects.OutSourcedService; import com.zcloud.service.keyProjects.OutSourcedService;
import com.zcloud.util.DateUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.List; import java.util.List;
/** /**
@ -98,5 +100,11 @@ public class OutSourcedServiceImpl implements OutSourcedService {
public PageData jieshuOutSourced(PageData pd) { public PageData jieshuOutSourced(PageData pd) {
return outsourcedMapper.jieshuOutSourced(pd); return outsourcedMapper.jieshuOutSourced(pd);
} }
@Override
public void updateState(PageData pd) {
pd.put("OPERATTIME", DateUtil.date2Str(new Date()));
outsourcedMapper.updateState(pd);
}
} }

View File

@ -683,4 +683,16 @@
) AI ON AI.OUTSOURCED_ID = o.OUTSOURCED_ID ) AI ON AI.OUTSOURCED_ID = o.OUTSOURCED_ID
WHERE o.OUTSOURCED_ID=#{OUTSOURCED_ID} WHERE o.OUTSOURCED_ID=#{OUTSOURCED_ID}
</select> </select>
<update id="updateState" parameterType="pd">
update
<include refid="tableName"></include>
set
STATE = #{STATE},
OPERATOR = #{OPERATOR},
OPERATTIME = #{OPERATTIME}
where
OUTSOURCED_ID = #{OUTSOURCED_ID}
</update>
</mapper> </mapper>