| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.text.DecimalFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Random; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * @author zhongrj |
| | |
| | | Long sid = examScore.getId(); |
| | | String format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(examScore.getExamTime()); |
| | | String s = "insert into exam_score(id,exam_time) " + |
| | | "values(" + "'" + sid + "'" + "," + "'" + |
| | | format + "'" + "," + "'" + ")"; |
| | | "values(" + "'" + sid + "'" + |
| | | "," + "'" +format + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //返回 |
| | | return R.status(save); |
| | |
| | | result = pre + (decimalFormat.format(count++)); |
| | | } |
| | | user.setSecuritynumber(result); |
| | | //发证日期 |
| | | user.setPaperTime(new Date()); |
| | | //修改为持证保安 |
| | | user.setHold("1"); |
| | | //分配保安角色 |
| | |
| | | "update blade_user set role_id = " + "'" + user.getRoleId() + "'" + |
| | | ",hold = " + "'" + user.getHold() + "'" + |
| | | ",securitynumber = " + "'" + user.getSecuritynumber() + "'" + |
| | | ",paper_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd").format(user.getPaperTime()) + "'" + |
| | | " " +"where id = " + "'" + user.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | } |
| | |
| | | examScore.setAllGrade(Math.round((examScore.getLearnGrade() + examScore1.getTheoryGrade()) / 2)); |
| | | } |
| | | if (user.getAge()>50) { |
| | | examScore.setAllGrade(Integer.parseInt(String.valueOf(Math.round(examScore1.getTheoryGrade()*0.3))) |
| | | + Integer.parseInt(String.valueOf(Math.round(examScore1.getLearnGrade()*0.7)))); |
| | | examScore.setAllGrade(Integer.parseInt(String.valueOf(Math.round(examScore1.getTheoryGrade()*0.5))) |
| | | + Integer.parseInt(String.valueOf(Math.round(examScore1.getLearnGrade()*0.5)))); |
| | | } |
| | | } |
| | | //内网同步 |
| | |
| | | */ |
| | | @GetMapping("score-statistics") |
| | | @ApiOperation(value = "分数统计") |
| | | public R<List> scoreStatistics(HttpServletResponse response) { |
| | | return R.data(examScoreService.scoreStatistics()); |
| | | public R<List> scoreStatistics(HttpServletResponse response,String deptid,String jurisdiction) { |
| | | return R.data(examScoreService.scoreStatistics(deptid,jurisdiction)); |
| | | } |
| | | } |