代码规范提交
This commit is contained in:
parent
ffbe56adb5
commit
bfd206a0b2
|
|
@ -562,7 +562,7 @@ public class DateTimeHelper {
|
||||||
long hours = time / 60 / 1000;
|
long hours = time / 60 / 1000;
|
||||||
return hours;
|
return hours;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return 0l;
|
return 0L;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -189,8 +189,9 @@ public class StringHelper {
|
||||||
public static String decode(String bytes) {
|
public static String decode(String bytes) {
|
||||||
ByteArrayOutputStream baos = new ByteArrayOutputStream(bytes.length() / 2);
|
ByteArrayOutputStream baos = new ByteArrayOutputStream(bytes.length() / 2);
|
||||||
// 将每2位16进制整数组装成一个字节
|
// 将每2位16进制整数组装成一个字节
|
||||||
for (int i = 0; i < bytes.length(); i += 2)
|
for (int i = 0; i < bytes.length(); i += 2){
|
||||||
baos.write((hexString.indexOf(bytes.charAt(i)) << 4 | hexString.indexOf(bytes.charAt(i + 1))));
|
baos.write((hexString.indexOf(bytes.charAt(i)) << 4 | hexString.indexOf(bytes.charAt(i + 1))));
|
||||||
|
}
|
||||||
return new String(baos.toByteArray());
|
return new String(baos.toByteArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,9 @@ public class CommonUtil {
|
||||||
* @date 2023/12/14 18:54
|
* @date 2023/12/14 18:54
|
||||||
*/
|
*/
|
||||||
public Integer totalValue(List<Map<String, String>> list, String maType) {
|
public Integer totalValue(List<Map<String, String>> list, String maType) {
|
||||||
if (CollectionUtils.isEmpty(list) || StringUtils.isEmpty(maType)) return 0;
|
if (CollectionUtils.isEmpty(list) || StringUtils.isEmpty(maType)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
BigDecimal value = new BigDecimal(new Double(0).toString());
|
BigDecimal value = new BigDecimal(new Double(0).toString());
|
||||||
for (int i = 0; i < list.size(); i++) {
|
for (int i = 0; i < list.size(); i++) {
|
||||||
Map<String, String> map = list.get(i);
|
Map<String, String> map = list.get(i);
|
||||||
|
|
@ -113,7 +115,7 @@ public class CommonUtil {
|
||||||
BigDecimal jjValue = new BigDecimal(new Double(0).toString());
|
BigDecimal jjValue = new BigDecimal(new Double(0).toString());
|
||||||
BigDecimal tsValue = new BigDecimal(new Double(0).toString());
|
BigDecimal tsValue = new BigDecimal(new Double(0).toString());
|
||||||
for (int i = 0; i < list.size(); i++) {
|
for (int i = 0; i < list.size(); i++) {
|
||||||
if(Objects.isNull(list.get(i))){
|
if (Objects.isNull(list.get(i))) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (Objects.equals(list.get(i).getCompanyName(), CommonConstants.JJ)) {
|
if (Objects.equals(list.get(i).getCompanyName(), CommonConstants.JJ)) {
|
||||||
|
|
@ -246,7 +248,9 @@ public class CommonUtil {
|
||||||
* @date 2023/12/15 19:21
|
* @date 2023/12/15 19:21
|
||||||
*/
|
*/
|
||||||
public Integer setZKData(List<ScrapAnalysisVo> list) {
|
public Integer setZKData(List<ScrapAnalysisVo> list) {
|
||||||
if (CollectionUtils.isEmpty(list)) return 0;
|
if (CollectionUtils.isEmpty(list)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
BigDecimal totalValue = new BigDecimal(new Double(0).toString());
|
BigDecimal totalValue = new BigDecimal(new Double(0).toString());
|
||||||
for (int i = 0; i < list.size(); i++) {
|
for (int i = 0; i < list.size(); i++) {
|
||||||
ScrapAnalysisVo vo = list.get(i);
|
ScrapAnalysisVo vo = list.get(i);
|
||||||
|
|
@ -265,7 +269,9 @@ public class CommonUtil {
|
||||||
* @date 2023/12/16 13:20
|
* @date 2023/12/16 13:20
|
||||||
*/
|
*/
|
||||||
public Integer setDRKData(List<ScrapAnalysisVo> list) {
|
public Integer setDRKData(List<ScrapAnalysisVo> list) {
|
||||||
if (CollectionUtils.isEmpty(list)) return 0;
|
if (CollectionUtils.isEmpty(list)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
BigDecimal finalValue = new BigDecimal(new Double(0).toString());
|
BigDecimal finalValue = new BigDecimal(new Double(0).toString());
|
||||||
BigDecimal totalValue = new BigDecimal(new Double(0).toString());
|
BigDecimal totalValue = new BigDecimal(new Double(0).toString());
|
||||||
BigDecimal totalValue2 = new BigDecimal(new Double(0).toString());
|
BigDecimal totalValue2 = new BigDecimal(new Double(0).toString());
|
||||||
|
|
@ -289,7 +295,9 @@ public class CommonUtil {
|
||||||
* @date 2023/12/16 14:01
|
* @date 2023/12/16 14:01
|
||||||
*/
|
*/
|
||||||
public Integer setUSEData(List<ScrapAnalysisVo> list) {
|
public Integer setUSEData(List<ScrapAnalysisVo> list) {
|
||||||
if (CollectionUtils.isEmpty(list)) return 0;
|
if (CollectionUtils.isEmpty(list)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
BigDecimal finalValue = new BigDecimal(new Double(0).toString());
|
BigDecimal finalValue = new BigDecimal(new Double(0).toString());
|
||||||
BigDecimal totalValue = new BigDecimal(new Double(0).toString());
|
BigDecimal totalValue = new BigDecimal(new Double(0).toString());
|
||||||
BigDecimal totalValue2 = new BigDecimal(new Double(0).toString());
|
BigDecimal totalValue2 = new BigDecimal(new Double(0).toString());
|
||||||
|
|
@ -316,7 +324,9 @@ public class CommonUtil {
|
||||||
* @date 2023/12/16 14:07
|
* @date 2023/12/16 14:07
|
||||||
*/
|
*/
|
||||||
public Integer setZXData(List<ScrapAnalysisVo> list) {
|
public Integer setZXData(List<ScrapAnalysisVo> list) {
|
||||||
if (CollectionUtils.isEmpty(list)) return 0;
|
if (CollectionUtils.isEmpty(list)){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
/*维修总量/维修合格数量/维修报废数量/待维修数量*/
|
/*维修总量/维修合格数量/维修报废数量/待维修数量*/
|
||||||
BigDecimal repairValue = new BigDecimal(new Double(0).toString());
|
BigDecimal repairValue = new BigDecimal(new Double(0).toString());
|
||||||
BigDecimal repairedValue = new BigDecimal(new Double(0).toString());
|
BigDecimal repairedValue = new BigDecimal(new Double(0).toString());
|
||||||
|
|
@ -344,7 +354,9 @@ public class CommonUtil {
|
||||||
* @date 2023/12/16 14:22
|
* @date 2023/12/16 14:22
|
||||||
*/
|
*/
|
||||||
public Integer setBFData(List<ScrapAnalysisVo> list) {
|
public Integer setBFData(List<ScrapAnalysisVo> list) {
|
||||||
if (CollectionUtils.isEmpty(list)) return 0;
|
if (CollectionUtils.isEmpty(list)){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
BigDecimal totalValue = new BigDecimal(new Double(0).toString());
|
BigDecimal totalValue = new BigDecimal(new Double(0).toString());
|
||||||
for (int i = 0; i < list.size(); i++) {
|
for (int i = 0; i < list.size(); i++) {
|
||||||
ScrapAnalysisVo vo = list.get(i);
|
ScrapAnalysisVo vo = list.get(i);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue