提交
This commit is contained in:
@@ -18,13 +18,10 @@ import java.util.Map;
|
|||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class ProductServiceImpl implements ProductService {
|
public class ProductServiceImpl implements ProductService {
|
||||||
private String now = DateUtil.now();
|
|
||||||
private String today = DateUtil.today();
|
|
||||||
//一个月的开始日期
|
|
||||||
private String beginOfMonth = DateUtil.formatTime(DateUtil.beginOfMonth(DateUtil.parseDate(today)));
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> planReached(Map<String, String> param) {
|
public Map<String, Object> planReached(Map<String, String> param) {
|
||||||
|
String today = DateUtil.today();
|
||||||
//计算当天的计划达成
|
//计算当天的计划达成
|
||||||
//01-弯头工段、02-综合工段、03-成品工段
|
//01-弯头工段、02-综合工段、03-成品工段
|
||||||
Map map = new HashMap();
|
Map map = new HashMap();
|
||||||
@@ -42,6 +39,7 @@ public class ProductServiceImpl implements ProductService {
|
|||||||
dayResult.put("jo3", jo3);
|
dayResult.put("jo3", jo3);
|
||||||
|
|
||||||
//计算一个月的计划达成
|
//计算一个月的计划达成
|
||||||
|
String beginOfMonth = DateUtil.formatTime(DateUtil.beginOfMonth(DateUtil.parseDate(today)));
|
||||||
JSONObject monthResult = new JSONObject();
|
JSONObject monthResult = new JSONObject();
|
||||||
map.put("flag", "14");
|
map.put("flag", "14");
|
||||||
map.put("end_produce_date", today);
|
map.put("end_produce_date", today);
|
||||||
@@ -66,6 +64,7 @@ public class ProductServiceImpl implements ProductService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> productSchedule(Map<String, String> param) {
|
public Map<String, Object> productSchedule(Map<String, String> param) {
|
||||||
|
String today = DateUtil.today();
|
||||||
//今日排产生产进度跟踪
|
//今日排产生产进度跟踪
|
||||||
Map map = new HashMap();
|
Map map = new HashMap();
|
||||||
map.put("flag", "2");
|
map.put("flag", "2");
|
||||||
@@ -81,6 +80,7 @@ public class ProductServiceImpl implements ProductService {
|
|||||||
@Override
|
@Override
|
||||||
public Map<String, Object> output(Map<String, String> param) {
|
public Map<String, Object> output(Map<String, String> param) {
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
|
String today = DateUtil.today();
|
||||||
Map map = new HashMap();
|
Map map = new HashMap();
|
||||||
// map.put("flag", "3");
|
// map.put("flag", "3");
|
||||||
map.put("flag", "7");
|
map.put("flag", "7");
|
||||||
@@ -121,6 +121,7 @@ public class ProductServiceImpl implements ProductService {
|
|||||||
//获取一周的日期
|
//获取一周的日期
|
||||||
JSONArray dataArr = new JSONArray();
|
JSONArray dataArr = new JSONArray();
|
||||||
JSONArray results = new JSONArray();
|
JSONArray results = new JSONArray();
|
||||||
|
String now = DateUtil.now();
|
||||||
for (int i = 0; i < 7; i++) {
|
for (int i = 0; i < 7; i++) {
|
||||||
DateTime dateTime = DateUtil.offsetDay(DateUtil.parse(now), -i);
|
DateTime dateTime = DateUtil.offsetDay(DateUtil.parse(now), -i);
|
||||||
dataArr.add(dateTime.toString().substring(0, 10));
|
dataArr.add(dateTime.toString().substring(0, 10));
|
||||||
@@ -154,6 +155,7 @@ public class ProductServiceImpl implements ProductService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> topHarvest(Map<String, String> param) {
|
public Map<String, Object> topHarvest(Map<String, String> param) {
|
||||||
|
String today = DateUtil.today();
|
||||||
//今日Top10产量
|
//今日Top10产量
|
||||||
Map map = new HashMap();
|
Map map = new HashMap();
|
||||||
map.put("flag", "10");
|
map.put("flag", "10");
|
||||||
@@ -169,6 +171,7 @@ public class ProductServiceImpl implements ProductService {
|
|||||||
@Override
|
@Override
|
||||||
public Map<String, Object> monthHarvest(Map<String, String> param) {
|
public Map<String, Object> monthHarvest(Map<String, String> param) {
|
||||||
//30天产量走势
|
//30天产量走势
|
||||||
|
String now = DateUtil.now();
|
||||||
JSONArray dataArr = new JSONArray();
|
JSONArray dataArr = new JSONArray();
|
||||||
JSONArray results = new JSONArray();
|
JSONArray results = new JSONArray();
|
||||||
for (int i = 0; i < 30; i++) {
|
for (int i = 0; i < 30; i++) {
|
||||||
@@ -200,6 +203,7 @@ public class ProductServiceImpl implements ProductService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> unfinishOrder(Map<String, String> param) {
|
public Map<String, Object> unfinishOrder(Map<String, String> param) {
|
||||||
|
String today = DateUtil.today();
|
||||||
Map map = new HashMap();
|
Map map = new HashMap();
|
||||||
map.put("flag", "11");
|
map.put("flag", "11");
|
||||||
map.put("produce_date", today);
|
map.put("produce_date", today);
|
||||||
@@ -214,6 +218,9 @@ public class ProductServiceImpl implements ProductService {
|
|||||||
@Override
|
@Override
|
||||||
public Map<String, Object> monthOrder(Map<String, String> param) {
|
public Map<String, Object> monthOrder(Map<String, String> param) {
|
||||||
//计算前9种物料产能
|
//计算前9种物料产能
|
||||||
|
String today = DateUtil.today();
|
||||||
|
String beginOfMonth = DateUtil.formatTime(DateUtil.beginOfMonth(DateUtil.parseDate(today)));
|
||||||
|
|
||||||
Map map = new HashMap();
|
Map map = new HashMap();
|
||||||
map.put("flag", "12");
|
map.put("flag", "12");
|
||||||
map.put("produce_date", today);
|
map.put("produce_date", today);
|
||||||
|
|||||||
Reference in New Issue
Block a user