修复已知问题

This commit is contained in:
2022-05-16 16:39:51 +08:00
parent 8a1288dee0
commit 12c7273f21
11 changed files with 63 additions and 28 deletions

View File

@ -139,7 +139,7 @@ public class HxScientificProductionController {
@GetMapping("/getMonthPlanPic")
@ApiOperation(value = "生产管理-本月计划执行情况-type=厂计划/六院计划")
public AjaxResult getMonthPlanPic(@RequestParam(value = "type")String type) {
public AjaxResult getMonthPlanPic(@RequestParam(value = "type") String type) {
HxMonthPlan plan = new HxMonthPlan();
plan.setMonth(DateUtil.getDate("yyyy-MM"));
plan.setAscription(type);
@ -148,7 +148,7 @@ public class HxScientificProductionController {
@GetMapping("/getMonthFactoryPlanPic")
@ApiOperation(value = "生产管理-工厂计划")
public AjaxResult getMonthFactoryPlanPic(@RequestParam(value = "month",required = false)String month) {
public AjaxResult getMonthFactoryPlanPic(@RequestParam(value = "month", required = false) String month) {
HxMonthFactoryPlan plan = new HxMonthFactoryPlan();
if (EmptyUtil.isNotEmpty(month)) {
plan.setMonth(DateUtil.getDate(month));
@ -160,7 +160,7 @@ public class HxScientificProductionController {
@GetMapping("/getMilepostAndBottleneckPic")
@ApiOperation(value = "生产管理-里程碑和瓶颈")
public AjaxResult getMilepostAndBottleneckPic(@RequestParam(value = "projectName",required = false)String projectName) {
public AjaxResult getMilepostAndBottleneckPic(@RequestParam(value = "projectName", required = false) String projectName) {
return AjaxResult.success(hxMilepostAndBottleneckService.getMilepostAndBottleneckPic(projectName));
}
@ -190,7 +190,7 @@ public class HxScientificProductionController {
@GetMapping("/getMaterialsAccessoriesPic")
@ApiOperation(value = "项目管理-型号原材料及配套件")
public AjaxResult getMaterialsAccessoriesPic(@RequestParam("type")String type) {
public AjaxResult getMaterialsAccessoriesPic(@RequestParam("type") String type) {
return AjaxResult.success(hxMaterialsAccessoriesService.getMaterialsAccessoriesPic(type));
}

View File

@ -33,7 +33,7 @@ import java.util.*;
public class Test {
public static void main(String[] args) throws Exception, IOException {
System.out.println(checkAnswer("107,108,109,","108,109,107,"));
System.out.println(new Date());
}

View File

@ -67,12 +67,12 @@ public class HxWorkPlanServiceImpl implements HxWorkPlanService {
private Map getRate() {
Map returnMap = new HashMap(2);
List<String> planNameList = getAllExistPlanName();
List<String> projectList = getAllProjectName();
List<Map> mapList = new ArrayList<>();
planNameList.forEach(planName -> {
projectList.forEach(project -> {
Map map = new HashMap();
map.put("name", planName);
map.put("value", hxWorkPlanMapper.getInfoByPlanName(planName));
map.put("name", project);
map.put("value", hxWorkPlanMapper.getInfoByProjectName(project));
mapList.add(map);
});
returnMap.put("list", mapList);
@ -91,8 +91,8 @@ public class HxWorkPlanServiceImpl implements HxWorkPlanService {
return returnMap;
}
private List<String> getAllExistPlanName() {
return hxWorkPlanMapper.getAllExistPlanName();
private List<String> getAllProjectName() {
return hxWorkPlanMapper.getAllProjectName();
}
private boolean checkIsExist(HxWorkPlan hxWorkPlan) {

View File

@ -2,7 +2,7 @@ spring:
datasource:
type: com.alibaba.druid.pool.DruidDataSource
druid:
url: jdbc:dm://192.168.0.153:5236/AITEST?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
url: jdbc:dm://localhost:5236/AITEST?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: SYSDBA
password: root12345
driver-class-name: dm.jdbc.driver.DmDriver
@ -27,6 +27,6 @@ ailanyin:
updatesql:
need-run: true
database-driver: dm.jdbc.driver.DmDriver
database-url: jdbc:dm://192.168.0.153:5236/AITEST?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
database-url: jdbc:dm://localhost:5236/AITEST?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
database-username: SYSDBA
database-password: root12345

View File

@ -6,7 +6,7 @@ spring:
name: vis389-boot
#name: vis389
profiles:
active: prod # dev == windows == 开发, prod == linux == 线上
active: dev # dev == windows == 开发, prod == linux == 线上
servlet:
multipart:
enabled: true #开启文件上传

View File

@ -0,0 +1,4 @@
update ROOT."hx_dict" set "name" = 'Ⅰ级' where "id" = '22';
update ROOT."hx_dict" set "name" = 'Ⅱ级' where "id" = '23';
update ROOT."hx_dict" set "name" = 'Ⅲ级' where "id" = '24';
commit;

View File

@ -0,0 +1,20 @@
drop table "ROOT"."hx_work_plan";
CREATE TABLE "ROOT"."hx_work_plan"
(
"id" BIGINT IDENTITY(1, 1) NOT NULL,
"today_date" VARCHAR(255),
"work_plan_name" VARCHAR(255),
"dept_name" VARCHAR(255),
"completed_status" VARCHAR(255),
"project_name" VARCHAR(255),
NOT CLUSTER PRIMARY KEY("id")) STORAGE(ON "AITEST", CLUSTERBTR) ;
COMMENT ON COLUMN "ROOT"."hx_work_plan"."completed_status" IS '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
COMMENT ON COLUMN "ROOT"."hx_work_plan"."dept_name" IS '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
COMMENT ON COLUMN "ROOT"."hx_work_plan"."project_name" IS '<EFBFBD><EFBFBD>Ŀ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
COMMENT ON COLUMN "ROOT"."hx_work_plan"."today_date" IS '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
COMMENT ON COLUMN "ROOT"."hx_work_plan"."work_plan_name" IS '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
CREATE UNIQUE INDEX "INDEX11019279856100" ON "ROOT"."hx_work_plan"("id" ASC) STORAGE(ON "AITEST", CLUSTERBTR) ;

View File

@ -43,19 +43,19 @@ public interface HxWorkPlanMapper {
void updateSelective(HxWorkPlan hxWorkPlan);
/**
* 获取所有已经存在的计划名称
* 获取所有已经存在的项目名称
*
* @return
*/
List<String> getAllExistPlanName();
List<String> getAllProjectName();
/**
* 统计计划名称
*
* @param planName
* @param projectName
* @return
*/
Map getInfoByPlanName(String planName);
Map getInfoByProjectName(String projectName);
/**
* 获取总的未完成数量和率

View File

@ -20,6 +20,10 @@ public class HxWorkPlan implements Serializable {
@Excel(name = "日期", width = 20)
private String todayDate;
@ApiModelProperty(value = "项目名称")
@Excel(name = "项目名称", width = 20)
private String projectName;
@ApiModelProperty(value = "工作计划名称")
@Excel(name = "工作计划名称", width = 20)
private String workPlanName;

View File

@ -126,7 +126,7 @@
</select>
<select id="checkIsExist" resultType="int">
select count("id") from "hx_responsibility_status"
select count("id") from ROOT."hx_responsibility_status"
where "dept_name" = #{deptName} and "responsibility_content" = #{responsibilityContent}
limit 1
</select>

View File

@ -11,6 +11,7 @@
<result column="today_date" jdbcType="VARCHAR" property="todayDate" />
<result column="work_plan_name" jdbcType="VARCHAR" property="workPlanName" />
<result column="dept_name" jdbcType="VARCHAR" property="deptName" />
<result column="project_name" jdbcType="VARCHAR" property="projectName" />
<result column="completed_status" jdbcType="VARCHAR" property="completedStatus" />
</resultMap>
<sql id="Base_Column_List">
@ -19,7 +20,7 @@
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Dec 14 03:18:44 UTC 2021.
-->
"id", "today_date", "work_plan_name", "dept_name", "completed_status"
"id", "today_date", "work_plan_name", "dept_name", "completed_status","project_name"
</sql>
<select id="selectHxWorkPlanList" resultMap="BaseResultMap">
select
@ -69,6 +70,9 @@
<if test="completedStatus != null">
"completed_status",
</if>
<if test="projectName != null">
"project_name",
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
@ -86,6 +90,9 @@
<if test="completedStatus != null">
#{completedStatus,jdbcType=VARCHAR},
</if>
<if test="projectName != null">
#{projectName}
</if>
</trim>
</insert>
<update id="updateSelective" parameterType="com.ailanyin.model.HxWorkPlan">
@ -124,24 +131,24 @@
from ROOT."hx_work_plan"
where "today_date" = #{todayDate,jdbcType=VARCHAR} and
"work_plan_name" = #{workPlanName,jdbcType=VARCHAR} and
"dept_name" = #{deptName,jdbcType=VARCHAR}
"dept_name" = #{deptName,jdbcType=VARCHAR} and "project_name" = #{projectName}
</select>
<select id="getAllExistPlanName" resultType="string">
select "work_plan_name"
<select id="getAllProjectName" resultType="string">
select "project_name"
from ROOT."hx_work_plan"
group by "work_plan_name"
group by "project_name"
</select>
<select id="getInfoByPlanName" resultType="map">
<select id="getInfoByProjectName" resultType="map">
select count("id") as "total",(select count("id")
from ROOT."hx_work_plan"
where "work_plan_name" = #{planName} and "completed_status" = '已完成') as "completedNum",
where "project_name" = #{projectName} and "completed_status" = '已完成') as "completedNum",
(select count("id")
from ROOT."hx_work_plan"
where "work_plan_name" = #{planName} and "completed_status" = '已完成') * 100/count("id") as "rate"
where "project_name" = #{projectName} and "completed_status" = '已完成') * 100/count("id") as "rate"
from ROOT."hx_work_plan"
where "work_plan_name" = #{planName}
where "project_name" = #{projectName}
</select>
<select id="getTotalAndRate" resultType="map">